TITLE: integrate $\tan^2x \sin x$
QUESTION [5 upvotes]: 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$)

REPLY [7 votes]: HINT :
$$
\int \tan^2 x \sin x\ dx=-\int (\sec^2 x-1)\ d(\cos x).
$$