# indefinite integral #2

• Dec 26th 2010, 07:36 PM
Random Variable
indefinite integral #2
Challenge Problem:

$\displaystyle \int \frac{x+x^{2}}{(1+x+e^{x})^{2}} \ dx$

Moderator approved CB
• Dec 26th 2010, 07:53 PM
simplependulum
$\displaystyle \int \frac{x^2+x}{(1+x+e^x)^2} ~dx$

Sub. $\displaystyle u = 1+e^{-x}(1+x)$

$\displaystyle du = e^{-x}(1 - 1 - x ) dx = - xe^{-x} dx$

The integral

$\displaystyle = - \int \frac{e^{-x}(1+x)}{(1+e^{-x}(1+x) )^2} ( -xe^{-x}~dx)$

$\displaystyle = - \int \frac{ u-1}{u^2}~du$

$\displaystyle = - \ln|u| - \frac{1}{u} + C$

$\displaystyle = - \ln| 1+e^{-x}(1+x)| - \frac{e^x }{1+x+e^x} + C$

$\displaystyle = x - \ln|1+x+e^x| - \frac{e^x}{1+x+e^x} + C$

EDIT: Surely , they differ by a constant $\displaystyle \frac{x+1}{1+x+e^x} - ( - \frac{e^x}{1+x+e^x} ) = \frac{1+x+e^x}{1+x+e^x} = 1$
• Dec 26th 2010, 08:36 PM
Random Variable
Unless $\displaystyle \frac{x+1}{1+x+e^{x}}$ and $\displaystyle -\frac{e^{x}}{1+x+e^{x}}$ differ by a constant, something is wrong with your solution. Perhaps the way you rewrote the integrand.
• Dec 26th 2010, 09:01 PM
TheCoffeeMachine
Quote:

Originally Posted by Random Variable
Unless $\displaystyle \frac{x+1}{1+x+e^{x}}$ and $\displaystyle -\frac{e^{x}}{1+x+e^{x}}$ differ by a constant, something is wrong with your solution. Perhaps the way you rewrote the integrand.

$\displaystyle \displaystyle \left(\frac{x+1}{1+x+e^{x}}\right)' = -\frac{xe^x}{(x+e^x+1)^2} = \left(-\frac{e^{x}}{1+x+e^{x}}\right)'$, so they do differ by a constant.