## anonymous 5 years ago I need help to solve this dy/dx=xy+x-2y-2 // y(0)=2 thank you

1. anonymous

Hi tonijv, This is a separable equation. Factorize the right-hand side to see,$y(x-2)+(x-2)=(y+1)(x-2)$You then have,$\frac{dy}{y+1}=(x-2)dx \rightarrow \int\limits_{}^{} \frac{dy}{y+1}=\int\limits_{}^{}(x-2)dx$

2. anonymous

$\ln(y+1)=\frac{x^2}{2}-2x+c \rightarrow y=e^{\frac{x^2}{2}-2x+c}-1$That is,$y=Ae^{\frac{x^2}{2}-2x}-1$Using the boundary condition,$y(0)=Ae^0-1=2\rightarrow A=3$

3. anonymous

Your equation is then,$y=3e^{\frac{x^2}{2}-2x}$

4. anonymous

The previous comment was correct. This is a separable equation and wanted to also note a slightly different way of factorizing the RHS: $dy/dx = xy + x - 2y - 2 = x(y + 1) - 2(y+1) = (y+1) (x-2)$ Now place all of the y variables to one side and all of the x variables to the other and you obtain the integral that lokisan noted above. Upon solving this integral you should get: $\ln \left| y+1 \right|=x ^{2}/2 - 2x + C$ Now plug in the initial value conditions for x = 0 and y = 1 and solve for C to obtain: $C=\ln(2)$ Thereby, making your final answer: $\ln \left| y+1 \right|=x ^{2}/2 - 2x + \ln(2)$

5. anonymous

thanks guys is my first time here. I am lost in differentials. greetings from Barcelona

6. anonymous

No probs.

7. anonymous

I have given you the answer "implicitly" in terms of y but you can also solve this "explicitly" for y, but some professors don't mind which form you use.

8. anonymous

$y=(1/2)(x-4)(x)(y+1)+2$ The derivative of the right side of the above with respect to x is: $(1/2)(x-4)(y+1)+(1/2) (x)(y+1)$ or $x y+x-2 y-2$