# Find a general solution y (x) of non-homogeneous linear equations of the 2nd order with constant coefficients and special right side. How to solve? (pictures below) Thank you a lot!

## here: this should be solution

Jun 21, 2018

Solve the differential equation:

$y ' ' - 4 y ' = - 12 {x}^{2} + 6 x - 4$

This is a non-homogeneous linear equation with constant coefficients, so we start by solving the characteristic equation of the corresponding homogeneous equation:

$y ' ' - 4 y ' = 0$

${\lambda}^{2} - 4 \lambda = 0$

$\lambda \left(\lambda - 4\right) = 0$

$\lambda = \left\{\begin{matrix}0 \\ 4\end{matrix}\right.$

So the general solution of the homogeneous equation is:

$y = {C}_{1} {e}^{4 x} + {C}_{2}$

In the complete equation, the known term is in the form ${e}^{\alpha x} p \left(x\right)$ where $\alpha = 0$ and $p \left(x\right)$ is a polynomial of second degree.

As $\alpha$ equals one of the solutions of the characteristic equation we must look for a particular solution in the form:

$\overline{y} \left(x\right) = x {e}^{\alpha x} q \left(x\right)$

where $q \left(x\right)$ is also a polynomial of second degree, whose coefficients are determined by substituting $\overline{y}$ in the equation:

$\overline{y} = x \left(a {x}^{2} + b x + c\right) = a {x}^{3} + b {x}^{2} + c x$

$\overline{y} ' = 3 a {x}^{2} + 2 b x + c$

$\overline{y} ' ' = 6 a x + 2 b$

$\overline{y} ' ' - 4 \overline{y} ' = 6 a x + 2 b - 12 a {x}^{2} - 8 b x - 4 c$

Then:

$- 12 a {x}^{2} + \left(6 a - 8 b\right) x + \left(2 b - 4 c\right) = - 12 {x}^{2} + 6 x - 4$

and equating the coefficients of the same degree in $x$:

$\left\{\begin{matrix}a = 1 \\ 6 a - 8 b = 6 \\ 2 b - 4 c = - 4\end{matrix}\right.$

$\left\{\begin{matrix}a = 1 \\ b = 0 \\ c = 1\end{matrix}\right.$

So:

$\overline{y} = {x}^{3} + x$

and the complete solution is:

$y \left(x\right) = {C}_{1} {e}^{4 x} + {C}_{2} + {x}^{3} + x$