We solve a second order differential equation of the type:
ay''+by'+cy=f(x)
where a=1
b=3
c=2
f(x)=1/(1+e^x)
The solution will consist of common and particular solutions and have a type:
ygen=ycom+ypart
To find a common solution we solve second order differential equation y''+3y'+2y=0 and find roots of polynomial r2+3r+2=0
Its roots
r1=2⋅1−3+32−4⋅1⋅2=2−3+1=2−3+1=−1
r2=2⋅1−3−32−4⋅1⋅2=2−3−1=2−3−1=−2
Roots are complex therefore the common solution will be ycom=C1e−x+C2e−2x
We will use the method of variation of parameters to find a particular solution
{C1′(x)y1+C2′(x)y2=0C1′(x)y1′+C2′(x)y2′=a0f(x)
y1=e−xy2=e−2xa0=1
finally we get
{C1′(x)e−x+C2′(x)e−2x=0(1)−C1′(x)e−x−2C2′(x)e−2x=1+ex1(2)
add (2) to (1) and we get
−2C2′(x)e−2x=1+ex1C2′(x)=−1+exe2x
We will make some changes and simplifications
C2′(x)=−1+exe2x+ex−ex=−ex+1ex(ex+1)+ex+1ex=−ex+ex+1ex
Let us integrate C'2
C2(x)=⎰(−ex+ex+1ex)dx=−ex+ln∣ex+1∣+C2
we multiply (1) by 2, add to (2) and get
C1′(x)e−x=1+ex1C1′(x)=1+exex
Let us integrate C'1
C1(x)=⎰(ex+1ex)dx=ln∣ex+1∣+C1
Now we add these values in our general solution for y and will get
ygen=(−ex+ln∣ex+1∣+C1)e−x+e−2x(ln∣ex+1∣+C2)
Finally we get
ygen=1+e−xln∣ex+1∣+C1e−x+e−2xln∣ex+1∣+C2e−2x
Comments