Differential equation + initial value problem

63 Views Asked by At

I am new to Differential Equations (first week!), and am stuck with the following question:

Let $~y(x)~$ be the solution of $(x+y^2)y'=y$. If $~y(0)=-2~$ then

$~a. ~~~~~y(3)=1~$

$~b. ~~~~~y(-3)=3~$

$~c. ~~~~~y(3)=-3~$

$~d. ~~~~~y(8)=2~$

$~e. ~~~~~y(0)=0~$

$~f.~$ all answers are wrong

$~g.~$ there is more than one correct answer

I have tried resolving this with the algorithm I was given in class, which leads me to $y(x)=Ce^{-y^2-x}$, and then C comes out as $\frac{-2} {e^{-4}}$. However, this does not tally with any of the answers (except $~f~$, which I doubt is true). What am I not seeing? And why is my answer wrong, despite the fact that I went according to the algorithm?

Many thanks!

1

There are 1 best solutions below

4
On

Given differential equation is $$(x+y^2)y'=y$$$$\implies x ~dy+y^2~dy=y~dx$$$$\implies x~dy-y~dx+y^2~dy=0$$$$\implies \frac{x~dy-y~dx}{y^2}+dy=0$$$$\implies -d\left(\frac{x}{y}\right)+dy=0$$ Integrating, $$-\frac{x}{y}+y=c\implies y^2-c~y-x=0$$ where $~c~$ is constant.

Given that $~y(0)=-2~$, so $~4+2c=0\implies c=-2~$

Hence $$y^2+2y-x=0\implies y=\frac{-2\pm\sqrt{4+4x}}{2}=-1\pm\sqrt{1+x}$$ Now since the initial condition is $~y(0)=-2~$, which is given by the part $$y=-1-\sqrt{1+x}$$so we neglect the other value of $~y~$.

Hence $~y(3)=-3~$; $~y(-3)=-1- i~\sqrt 2~$; $~y(8)=-4~$.

So only option $~(c)~$ is correct.