# Quick question about trigonometric substitution $\int\frac{u+5}{u^2+9}du$

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.

• if you used the substitution $u=e^x$, then your new integral in terms of $u$ is incorrect. It should be integral of $\frac{1}{(u-5)(u^2+9)}$ – Jane Jan 29 '16 at 2:26
• Thanks. I will have a look. Since I am just learning trigonometric substitution is the method I posted above correct? – Daniel Waleniak Jan 29 '16 at 2:32
• yeap, it is correct for your integral ! – Jane Jan 29 '16 at 2:36
• @Jane Alright that's great. I split the fraction in two when first calculating the integral, but that's not important. I am glad my method is correct for trig substitution. – Daniel Waleniak Jan 29 '16 at 2:40
• That's great! Good luck! – Jane Jan 29 '16 at 2:40

$$\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.