Home » Blog » Find the general solution of y′′ + y′ – 2y = ex / (1 + ex)

Find the general solution of y′′ + y′ – 2y = ex / (1 + ex)

Find the general solution of the second-order differential equation

    \[ y'' + y' - 2y = \frac{e^x}{1+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} and we have

    \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*}

So, we obtain particular solutions of the of the homogeneous equation v_1(x) = e^x and v_2(x) = e^{-2x} (by taking c_1 = 1, c_2 = 0 and c_1 = 0, c_2 = 1, respectively). We want to apply Theorem 8.9 (on page 330 of Apostol). From that theorem we have

    \[ R(x) = \frac{e^x}{1+e^x}. \]

Furthermore,

    \begin{align*}  W(x) &= v_1 v_2' - v_1' v_2 \\  &= e^x (-2e^{-2x}) - e^x e^{-2x} \\  &= -3 e^{-x}. \end{align*}

So, a particular solution y_1 to the non-homogeneous equation is given by

    \begin{align*}  y_1(x) &= t_1 (x) v_1(x) + t_2(x) v_2(x) \\  t_1(x) &= -\int v_2(x) \frac{R(x)}{W(x)} \, dx \\  &= -\int \left( \frac{1}{e^{2x}} \right) \left( \frac{e^x}{1+e^x} \right) \left( \frac{1}{-3e^{-x}}\right) \, dx \\  &= \frac{1}{3} \int \frac{1}{1+e^x} \, dx \\  &= \frac{1}{3} (x - \log (e^x + 1)) \\  t_2(x) &= \int v_1(x) \frac{R(x)}{W(x)} \, dx \\  &= \int e^x \left( \frac{e^x}{1+e^x} \right) \left( \frac{-e^x}{3} \right) \\  &= -\frac{1}{3} \int \left( \frac{e^{3x}}{1+e^x} \right) \, dx \\  &= -\frac{1}{3} \left(e^{-2x} \log (e^x + 1) + \frac{1}{2} e^{2x} - e^x \right). \end{align*}

So, we have a particular solution of the non-homogeneous equation given by

    \begin{align*}  y_1 &= \frac{1}{3} e^x \left( x - \log (e^x + 1) \right) - \frac{1}{3e^{2x}} \left( \frac{1}{e^{2x}} \log (e^x + 1) + \frac{1}{2} e^{2x} - e^x \right) \\  &= \frac{1}{3} xe^x - \frac{1}{3} e^x \log (e^x + 1) - \frac{1}{3} e^{-4x} \log (e^x + 1) - \frac{1}{6} + \frac{1}{3} e^{-x}. \end{align*}

Therefore, the general solution of the non-homogeneous equation is

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

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