Find $\int\frac{2}{e^{2x}+4}$ using $u=e^{2x}+4$
The answer is $\frac{1}{2}x-\frac{1}{4}\ln(e^{2x}+4)+c$
I must have made a mistake somewhere as my answer is not the same. Apologies the question may be too specific, but I am teaching myself calculus.
$\int\frac{2}{e^{2x}+4}$
let $u = e^{2x} +4$
$\frac{dy}{dx}=2e^{2x}$
$dx=\frac{1}{2}e^{-2x}du$
$u = e^{2x} +4$
$e^{2x} = u-4$
$e^{-2x} = \frac{1}{u-4}$
$dx=\frac{1}{2}(\frac{1}{u-4})du$
Hence the integral is:
$$ \begin{aligned} &\int\frac{2}{e^{2x}+4} \\ =& 2\int\frac{1}{u}\frac{1}{2}\left(\frac{1}{u-4}\right)du\\ =&\int\frac{1}{u}\left(\frac{1}{u-4}\right)du\\ =&\int\frac{1}{u^2-4u}du\\ =&\int u^{-2}-\frac{1}{4}u^{-1}du\\ =&\frac{u^{-1}}{-1}-\frac{1}{4}\ln(u)+c\\ =&-\frac{1}{e^{2x}+4}-\frac{1}{4}\ln(e^{2x}+4)+c\\ =&-e^{-2x}-\frac{1}{4}-\frac{1}{4}\ln(e^{2x}+4)+c\\ \ne& \frac{1}{2}x-\frac{1}{4}\ln(e^{2x}+4)+c\\ \end{aligned} $$
???? help
You have made a basic, but common algebraic error:
$$\int\frac{1}{u^2-4u}du \neq\int u^{-2}-\frac{1}{4}u^{-1}du$$
You cannot split denominator like that. To continue your method, use partial fractions.