# Help simplifying a solution to a differential equation

1. Jan 31, 2010

### Raziel2701

So I'm in the process of solving the following differential equation:

$$\frac{dy}{dx}=2y^2 +xy^2$$

with initial condition y(0)=1

I worked it out until I got to the following equation:

$$y^2 +y =x^2 -4$$

So now my problem is that I can't isolate y as a function of x in order to move on with the problem and determine where the solution attains its minimum value.

I've tried completing the square and I noticed that the RHS(right hand side) is a difference of squares and I expanded that out but I have no clue how to isolate that y. Now I'm tired and desolate, and I'd like to be pointed back on the right direction.

It's frustrating to be thwarted by algebraic manipulations. :(
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Jan 31, 2010

### bennyska

so i could be totally wrong on this, i'm here myself to get help with simple differential equations, but here goes:

so you have

dy/dx = 2y2 + x*y2, with y(0) = 1

try factoring it as dy/dx = y2 ( 2 + x)
then you separate the variables.
does that help?

p.s. could you maybe show how you got "the following equation"? i have no idea where you got that. i think you may have made a mistake, but like i said, i'm here for help myself.

Last edited: Jan 31, 2010
3. Jan 31, 2010

### HallsofIvy

I agree with bennyska. I get a completely different solution that you do. Please show us how you got that.

4. Jan 31, 2010

### Raziel2701

Man I got mixed up. The original differential equation is:
$$\frac{dy}{dx}=\frac{2x}{1+2y}$$ with initial condition y(2)= 0

I've been working on this mountain load of homework last night that I got my equations all wrong, I'm sorry.

So with that in mind, after I separate and integrate I get:

$$y^2 +y=x^2-4$$

Now I'd like to know how to isolate y, because I haven't been able to, I am not sure what I have to expand or what. I'm just, nonplussed.

5. Jan 31, 2010

### MarcMTL

Again, not sure what you did to get that answer. Where did the -4 come from on the dx side?

You should seperate $$2xdx = (1+2y)dy$$

6. Jan 31, 2010

### Raziel2701

Yes I separated like you did and integrated, obtaining:

$$y+y^2=x^2 +c$$

The initial condition is y(2) = 0, the one I posted in my first post is from a different problem I got mixed in. Thus plugging 2 for x, and 0 for all y, I get that c=-4, which I then substitute into the equation we have so far and I get:

$$y+y^2=x^2 -4$$

Which I've tried to manipulate to isolate y, but have been unsuccessful so far.

7. Jan 31, 2010

### Staff: Mentor

Write your equation as y2 + y - x2 + 4 = 0.

This is quadratic in y, with a = 1, b = 1, and c = 4 - x2. Just plug these into the quadratic formula to get two solutions for y(x).

8. Jan 31, 2010

### Raziel2701

I was never taught I could do this kind of stuff with the quadratic equation. I feel ripped off :p

Thanks Mark44!