# Need help with the integral $\int \frac{2\tan(x)+3}{5\sin^2(x)+4}\,dx$

I'm having a problem resolving the following integral, spent almost all day trying. Any help would be appreciated. $$\int \frac{2\tan(x)+3}{5\sin^2(x)+4}\,dx$$

-
Could you expand on what you've tried? –  Antonio Vargas Jun 7 '12 at 8:32
If you expand it like this $\int \frac{2\tan(x)+3}{5\sin^2(x)+4}\,\mathrm{d}x=\int \frac{(2\tan(x)+3)\cos^2 x}{5\sin^2(x)+4}\cdot \frac{\mathrm{d}x}{\cos^2 x}$, the substitution $u=\tan x$ seems reasonable. (You can express both $\sin^2x$ and $\cos^2 x$ using $u=\tan x$). –  Martin Sleziak Jun 7 '12 at 8:33

Hint:

• Multiply the numerator and denomiator by $\sec^{2}(x)$. Then you have $$\int \frac{2 \tan{x} +3}{5\sin^{2}(x)+4} \times \frac{\sec^{2}(x)}{\sec^{2}{x}} \ dx$$

• Now, the denomiator becomes $5\tan^{2}(x) + 4\cdot \bigl(1+\tan^{2}(x)\bigr)$, and you can put $t=\tan{x}$.

• So your new integral in terms of $t$ is : $\displaystyle \int \frac{2t+3}{9t^{2}+4} \ dt = \int\frac{2t}{9t^{2}+4} \ dt + \int\frac{3}{9t^{2}+4} \ dt$.

-
Thank you very much!! Also thanks to the other people that posted it. Finally I've been able to solve it :) –  HelloEveryone Jun 7 '12 at 8:56
@HelloEveryone: You are welcome –  user9413 Jun 7 '12 at 8:56

If you convert everything to sines and cosines, you get $$\frac{2\tan x+3}{5\sin^2x+4}=\frac{2\sin x+3\cos x}{5\sin^2x\cos x+4\cos x}\;,\tag{1}$$ which probably doesn’t look very promising. However, you can rewrite it as $$\frac{2\sin x+3\cos x}{\cos x(9-5\cos^2x)}=\frac{2\sin x}{\cos x(9-5\cos^2x)}+\frac3{9-5\cos^2x}\;.$$ The first term of this is nice: apart from a factor of $-1$, $\sin x$ is the derivative of $\cos x$, so it can be integrated by substituting $u=\cos x$ and using partial fractions. The second term still requires a bit of work. When sines and cosines don’t do the job, try secants and tangents:

$$\frac3{9-5\cos^2x}=\frac3{9-\frac5{\sec^2x}}=\frac{3\sec^2x}{9\sec^2x-5}=\frac{3\sec^2x}{9(\tan^2x+1)-5}=\frac{3\sec^2x}{9\tan^2x+4}\;,$$ which can be integrated by substituting $u=\tan x$.

If you don’t see any way forward from $(1)$, you can always jump directly to the stage of trying to get secants and tangents.

$$\frac{2\tan x+3}{5\sin^2x+4}=\frac{2\tan x+3}{5\tan^2x\,\cos^2x+4}=\frac{2\tan x+3}{5\frac{\tan^2x}{\sec^2x}+4}=\frac{2\sec^2x\tan x+3\sec^2x}{5\tan^2x+4\sec^2x}\;,$$

and after converting the $4\sec^2x$ in the denominator to $4\tan^2x-4$, we have

$$\frac{(2\tan x+3)\sec^2x}{9\tan^2x+4}\;;$$

$\sec^2x$ being the derivative of $\tan x$, the substitution $u=\tan x$ will turn this into a nice rational function of $u$. This is exactly what Chandrasekhar achieved directly in his solution by multiplying the fraction by $\dfrac{\sec^2x}{\sec^2x}$. That’s a nicer, more efficient way to go. My purpose in writing out this more roundabout route is to show that you often don’t have to see the really clever tricks if you can put together enough more routine manipulations.

-
Thank you very much for the explanation!! I tried a similiar method before, but was stucked at second point because I didn't think to multiply for $sec^2$ –  HelloEveryone Jun 7 '12 at 9:09
Try $t=\tan(x/2)$. This leads to $\sin(x)=\frac{2t}{1+t^2}$, $\tan(x)=\frac{2t}{1-t^2}$ and finally $dx = \frac{2\,dt}{1+t^2}$. Then use a classical partial fraction expansion.