# Second order inhomogeneous differentiel equation.

1. Aug 23, 2011

### Lindsayyyy

Hi everyone,

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

I shall find the solution for the following differential equation:
$$y''(x)+2y'(x)+y(x)=x^{2}+3$$

2. Relevant equations
-

3. The attempt at a solution
At first solved the homogenous equation and found the general solution for the homogenous as the following:

$$y(x)=e^{-x}+xe^{-x}$$

Now I have to find an ansatz function I guess, but I don't know how to do this. I tried At³ but didn't work. Can someone help me?

2. Aug 23, 2011

### Quinzio

Try
$$y=ax^2+bx+c$$

3. Aug 23, 2011

### Lindsayyyy

Thanks, I guess that worked if I've done it correctly

4. Aug 23, 2011

### vela

Staff Emeritus
It's easy enough to check. Just plug your solution into the LHS of the equation and see if you get the RHS when you simplify.