Find a Solution using Green's Function Find a solution to the given initial-value problem using Green's functions
$$y"+3y'+2y= \frac{1}{1+e^x}; y(0)=0,y'(0)=1$$
So I have figured out that 
$$y_c=e^{-x}-e^{-2x}$$
Now I am having issues figuring out what $y_p$ is. This is what I have so far:
$$y_1=e^{-x}, y_2=e^{-2x},$$
so 
$$W(y_1, y_2)=-e^{-3x}.$$
$$G(x,t)=\frac{e^{-t}e^{-2x}-e^{-x}e^{-2t}}{-e^{-3x}} = -e^{-t}e^{x}+e^{-2t}e^{2x}$$
$$y_p=\int^x_0 G(x,t)f(t)dt$$
$$y_p=-e^x \int^x_0 \frac{e^{-t}}{1+e^t}dt+e^{2x} \int^x_0 \frac{e^{-2t}}{1+e^t}dt$$
So 
$$y_p=-\ln(e^{-x}+1)(e^x+e^{2x})-\frac{e^{2x}}{2}+\frac{1}{2}+(e^{x}+e^{2x})\ln(2)$$
Is this correct?
 A: We are given:
$$y''+3y'+2y= \dfrac{1}{1+e^x}, ~ y(0)=0, ~y'(0)=1$$
The homogeneous (complementary) solution is given by: $y_c=e^{-x}-e^{-2x}$
For variation of parameters, we take: $y_1=e^{-x}, ~~y_2= -e^{-2x}$
Thus, the Wronskian $= W(y1, y2) = W(e^{-x},-e^{-2x}) = e^{-3x}$, so
$\displaystyle G(x,t)= \frac{y_1(t)y_2(x) - y_1(x)y_2(t)}{W(x)} = \frac{e^{-t}(-e^{-2x}) - e^{-x}(-e^{-2t})}{e^{-3x}} = e^{2x}e^{-2t} - e^xe^{-t}$, thus:
$\displaystyle y_p=\int^x_0 G(x,t)f(t)dt = -e^x \int^x_0 \frac{e^{-t}}{1+e^t}dt+e^{2x} \int^x_0 \frac{e^{-2t}}{1+e^t}dt$
We have:


*

*$\displaystyle -e^x \int^x_0 \frac{e^{-t}}{1+e^t}dt = -e^{-x}\left[\ln(e^{-t}+1)-e^{-t}\right]$ evaluated over $(t, 0, x)$, yields: $\displaystyle-e^{-x}\left[\left(\ln(e^{-x} + 1)-e^{-x}\right) - \left(\ln(2) - 1\right)\right]$

*$\displaystyle e^{2x} \int^x_0 \frac{e^{-2t}}{1+e^t}dt = e^{2x}\left[-\frac{e^{-2t}}{2}+e^{-t}-\ln(e^{-t} +1) \right]$, evaluated over $(t, 0, x)$, yields: $\displaystyle e^{2x}\left[\left(-\frac{e^{-2x}}{2} + e^{-x} - \ln(e^{-x}+1)\right) - \left(-\frac{1}{2} + 1 - \ln 2\right) \right]$


Do you see the issues now over those limits? Can you now do the algebra to combine all like terms and find:
$$y = y_c + y_p?$$
The final answer should be (after simplifications) and you can compare to the other answer:
$$y(x) =  \left(e^{-x}+e^{-2 x}\right) \ln\left(\dfrac{1}{2} (e^x+1)\right)$$
A: You are doing fine except that you should delay finding the constants untill you construct the final solution 

$$ y = y_c + y_p = 
 \ln  \left( {{\rm e}^{x}}+1 \right) {
{\rm e}^{-x}}+\ln  \left( {{\rm e}^{x}}+1 \right) {{\rm e}^{-2\,x}}-{
c_1{\rm e}^{-2\,x}}+c_2{{\rm e}^{-x}}\longrightarrow(1).$$ 

You should have the following answer  
$$ y \left( x \right) = ({{\rm e}^{-x}}+{\rm e}^{-2x} )\ln  \left( {{\rm e}^{x}}+1 \right)-{{\rm e}^{-2\,x}}\ln  \left( 2 \right) -{{\rm e}^{-x}}\ln  \left( 2 \right). $$
Added: Here is how you advance. Using the first initial condition, subs $x=0$ in $(1)$ and equate it tozero gives
$$ c_1-c_2=2\ln(2). $$
Diff. $(1)$ and using the second initial condition yields the second equation
$$ 2c_1-c_2=3\ln(2). $$
Now, just solve the two equations to find $c_1,c_2$ and subs back in $(1)$ to get the desired answer.
