1. ## 1st order ode

I am trying to solve the following ODE in order to obtain a solution in explicit for:

xdy=(x+y)dx

WITH INITIAL CONDITION Y(X=0)=-2

i have tried exact equations and attempted substituion but no luck.

thanks

2. The equation is linear in y. Have you tried the integrating factor method?

3. Hmm. Come to think of it, the point x = 0 is a singularity of the DE. I'm not sure you can solve it as written. Are you sure the initial condition is applied at x = 0?

Incidentally, could you please reduce the size of your font? It's a bit loud!

4. It is homogeneous also.

5. Originally Posted by General
It is homogeneous also.
@OP: To expand, the DE can be written $\displaystyle \displaystyle \frac{dy}{dx} = 1 + \frac{y}{x}$ (provided $\displaystyle x \neq 0$). I suppose the given initial condition might be a limit, as in $\displaystyle \displaystyle \lim_{x \to 0} y = -2$ .... But that condition is false in fact false since $\displaystyle \displaystyle \lim_{x \to 0} y = 0$ ....

6. The substitution $\displaystyle y=vx$ ( homogeneous equation ) provides the general solution:

$\displaystyle y=x(C+\log |x|)$

Possibly there is a typo and the initial condition is $\displaystyle y(1)=-2$ , so the particular solution would be:

$\displaystyle y=x(-2+\log |x|)$

Fernando Revilla