What is the general solution of the differential equation? : (d^2y)/(dx^2)- y = 1/(1+e^x)

1 Answer
Sep 4, 2017

y(x) = Ae^x+Be^(-x) -1/2xe^x - 1/2 - 1/2e^xln(1+e^x) -1/2 e^-x ln(1+e^x)

Explanation:

We have:

(d^2y)/(dx^2)- y = 1/(1+e^x) ..... [A]

This is a second order linear non-Homogeneous Differentiation Equation. The standard approach is to find a solution, y_c of the homogeneous equation by looking at the Auxiliary Equation, which is the quadratic equation with the coefficients of the derivatives, and then finding an independent particular solution, y_p of the non-homogeneous equation.

Complementary Function

The homogeneous equation associated with [A] is

y'' -y = 0

And it's associated Auxiliary equation is:

m^2 -1 = 0

Which has distinct real solutions m=+-1

Thus the solution of the homogeneous equation is:

y_c = Ae^x+Be^(-x)

Particular Solution

With this particular equation [A], the interesting part is find the solution of the particular function. We would typically use practice & experience to "guess" the form of the solution but that approach is likely to fail here. Instead we must use the Wronskian (or variation of parameters). It does, however, involve a lot more work:

Once we have two linearly independent solutions say y_1(x) and y_2(x) then the particular solution of the general DE;

ay'' +by' + cy = p(x)

is given by:

y_p = v_1y_1 + v_2y_2 \ \ , which are all functions of x

Where:

v_1 = -int \ (p(x)y_2)/(W[y_1,y_2]) \ dx
v_2 = \ \ \ \ \ int \ (p(x)y_1)/(W[y_1,y_2]) \ dx

And, W[y_1,y_2] is the wronskian; defined by the following determinant:

W[y_1,y_2] = | ( y_1,y_2), (y_1',y_2') |

So for our equation [A]:

p(x) = 1/(1+e^x)
y_1 \ \ \ = e^x \ \ \ => y_1' = e^x
y_2 \ \ \ = e^(-x) => y_2' = -e^-x

So the wronskian for this equation is:

W[y_1,y_2] = | ( e^x,,e^-x), (e^x,,-e^-x) |
" " = (e^x)(-e^-x) - (e^x)(e^-x)
" " = -2

So we form the two particular solution function:

v_1 = -int \ (p(x)y_2)/(W[y_1,y_2]) \ dx

\ \ \ = -int \ (1/(1+e^x) (e^-x))/(-2) \ dx
\ \ \ = 1/2 \ int \ e^-x/(1+e^x) \ dx

We can evaluate this integral using a substitution:

Let u=e^x => (du)/dx = e^x and e^(-x)=1/u then
v_1 = 1/2 \ int \ (1/u)/(1+u) \ (1/u) \ du
\ \ \ = 1/2 \ int \ 1/(u^2(1+u)) \ du

No we decompose the integrand into partial fractions:

1/(u^2(1+u)) -= a/u + b/u^2+c/(1+u)
" " = (au(1+u) + b(1+u) + c u^2) / (u^2(1+u))
=> 1 -= au(1+u) + b(1+u) + c u^2

Where a,b,c are constants to be determine. Using substitution we have:

Put u=0 => 1 = b
Put u=-11 => 1 = c
Coeff(u^2): 0 = a+c => a=-1

Thus:

v_1 = 1/2 \ int \ -1/u + 1/u^2+1/(1+u) \ du
\ \ \ = 1/2 \ { -ln|u| - 1/u+ln|1+u| }
\ \ \ = 1/2 \ { -ln|e^x| - 1/e^x+ln|1+e^x| }
\ \ \ = 1/2 \ { -x - e^-x+ln(1+e^x) }
\ \ \ = -1/2x - 1/2e^-x + 1/2ln(1+e^x)

And;

v_2 = \ \ \ \ \ int \ (p(x)y_1)/(W[y_1,y_2]) \ dx

\ \ \ = int \ (1/(1+e^x) e^x)/(-2) \ dx
\ \ \ = -1/2 \ int \ (e^x)/(1+e^x) \ dx

We can similarly evaluate this integral using a substitution:

Let u=e^x => (du)/dx = e^x then
v_2 = -1/2 \ int \ (u)/(1+u) \ (1/u) \ du
\ \ \ = -1/2 \ int \ (u)/(1+u) \ (1/u) \ du
\ \ \ = -1/2 \ int \ (1)/(1+u) \ du
\ \ \ = -1/2 \ ln|1+u|
\ \ \ = -1/2 \ ln|1+e^x|
\ \ \ = -1/2 \ ln(1+e^x)

And so we form the Particular solution:

y_p = v_1y_1 + v_2y_2
\ \ \ = (-1/2x - 1/2e^-x + 1/2ln(1+e^x))(e^x) + (-1/2 \ ln(1+e^x))(e^-x)

\ \ \ = -1/2xe^x - 1/2 - 1/2e^xln(1+e^x) -1/2 e^-x ln(1+e^x)

Which then leads to the GS of [A}

y(x) = y_c + y_p
\ \ \ \ \ \ \ = Ae^x+Be^(-x) -1/2xe^x - 1/2 - 1/2e^xln(1+e^x) -1/2 e^-x ln(1+e^x)