# indefinite integral #2

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

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

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

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

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

The integral

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

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

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

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

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

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

Originally Posted by Random Variable
Unless $\frac{x+1}{1+x+e^{x}}$ and $-\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 \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.