How is tan^5 x integrated to get (1/4)sec^4(x) - tan^2(x) + ln|sec x| + C ?
I tried integrating 2 different ways and was unable to get the books answer.
$\displaystyle \int{\tan^5{x}\,dx} = \int{\tan^2{x}\tan^3{x}\,dx}$
$\displaystyle = \int{(\sec^2{x} - 1)\tan^3{x}\,dx}$
$\displaystyle = \int{\sec^2{x}\tan^3{x} - \tan^3{x}\,dx}$
$\displaystyle = \int{\sec^2{x}\tan^3{x} - \tan^2{x}\tan{x}\,dx}$
$\displaystyle = \int{\sec^2{x}\tan^3{x} - (\sec^2{x} - 1)\tan{x}\,dx}$
$\displaystyle = \int{\sec^2{x}\tan^3{x} - \sec^2{x}\tan{x} + \tan{x}\,dx}$
$\displaystyle = \int{\sec^2{x}(\tan^3{x} - \tan{x})\,dx} + \int{\tan{x}\,dx}$
$\displaystyle = \int{\sec^2{x}(\tan^3{x} - \tan{x})\,dx} - \int{\frac{-\sin{x}}{\phantom{-}\cos{x}}\,dx}$.
Now integrate the first with a substitution $\displaystyle u = \tan{x}$ and the second with a substitution $\displaystyle u = \cos{x}$.