How to integrate $\int \frac{8}{16-e^{4x}} \mathrm dx$ using trigonometric substitution? How do I integrate this equation using trigonometric substitution?
$$\int \frac{8}{16-e^{4x}} \mathrm dx.$$
So far I figured out that $a = 4, u = e^{2x}$ then $e^{2x}=4\sin\theta \mathrm d\theta$ and $\sqrt{16-e^{4x}}$ and $2e^{2x}dx=4\sin\theta$. I don't know how to proceed from this because I don't know if $e^{2x}$ can be considered a constant and can be factored out of the integral or I have to use logarithmic functions.
Edit: I tried solving it, I had a final answer of
$$\frac{e^{2x}}{4\sqrt{16-e^{4x}}}+C.$$
Am I correct?
 A: In general，we have
$$\int \frac{1}{a-ce^{bx}}\mathrm{d}x＝\frac{bx-\log{(a-ce^{bx})}}{ab}$$
Proof: substitute $u＝bx$,then
$$I＝\int \frac{1}{a-ce^{bx}}\mathrm{d}x＝\frac{1}{b}\int \frac{1}{a-ce^u}\mathrm{d}u$$
substitute $t＝e^u$,
$$I＝\frac{1}{b}\int \frac{1}{t(a-ct)}\mathrm{d}t $$
The rest of the work is simple.
A: $$
\int \frac{8}{16-e^{4x}} \, dx=\left| u=e^{2x} \atop du=2e^{2x}\,dx=2u\, dx  \right|
=\int\frac{8}{16-u^2} \cdot \frac{du}{2u}
$$
(we assume that $u\in(-4,4)$)
$$
=\left| u=4\sin t \atop du=4\cos t\,dt  \right|=
\int\frac{8}{16-16\sin^2t} \cdot \frac{4\cos t\,dt}{8\sin t}
=\frac14 \int \frac{\cos t\,dt}{\cos^2t \sin t}
$$
$$
=\frac12 \int \frac{dt}{2\sin t\cos t}=
\frac12 \int \frac{dt}{\sin 2t}=
\left| z= 2t \atop dz= 2\,dt  \right|=
$$
$$
=\frac14 \int \frac{dz}{\sin z}=
\frac14\ln\left| \tan\left( \frac{z}2 \right) \right|+C
=\frac14\ln\left| \tan t \right|+C
$$
$$
=\frac14\ln\left| \tan\left( \arcsin\frac{u}4 \right) \right|+C
=\frac14\ln\left| \tan\left( \arcsin\frac{e^{2x}}4  \right) \right|+C
$$
Since
$$
\tan^2(\arcsin x)=\frac1{\cot^2(\arcsin x)}=
\frac1{\frac1{\sin^2(\arcsin x)}-1}=
\frac1{\frac1{x^2}-1}=\frac{x^2}{1-x^2}
$$
and (considering the sign)
$$
\tan(\arcsin x)= \frac{x}{\sqrt{1-x^2}}
$$
the answer is
$$
\frac14\ln\left| \frac{e^{2x}/4}{1-\sqrt{\frac{e^{4x}}{16}}}  \right|+C
=\frac{x}2-\frac14\ln\left| \sqrt{16-e^{4x}} \right|+C
$$
$$
=\frac{x}2-\frac18\ln\left| 16-e^{4x} \right|+C.
$$
