Trying to evaluate $\int \frac{1}{\sin(x)\cos^3(x)} \,dx$ and got stuck So, I am trying to evaluate the following anti-derivative:
$$\int \frac{1}{\sin(x)\cos^3(x)} \,dx$$
I reached a point where I have the following:
$$\int \frac{\sin(x)}{\cos^3(x)} + \frac{1}{\sin(x)\cos(x)} \,dx$$
My idea now is to calculate two separate anti derivatives from here. I am using wolfram alpha to try to help me solve the anti derivative btw. but when I put on Wolfram this anti derivative:
$$\int \frac{1}{\sin(x)\cos(x)} \,dx$$
the result is not the same as:
$$\int \frac{\sin^2(x)+\cos^2(x)}{\sin(x)\cos(x)} \,dx$$
Why is that?? How can I solve this indefinite integral?
 A: You can use the fact that$$\int\frac{\sin(x)}{\cos^3(x)}\,\mathrm dx=-\frac{\cos^{-2}(x)}{-2}=\frac1{2\cos^2(x)}$$and that\begin{align}\int\frac1{\sin(x)\cos(x)}\,\mathrm dx&=\int\frac{\sin(x)}{(1-\cos^2(x))\cos(x)}\,\mathrm dx\\&=-\log|\cos x|+\frac12\log(1-\cos^2(x))\\&=-\log|\cos x|+\log|\sin x|\\&=\log|\tan x|.\end{align}
A: Write the integral as
$$\int \sec^3(x)\csc(x)\,dx$$
Make the substitution $u=\tan x$, then $du=\sec^2(x) \,dx$, and it is
$$\int \sec(x)\csc(x)\,du$$
$$\int u+\frac{1}{u}\,du ~~~~ \text{(why?)}$$
Can you finish?
A: With your great answers I was able to evaluate this integral as follows:
$$
\int \frac{1}{\sin(x)\cos^3(x)}  \,dx = \int \sec^3(x)\csc(x)  \,dx =\\
\int \sec(x)\csc(x) \sec^2(x)  \,dx = \int \frac{1}{\cos(x)\sin(x)} \sec^2(x) \,dx = \\
\int \frac{\sin^2(x)+\cos^2(x)}{\cos(x)\sin(x)} \sec^2(x) \,dx = \int \frac{\sin(x)}{\cos(x)} + \frac{\cos(x)}{\sin(x)} \sec^2(x) \,dx = \\
\int \tan(x) +\cot(x)  \sec^2(x) \,dx = \int \tan(x) + \frac{1}{\tan(x)}  \sec^2(x) \,dx\\ 
u=\tan(x)\\du=\sec^2(x)dx\\
\int u +\frac{1}{u} \,du = \frac{u^2}{2}+\ln|u|+c =\\
\frac{1}{2}\tan^2(x)+\ln|\tan(x)| +c
$$
Thank you everybody for your helpful answers and comments.
A: $$
\begin{aligned}
\quad \int \frac{1}{\sin x \cos ^3 x} d x&=\int \frac{\cos ^2 x+\sin ^2 x}{\sin x \cos ^3 x} d x\\
&=\int \frac{1}{\sin x \cos x} d x+\int \tan x \sec ^2 x d x\\
&=\int \frac{d(\tan x)}{\tan x}+\int \tan x d(\tan x)\\
&=\ln |\tan x| +\frac{\tan ^2 x}{2}+C
\end{aligned}
$$
