Finding $\int \frac {e^x}{e^x+2}dx$

161 Views Asked by At

Find $\int \frac {e^x}{e^x+2}dx$

From simple division I got: $\frac {e^x}{e^x+2}=1 - \frac 2 {e^x+2}$ so we're left with finding $-\int \frac 2 {e^x+2}dx=-2\int \frac 1 {1+2/e^x}\cdot \frac 1 {e^x}dx$ $\star$

Take $u=\frac 2{e^x}+1$ then $du=-\frac 2{e^x} dx$ so $-\frac {du}2=\frac 1 {e^x}dx$

Back to $\star$: $(-2)(-\frac 1 2)\int \frac 1 u du=\ln(u)+c=\ln (\frac 2{e^x}+1)+c$ but the answer to this part of the integration should include $-x$.

What did I do wrong? and is there a better way?

2

There are 2 best solutions below

3
On BEST ANSWER

$$\int\frac{e^x}{e^x+2}dx=\int\frac{(e^x+2)'}{e^x+2}dx=\log(e^x+2)+C$$

and I'm not sure what $\;-x\;$ you say "must" the solution contain.

0
On

with $e^x=t$ we get $e^xdx=dt$ and our integral is $$\int\frac{dt}{t+2}=\ln(t+2)+C$$