# Solving $y^{(2)}-5y^{(1)}+4y=\frac{1}{e^x+1}.$

calculusordinary differential equations

The equation is the following

$$y^{(2)} – 5y^{(1)} + 4y = \frac{1}{e^x + 1}$$

I’ve just started studying these kind of equations and I know of only two method to solve it, they both involve the following first step:

Find 2 independent solutions of the associated homogeneous equation. I have done it through the characteristic polynomial and obtained the following 2 solutions:

$$y_1(x) = e^x \quad y_2(x)= e^{4x}$$

Now, 2 different possibilities I’m aware of are:

A) If the $$f(x)$$ on the right is of the kind $$e^{kx}P_m(x)$$, with $$P_m$$ polynomial of degree m, or of the kind $$e^{kx}(P_m(x)\sin(\omega x)+R_k(x)\cos(\omega x))$$, then we know that the equation admits certain solutions similar in form to the $$f(x)$$, that we need to specify finding the constants of the polynomials.
The $$f(x)$$ in this case doesn’t belong to either of the types, still I tried this method imposing $$e^z = \frac{1}{e^x+1}$$ but I couldn’t make it work.

B)The variation of parameters method. I solved the system to find $$\gamma_1^{(1)}(x)$$ and $$\gamma_2^{(1)}(x)$$ obtaining

$$\gamma_1^{(1)}(x) = -\frac{1}{3(e^x+1)}$$

$$\gamma_2^{(1)}(x) = \frac{1}{3e^{3x}(e^x+1)}$$

Still, I wasn’t able to integrate the second function. I searched online for a solution and it came out very complicated which tells me that this isn’t the way is was intended to be solved (cause it was part of an exam and it shouldn’t take more than half an hour).

Can you show me how it’s done? Thanks

You can also proceed as follows: \begin{align*} y'' - 5y' + 4y = \frac{1}{1 + e^{x}} & \Longleftrightarrow (y'' - 4y') - (y' - 4y) = \frac{1}{1 + e^{x}}\\\\ & \Longleftrightarrow (y' - 4y)' - (y' - 4y) = \frac{1}{1 + e^{x}}\\\\ & \Longleftrightarrow z' - z = \frac{1}{1 + e^{x}}\\\\ & \Longleftrightarrow (e^{-x}z)' = \frac{1}{e^{2x} + e^{x}} \end{align*}