Solve indefinite integral $\int\frac{dx}{\sin^2{x}\cos^3{x}}$

I need to solve the integral below $$\int\frac{dx}{\sin^2{x}\cos^3{x}}$$ without using hyperbolic functions but using substitutions like $$u=\tan{x}$$, $$u=\sin{x}$$ or $$u=\cos{x}$$.
Also, I know the correct answer: $$\frac{3}{2}\ln\left | \tan{\frac{x}{2}+\frac{\pi}{4}} \right | - \frac{1}{\sin{x}}+\frac{\sin{x}}{2\cos^2{x}}$$ For me it looks like it will make sense to set $$u=\sin{x}$$ as long as $$R(\sin{x}; -\cos{x}) = -R(\sin{x}; \cos{x})$$. However, such substitution doesn't give me the expected result.

Note that\begin{align}\int\frac{\mathrm dx}{\sin^2x\cos^3x}&=\int\frac{\cos x}{\sin^2x\cos^4x}\,\mathrm dx\\&=\int\frac{\cos x}{\sin^2x(1-\sin^2x)^2}\,\mathrm dx.\end{align}So, by doing $$\sin x=y$$ and $$\cos x\,\mathrm dx=\mathrm dy$$, your indefinite integral becomes$$\int\frac{\mathrm dy}{y^2(1-y^2)^2}.$$Now, use the fact that\begin{align}\frac1{y^2(1-y^2)^2}&=\frac1{(1-y^2)^2}+\frac1{1-y^2}+\frac1{y^2}\\&=\frac3{4(y+1)}+\frac1{4(y+1)^2}-\frac3{4 (y-1)}+\frac1{4 (y-1)^2}+\frac1{y^2}.\end{align}

The given answer looks rather like an application of the substitution $$t=\tan \frac x2$$, which can be used directly after some rewriting of the integrand:

$$\frac{1}{\sin^2{x}\cos^3{x}} =\frac{\sin^2 x + \cos^2 x}{\sin^2{x}\cos^3{x}}=\frac 1{\cos^3x}+ \frac{1}{\sin^2x\cos x}$$

and again applying $$1=\sin^2x + \cos^2x$$ gives

$$\frac{1}{\sin^2{x}\cos^3{x}} = \frac{\sin^2 x}{\cos^3x} + \frac 2{\cos x} + \frac{\cos x}{\sin^2 x}$$

Now, we have

$$\int \frac{\cos x}{\sin^2 x} dx= -\frac 1{\sin x}(+C)$$

and

$$\int \sin x \frac{\sin x}{\cos^3x}dx = \frac{\sin x}{2\cos^2x}-\frac 12\int \frac 1{\cos x}dx$$

So, the integral becomes

$$\int \frac{1}{\sin^2{x}\cos^3{x}}dx = \frac{\sin x}{2\cos^2x} - \frac 1{\sin x}+\frac 32\int\frac 1{\cos x}dx$$

Handling $$\int\frac 1{\cos x}dx$$ by the substitution $$t=\tan \frac x2$$ gives

$$\int \frac 1{\cos x}dx= \ln \left\lvert\frac{1+\tan \frac x2}{1-\tan \frac x2}\right\rvert (+C)$$

Now, apply $$\tan \frac{\pi}{4}=1$$ and the addition formula for tangent

$$\frac{1+\tan \frac x2}{1-\tan \frac x2} = \frac{\tan \frac{\pi}{4}+\tan \frac x2}{1-\tan \frac{\pi}{4}\cdot\tan \frac x2} = \tan\left(\frac x2+\frac{\pi}{4}\right)$$

This gives the answer in the form you have it.

Why do you think that the substitution $$u=\sin(x)$$ doesn't give the expected result ?

If you don't edit your calculus one cannot check it.

$$\int\frac{dx}{\sin^2{x}\cos^3{x}}=\int\frac{du}{u^2(1-u^2)^2}=-\frac{1}{u}+\frac{u}{2(1-u^2)}+\frac34\ln\left|\frac{u+1}{u-1}\right|$$ Then puting back $$u=\sin(x)$$ into it leads to the expected result.

• there was a square missing ... just aded it Mar 10 '20 at 11:36
• @trancelocation. OK. Thank you. Mar 10 '20 at 12:51
• Yes. I learned this in calculus class: to integrate a power of $\sin x$ times a power of $\cos x$, where the exponent on $\cos x$ is odd, do this: keep one factor of $\cos x$ and convert all the others to $\sin x$. Here, the exponent on $\cos x$ is $-3$, which is odd. Mar 11 '20 at 9:32

$$\dfrac1{\sin^2x\cos^3x}=\dfrac{\sin^2x+\cos^2x}{\sin^2x\cos^3x}=\sec^3x+\dfrac1{\cos x\sin^2x}$$

For the first part, see this

For the last, set $$\sin x=y,dy=?$$ $$\int\dfrac1{\cos x\sin^2x}=\dfrac{\cos x}{(1-\sin^2x)\sin^2x}=\dfrac{dy}{(1-y^2)y^2}=\int\dfrac{dy}{y^2}+\int\dfrac{dy}{1-y^2}$$

• For the fun of it, you should've applied the pythagorean identity once more :-) Mar 10 '20 at 11:59