# Easy ODE

1. Apr 22, 2010

### Kalidor

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

It's an easy first order linear inhomogenous eq. I solved it by hand with the formula that one can find anywhere AND with Mathematica, but when I take the derivative to check the solution it comes out wrong and it's freaking me out. Can anyone here post just the plain solution?

2. Apr 23, 2010

### Thaakisfox

Just use the method of variating the constant, and you get:

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

3. Apr 23, 2010

### Thaakisfox

<tex>y(x) = C\frac{e^x}{1+e^x}-\frac{2+e^{-x}}{2(1+e^x)} </tex>

4. Apr 23, 2010

### Thaakisfox

oops used the wrong brackets for math mode, so here it is:

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