Integration by substitution involving e & ln Aplogies I do not know the code for integration.
Integrate $y = \frac{2}{e^{2x}+4}$
Using $u=e^{2x}+4$
I tried many things but the furthest I got is $\ln(u^2+4u)$
The answer is $0.5x + 0.25\ln(e^{2x}+4) +c$
Any help is appreciated. 
 A: By your idea we obtain:
$$\int\frac{2}{e^{2x}+4}dx=2\int\left(\frac{1}{e^{2x}+4}-\frac{1}{4}+\frac{1}{4}\right)dx=0.5x-\frac{1}{2}\int\frac{e^{2x}}{e^{2x}+4}dx=$$
$$=0.5x-\frac{1}{4}\int\frac{1}{e^{2x}+4}d\left(e^{2x}+4\right)=0.5x-\frac{1}{4}\ln(e^{2x}+4)+C.$$
A: You set $u=e^{2x}+4$
so $e^{2x}=u-4\to 2x=\log(u-4)\to x=\frac12\log(u-4)$
differentiate $dx=\frac{du}{2(u-4)}$
Now substitute
$$\int \frac{2}{e^{2 x}+4} \,dx=\int \frac{2}{u} \frac{du}{2(u-4)}=\int\frac{du}{u(u-4)}$$
Partial fractions
$$\frac{1}{u(u-4)}=\frac{a}{u}+\frac{b}{u-4}=\frac{-4 a+(a+b) u}{(u-4) u}$$
so we must have
$-4a=1;\;a+b=0$ and then $a=-\frac14;\;b=\frac14$ 
$$\frac{1}{u(u-4)}=\frac14\left(\frac{1}{u-4}-\frac{1}{u}\right)$$
$$\int \frac{1}{u(u-4)}=\frac14\left(\int \frac{1}{u-4}\,du-\int\frac{1}{u}\,du\right)=\frac14\left[\log(u-4)-\log u\right]+C$$
finally
$$\int \frac{2}{e^{2 x}+4} \,dx=\frac14\left[\log(e^{2x}+4-4)-\log (e^{2x}+4)\right]+C=\color{red}{\frac14\left[2x-\log (e^{2x}+4)\right]+C}$$
A: $$\int\frac{2}{e^{2x}+4}dx\\u=e^{2x}+4, du=2e^{2x}dx$$we need somehow replace $dx$ with $du$, so let's expand the function:$$\frac{2}{e^{2x}+4}=\frac{2}{e^{2x}+4}\frac{e^{2x}}{e^{2x}}=\frac{2e^{2x}}{\left(e^{2x}+4\right)e^{2x}}$$so$$\int\frac{2}{e^{2x}+4}dx=\int\frac{2e^{2x}}{\left(e^{2x}+4\right)e^{2x}}dx=\int\frac{1}{\left(e^{2x}+4\right)e^{2x}}du=\int\frac{1}{\left(u-4\right)u}du$$now just use Partial fractions and you will get the answer
