How do I integrate (find the primitive to) $$ \int \tan^2 x \sin x dx$$
My approach has been to rewrite it to $$\int \frac{\sin^3 x}{\cos^2 x}dx$$ and the do the substitution $t = \tan x/2$. This works but I believe there's an easier way.
(I know that $0 < x < \pi/2$)
Let $\cos x = t$ , then the integral reduces to :
$$\int \frac{\sin^3 x}{\cos^2 x} \, dx = \int \frac{-(1-t^2)}{t^2} \, dt.$$
This can easily be solved.