Initial value problem

colerelm

New member
Joined
Oct 24, 2011
Messages
33
How do I start solving an initial value problem such as this one:

y' = 2y^2 + xy^2, y(0) = 1

I've attempted to solve it but I get stuck at the first step...I try getting it in the form of dy/dx + Py = Q but I don't know how I would get a Q value in this case. This is what I get when I try getting it into the aforementioned form:

dy/dx + y^2*(2+x) = 0

Does that make any sense? Can anyone please step me through the process? Thanks a lot.
 
The ODE associated with the IVP is separable. ;)
 
No, we are given to solve:

dydx=2y2+xy2\displaystyle \dfrac{dy}{dx}=2y^2+xy^2 where y(0)=1\displaystyle y(0)=1

Now, if we factor the right side of the ODE, we obtain:

dydx=y2(x+2)\displaystyle \dfrac{dy}{dx}=y^2(x+2)

Now divide through by y2\displaystyle y^2, thereby eliminating the trivial solution y0\displaystyle y\equiv0, to obtain:

1y2dydx=x+2\displaystyle \dfrac{1}{y^2}\dfrac{dy}{dx}=x+2

Now, integrate with respect to x\displaystyle x:

1y2dy=x+2dx\displaystyle \displaystyle \int\frac{1}{y^2}\,dy=\int x+2\,dx

Can you proceed from here?
 
Last edited:
Yeah, I integrate and get -1/y = 2x + (x^2/2) + C. I don't know where to go from there though...
 
Yeah, I integrate and get -1/y = 2x + (x^2/2) + C. I don't know where to go from there though...
The problem stated that y(0) = 1,
so if you substitute y=1 and x=0 in the solution, you will have an equation to solve for the explicit value of C.
[Don't neglect the minus sign on the -1/y term.]
 
Ah, that makes sense, thanks. I got C = -1, is that right?

Edit: The solution shows that the answer is:

y(x) = -2/(x^2 + 4x - 2) and x=-2 is the minimum, but how?

I ended up getting y(x) = -2/(2C + x(x+4)) and the minimum being -1...
 
Last edited:
Ah, that makes sense, thanks. I got C = -1, is that right?

Edit: The solution shows that the answer is:

y(x) = -2/(x^2 + 4x - 2) and x=-2 is the minimum, but how?

I ended up getting y(x) = -2/(2C + x(x+4)) and the minimum being -1...

Yes, C = -1 is correct. And so we have:

1y=2x+x221=x2+4x22\displaystyle \displaystyle -\frac{1}{y}=2x+\frac{x^2}{2}-1=\frac{x^2+4x-2}{2}

Hence:

y(x)=2x2+4x2\displaystyle \displaystyle y(x)=-\frac{2}{x^2+4x-2}

Now, to find any extrema, we equate the derivative to zero:

dydx=2(x+2)(x2+4x2)2=0\displaystyle \displaystyle \frac{dy}{dx}=\frac{2(x+2)}{(x^2+4x-2)^2}=0

This implies x=2\displaystyle x=-2

The first derivative test shows that this is a local minimum.
 
Top