# Need help solving a differential equation

1. Jan 25, 2010

### lilmul123

1. The problem statement, all variables and given/known data

dy/dx = 2y + x^2 + 5.

This is a linear differential equation, so I know I need to use the definition of it which is y*e^integral(P(x)) dx = integral(f(x)*e^int(P(x)) dx.

I tried to get it into this form, so I tried to change the equation to dy/dx + -2y = x^2 + 5. Eventually, the right side of my linear equation for solving becomes the integral of (x^2 + 5)*e^-2x dx. The 5e^-2x dx is easy to integrate, but x^2*e^-2x dx is not. Did I form my initial equation correctly or am I really supposed to find the integral of that?

2. Jan 25, 2010

### LCKurtz

Use integration by parts twice to integrate x2e-2x.

3. Jan 25, 2010

### lilmul123

Yeah, I figured it out after looking at it for a while. Thank you.