# Solving ordinary differential equations of order 2

I'm struggling solving this linear ODE:

$$y''(x) + 2y'(x) = -4$$

I solved the homogeneous solution for this equation: $$c_1 + c_2 e^{-2x}$$ for some constants $$c_1$$, $$c_2$$;

But I'm struggling with the non-homogeneous part: If I choose $$y_p(x) = C$$ for some constant $$C$$, then $$y_p' = 0$$, $$y_p'' = 0$$. Plugging this equations into the original one, this would yield: $$0 = -4$$.

What am I doing wrong! Thanks a lot!

• You can follow the hint of Robert Z. For this particular second-order ODE it might be easier to reduce it to first order, as $y$ does not appear: define $z := y'$ to obtain a first-order linear ODE for $z$. Solve for $z$, then integrate once to obtain $y$. – Christoph Jan 20 at 9:38

Hint. Since $$0$$ is a solution of multiplicity $$1$$ of the characteristic equation $$z^2+2z=0$$ and $$-4$$ is a polynomial of zero degree then, by the Method of undetermined coefficients, you should try as a particular solution the following form $$y_p(x)=x\cdot C$$ where $$C$$ is a constant to be determined.