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


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},$$


$$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$$



Is this correct?

  • $\begingroup$ I am now beginning to doubt that :) $\endgroup$ – math101 Jun 18 '13 at 21:04
  • $\begingroup$ Yes I have used them $\endgroup$ – math101 Jun 18 '13 at 21:06
  • $\begingroup$ Oh yup. My mistake there. Thanks for pointing that out:) $\endgroup$ – math101 Jun 18 '13 at 21:10
  • $\begingroup$ @Amzoti what about $y_p$ $\endgroup$ – math101 Jun 18 '13 at 21:21
  • $\begingroup$ Is that better? $\endgroup$ – math101 Jun 18 '13 at 21:46

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)$$

  • $\begingroup$ Nice work (indeed messy!)!! (+) $\endgroup$ – amWhy Jun 19 '13 at 1:40
  • $\begingroup$ @Amzoti Wow, Thanks so much. I really appreciate that. Now I see where I went wrong :) $\endgroup$ – math101 Jun 19 '13 at 1:51

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.

  • $\begingroup$ I am not all that knowledgeable in this area but in my textbook we find the constants in the beginning. Also have you used Green's Function since I am not sure how you got a totally different $y_p$ than I have. Did you simplify the answer? $\endgroup$ – math101 Jun 18 '13 at 21:14
  • $\begingroup$ @math101: As I said you were doing fine. You found the solution of the homogenous ode and the particular solution using Green's function technique. Note that, you are not solving a homogenous ode with initial condition instead you are solving a non homogenous ode with initial conditions and I already pointed out how you should have advanced. $\endgroup$ – Mhenni Benghorbal Jun 18 '13 at 21:54
  • $\begingroup$ But How did you get $y_p=\ln(e^x+1)(e^{-x}+e^{-2x})$ $\endgroup$ – math101 Jun 18 '13 at 22:29
  • $\begingroup$ @math101: Make sure you got the right $y_p$. I did not have a close look at your Green's function technique. However there are other techniques to find $y_p$. $\endgroup$ – Mhenni Benghorbal Jun 18 '13 at 22:34
  • 1
    $\begingroup$ Thanks for helping me :) I really appreciate it $\endgroup$ – math101 Jun 18 '13 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.