Solve $y '' + 3y ' + 2y = \frac{1}{e^{x} + 1}$

I am trying to solve this differential equation. $$y'' + 3y' + 2y = \frac{1}{e^{x} + 1}$$

I know that I have to solve $$x^2+3x+2=0$$

when the solutions of this equation are $(x_1,x_2) = (-2,-1)$

so $$y_0(x) = c_1 e^{-2x}+c_2e^{-x}$$

Then I am looking for a solution of $y(x) = K \frac{1}{e^x +1}$ and I calculate $y'$ and $y''$.

The problem is that I end up to nowhere. Can someone help me?

-
I assume the second $y''$ should be $y'$, right? –  GEdgar Dec 11 '11 at 18:03
So ... undetermined coefficients is not well-suited to this. But: What do you get when you use "variation of parameters"? –  GEdgar Dec 11 '11 at 18:05
Yes it is $y'$, I fixed it. I don't get something because I cannot find $K$. –  akimo_uki Dec 11 '11 at 18:37
You can "find $K$" (that is, use the method of undetermined coefficients) only when the right-hand-side has certain special forms. This is not one of those forms. There is no $K$ that will work. So (unless you can understand user21035's answer) look up "variation of parameters" in a DE textbook. –  GEdgar Dec 11 '11 at 19:51
Aside from the solution of the homogeneous equation, you should consider the solution in the form $y=c_1(x)e^{-2x}+c_2(x)e^{-x}$ and solve for the equations you get for $c_1$ and $c_2$. –  Jon Dec 11 '11 at 19:55

$y''+3y'+2y=\frac1{e^x+1}$

$z=y'+2y,z'=y''+2y'$

$y''+3y'+2y=y''+2y'+y'+2y=z'+z=\frac1{e^x+1}$

$e^xz'+e^xz=\frac{e^x}{e^x+1}$

$e^xz=\int \frac{e^x}{e^x+1}dx=\ln (e^x+1)+c$

$z=e^{-x}\ln(e^x+1)+ce^{-x}$

$y'+2y=e^{-x}\ln(e^x+1)+ce^{-x}$

$e^{2x}y'+2e^{2x}y=e^x\ln(e^x+1)+ce^x$

$e^{2x}y=\int e^x\ln(e^x+1)+ce^xdx$

$t=e^x+1,dt=e^xdx$

$\int e^x\ln(e^x+1)dx=\int \ln tdt=t\ln t-t+c_2=(e^x+1)\ln(e^x+1)-e^x+c_3$

$e^{2x}y=(e^x+1)\ln(e^x+1)-e^x+ce^x+c_3=(e^x+1)\ln(e^x+1)+k_1e^x+k_2$

$y=\frac{e^x+1}{e^{2x}}\ln (e^x+1)+k_1e^{-x}+k_2e^{-2x}$

Unless I made any mistakes in there, that should be the complete solution.

-

Here is one of several methods. Let $G(x)$ (a Green function of your equation) be such that

1. $G$ solves the homogeneous equation away from $x=0$

2. $G$ is continuous and there is a jump of $G'$ by $1$ at $x=0$.

For example we can take $G(x)=-e^{-2|x|}/4$. A solution of the inhomogeneous equation is then $$y(x)=\int_{-\infty}^\infty G(t) \frac{1}{e^{x-t}+1} dt=-\frac{1}{4}\int_0^\infty\frac{e^{-2t}}{e^{x-t}+1}+\frac{e^{-2t}}{e^{x+t}+1} dt.$$

-

let homogeneous solutions of this problem y1 and y2. and y1=exp(x) and y2=exp(2x) and let the nonhomogeneous solution of this problem yp. and let yp u1*exp(x) +u2*exp(2x) then, wronskian of exp(x) and exp(2x) = exp(3x)

then, differentiation of u1 = -exp(-3x)exp(2x)(1/(exp(x)+1)) and differentiation of u2 = exp(-3x)exp(x)(1/(exp(x)+1))

u can integrate differentiation of u1 and u2 and u can get u1, u2

finally, the solution is c1*y1+c2*y2+yp

-
Can't think of too many things worse that using u, u1, u2 to mean the three things that you intend them to mean. –  The Chaz 2.0 Dec 11 '11 at 18:14
@The: me2${}{}$ –  TonyK Dec 11 '11 at 18:19