Evaluate $\int \frac{\tan^3 x - \sin x}{\cos^2 x} \;dx$

$\int \frac{\tan^3 x - \sin x}{\cos^2 x} \;dx$

$= \int \frac{\tan^3 x}{\cos^2 x} \;dx - \int \frac{\sin x}{\cos^2 x} \;dx$

$=\int \tan^3 x \sec^2 x \;dx - \int \frac{\sin x}{\cos^2 x} \;dx$

To integrate $=\int \tan^3 x \sec^2 x \;dx$, substitute $u = \tan x$ and $du = \sec^2 x \; dx$ to get $\int u^3 \; du = \frac{u^4}{4} = \frac{\tan^4 x}{4}$.

And to integrate $\int \frac{\sin x}{\cos^2 x} \;dx$, substitute $u=\cos x$ and $du=- \sin x \; dx$ to get $\frac{-1}{u^2} \; du = \frac{1}{u} = \frac{1}{\cos x}$

So, $\int \tan^3 x \sec^2 x \;dx - \int \frac{\sin x}{\cos^2 x} \;dx$

$= \frac{\tan^4 x}{4} - \frac{1}{\cos x} + C$

$= \frac{1}{4}\left( \tan^4 x - 4\sec x\right) + C$