I'm trying to calculate this integral::
$$\int\frac{u+5}{u^2+9}du$$
which is a part of:
$$\int\frac{e^x}{(e^x-5)(e^{2x}+9)}dx$$
The part I posted is the only one giving me a wrong answer. I am using trigonometric substitution, but I can't see the error I've made so I'd like someone to point out what's wrong with my method:
Using $u=3\tan\theta$
$$\int\frac{u+5}{u^2+9}du$$ $$\int\frac{(3\tan\theta+5)(3\sec^2\theta)}{9\tan^2+9}d\theta$$ $$\int\frac{(3\tan\theta+5)(3\sec^2\theta)}{9\sec^2\theta}d\theta$$ $$\frac{1}{3}\int(3\tan\theta+5)d\theta$$ $$\int(\tan\theta)d\theta +\frac{5}{3}\int(d\theta)$$ $$\log|\sec\theta| + \frac{5}{3}\arctan\frac{u}{3}$$ $$\log|\frac{\sqrt{u^2+9}}{3}| + \frac{5}{3}\arctan\frac{u}{3}$$
Apparently, the logarithm is incorrect.
Thank you for the help.
Hint: Split this into two integrals.
$$\int\frac u{u^2+9}du+5\int\frac{du}{u^2+9}$$
The first doesn't require trig substitution, just $u$-substitution. Use trig substitution on the second one.