# How do you integrate x/(1+e^(2x^2))?

Mar 22, 2015

We're going to need some substitutions, I'll make one at the time to be as clear as possible:

• First of all, you substitute $u = {x}^{2}$, to get $\mathrm{du} = 2 x \mathrm{dx}$ and transform the integral into
$\frac{1}{2} \setminus \int \frac{1}{{e}^{2 u} + 1} \mathrm{du}$
• Then, we'll go with $s = 2 u$. This means $\mathrm{ds} = 2 \mathrm{du}$, so we only have to add another factor $\frac{1}{2}$, and get
$\frac{1}{4} \setminus \int \frac{1}{{e}^{s} + 1} \mathrm{ds}$
• Now, let's get rid of the exponential, defining $p = {e}^{s}$. This means $\mathrm{dp} = {e}^{s} \mathrm{ds}$. Multiplying and dividing by ${e}^{s}$, we get
$\frac{1}{4} \setminus \int \frac{1}{p \left(p + 1\right)} \mathrm{dp}$
• Writing $\frac{1}{p \left(p + 1\right)}$ as $\frac{1}{p} - \frac{1}{p + 1}$, we can split the integrals, and get
$- \frac{1}{4} \setminus \int \frac{1}{p + 1} \mathrm{dp} + \frac{1}{4} \setminus \int \frac{1}{p} \mathrm{dp}$.
• These are both known integral, giving $\log \left(p + 1\right)$ and $\setminus \log \left(p\right)$. Now we need to make all the substitutions backwards: from
$- \frac{1}{4} \setminus \log \left(p + 1\right) + \frac{1}{4} \setminus \log \left(p\right)$
• $p = {e}^{s}$, so we have
$- \frac{1}{4} \setminus \log \left({e}^{s} + 1\right) + \frac{1}{4} \setminus \log \left({e}^{s}\right)$
• $s = 2 u$, so we have
$- \frac{1}{4} \setminus \log \left({e}^{2 u} + 1\right) + \frac{1}{4} \setminus \log \left({e}^{2 u}\right)$
• Finally, $u = {x}^{2}$, so we have
$- \frac{1}{4} \setminus \log \left({e}^{2 {x}^{2}} + 1\right) + \frac{1}{4} \setminus \log \left({e}^{2 {x}^{2}}\right)$

The only further step we can do is writing the answer as

$- \frac{1}{4} \setminus \log \left({e}^{2 {x}^{2}} + 1\right) + {x}^{2} / 2$
since we have $\setminus \log \left({e}^{2 {x}^{2}}\right) = 2 {x}^{2}$, and we divided by 4.