Differential equation 2nd order I want to solve a linear inhomogeneous differential-equation of the (second?) order but I don't know where to start and what to do.
We have the differential equation: $y''-y+x^2=0$ with the initial values: $y(0)=-1$ and $y'(0)=1$.
I appreciate any help.
 A: Actually method of undetermined coefficient mentioned above is not so hard to understand. It is actually used for finding a particular solution. You can find the homogeneous solution by using the homogeneous equation $y''-y = 0$ which has the characteristic equation $\lambda^2-1 = 0$
So you have a homogeneous solution 
$$y_h = e^x+e^{-x}+C$$ where $C$ is a constant.
Then in order to find a particular solution, you simply make a general guess first. In this case, for example I would guess $y_p = Ax^2+Bx+D$ because we have, 
$$y_p'' = 2A$$ 
$$-y_p = -Ax^2 - Bx - D$$ 
so when you add them up, notice you will get  something with the term $x^2$ and also some constant like $2A-C$. So, now you have the equation, 
$$2A - Ax^2 - Bx - D = -x^2$$ 
so you have $A = 1$, $B = 0$ and $D = 2$. Then there you have the particular solution $$y_p = x^2+2$$
Your general solution $y = y_p + y_h$ so the answer is $$y = e^x+e^{-x}+x^2+2+C$$
The reason why the method is called "undetermined coefficients" is, as you can see, while finding the particular solution, you make a guess (it is called "candidate solution" sometimes) with some coefficients that are not determined yet. Then you determine them by using your differential equation.
I also want to add that method of undetermined coefficients is mostly used when you have a constant coefficient differential equation. Because otherwise, making a guess would be really hard. This is where other methods mentioned above takes the place.
