Homework Help: First-Order Linear Differential Equation

1. Sep 1, 2011

Dr.Doom

1. The problem statement, all variables and given/known data
y'=1+x+y+xy, y(0)=0

2. Relevant equations
$\frac{dy}{dx}$+P(x)y=Q(x)
$\rho$(x)=e$\int(P(x)dx)$

3. The attempt at a solution
My main problem is correctly getting it into the form, $\frac{dy}{dx}$+P(x)y=Q(x). I know what to do from there.
First, I tried y'-(y+xy)=1+x, where P(x)=1+x $\rightarrow$ $\rho$(x)=e$\int(1+x)$=ex+x2/2.
When i multiply both sides by $\rho$(x), i don't come out with anything that i can easily integrate. Any suggestions would be much appreciated!

2. Sep 1, 2011

Tomer

Meaning, your P(x) is wrong.

Notice you wrote: y' - (y+xy) = 1+x.
To understand what's P(x), you need to see what the coefficient of y is:
y' -(1+x)y = 1+x.

What's the coefficient of y?

3. Sep 1, 2011

Dr.Doom

-(1+x) is the coefficient of y. I went back and corrected this but I am still ruining into a problem when integrating the right hand side of my function: (1+x)e-x-(x2/2)

4. Sep 1, 2011

Tomer

I doubt this can be integrated. Maybe you can leave the final answer in an integral form?

5. Sep 1, 2011

Dr.Doom

Well, it's an initial value problem so I'm thinking there's something more to it. The textbook gives the answer as y(x)=-1+ex+x2/2

6. Sep 1, 2011

rude man

y' = 1 + x + y + xy
y' = 1 + x + y(1+x)
y' = (1+x)(1+y)
dy/(1+y) = (1+x)dx

Integrate both sides etc. Don't forget arb. constant which is found by y(0) = 0.

Note: always try sep. of variables first.

7. Sep 1, 2011

Tomer

Or do that :-)

8. Sep 1, 2011

Dr.Doom

Thanks for the help, guys!