Home » Blog » Find the general solution of y′′ + y′ – 2y = ex

Find the general solution of y′′ + y′ – 2y = ex

Find the general solution of the second-order differential equation

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

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


The general solution of the homogeneous equation

    \[ y'' + y' - 2y = 0 \]

is given by Theorem 8.7 with a = 1 and b = -2. This gives us d = a^2 - 4b = 9; hence, k = \frac{1}{2} \sqrt{d} = \frac{3}{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{3}{2}x} + c_2 e^{-\frac{3}{2}x} ) \\  &= c_1 e^x + c_2 e^{-2x}. \end{align*}

To find a particular solution of y'' + y' -2y = e^x assume y_1 = p(x)e^x is a solution. Then,

    \begin{align*}  y_1' &= p'(x) e^x + p(x) e^x \\  y_1'' &= p''(x) e^x + 2p'(x) e^x + p(x) e^x. \end{align*}

Therefore,

    \begin{align*}  &&p''(x) e^x + 2p'(x) e^x + p(x) e^x + p'(x) e^x + p(x) e^x - 2p(x)e^x &= e^x \\ \implies && 3p'(x) + p''(x) &= 1. \end{align*}

Now, let p(x) = Ax + B, then we have

    \[ 3A = 1 \quad \implies \quad A = \frac{1}{3} \quad \implies \quad p(x) = \frac{1}{3} x. \]

Thus, $y_1 = \frac{1}{3} x e^x. \] Hence, the general solution is given by

    \[ y = c_1 e^x + c_2 e^{-2x} + \frac{1}{3} x e^x = e^x \left( \frac{1}{3} x + c_1 \right) + c_2 e^{-2x}. \]

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