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

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

Find the general solution of the second-order differential equation

    \[ y'' - y= \frac{2}{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 = 0 \]

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

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

So, we obtain particular solutions of the of the homogeneous equation v_1(x) = e^x and v_2(x) = e^{-x} (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{2}{1+e^x}. \]

Furthermore,

    \begin{align*}  W(x) &= v_1 v_2' - v_1' v_2 \\  &= e^x (-e^{-x}) - e^x e^{-x} \\  &= -2. \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 \frac{1}{e^x + e^{2x}} \, dx \\  &= \log (e^x + 1) - e^{-x} - x \\  t_2(x) &= \int v_1(x) \frac{R(x)}{W(x)} \, dx \\  &= - \int \frac{e^x}{1+e^x} \, dx \\   &= -\log (e^x + 1) \end{align*}

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

    \[ y_1 = e^x \log (e^x + 1) - 1 - xe^x - e^{-x} \log (e^x + 1). \]

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

    \begin{align*}   y &= e^x (c_1 - x + \log(e^x+1)) - e^{-x} (-c_2 + \log (e^x + 1)) - 1 \\  &= c_1 e^x + c_2 e^{-x} + (e^x + e^{-x})\log(e^x + 1) - xe^x - 1. \end{align*}

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