Home » Blog » Find the general solution of y′′ + y′ = x2 + 2x

Find the general solution of y′′ + y′ = x2 + 2x

Find the general solution of the second-order differential equation

    \[ y'' + y' = x^2 + 2x. \]

If the solution is not valid everywhere, describe the interval on which it is valid.


The general solution of the homogeneous equation

    \[ y'' + y' = x^2 + 2x \]

is given by Theorem 8.7 with a = 1 and b = 0. This gives us d = a^2 - 4b = 1; hence, k = \frac{1}{2} \sqrt{d} = \frac{1}{2}. Thus,

    \begin{align*}  y &= e^{-\frac{ax}{2}} (c_1 e^{kx} + c_2 e^{-kx} ) \\  &= e^{-\frac{x}{2}} (c_1 e^{\frac{x}{2}} + c_2 e^{-\frac{x}{2}} ) \\  &= c_1 + c_2 e^{-x}. \end{align*}

To find a particular solution of y'' + y' = x^2 + 2x let y_1 = Ax^3 + Bx^2 + Cx + D. Then,

    \begin{align*}  y_1' &= 3Ax^2 + 2Bx + C \\  y_1'' &= 6Ax + 2B. \end{align*}

Therefore,

    \[ y'' - y' = x^2 + 2x \quad \implies \quad 6AX + 2B - 3Ax^2 - 2Bx -C = x^2 + 2x. \]

Setting the coefficients of like powers of x to be equal and solving for the constants we get

    \[ A = \frac{1}{3}, \qquad B = 0, \qquad C = 0. \]

By Theorem 8.8 (page 330 of Apostol) the general solution of the given differential equation is then

    \[ y = c_1 + c_2e^{-x} + \frac{1}{3}x^3. \]

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):