rewrite it as:
∫ (tan³x /sec²x) dx =
split the numerator as:
∫ (tan²x /sec²x) tanx dx =
replace tan²x with (sec²x - 1):
∫ [(sec²x - 1) /sec²x] tanx dx =
divide and multiply the integrand by secx (so as to get secx tanx that is the derivative of secx):
∫ [(sec²x - 1) /sec³x] secx tanx dx =
let secx = u
differentiate both sides:
d(secx) = du →
secx tanx dx = du
substituting, you get:
∫ [(sec²x - 1) /sec³x] secx tanx dx = ∫ [(u² - 1) /u³] du =
distributing, you get:
∫ [(1/u) - (1 /u³)] du =
∫ (1/u) du - ∫ u^(-3) du =
ln |u| - [1/(-3+1)] u^(-3+1) + c =
ln |u| - [1/(-2)] u^(-2) + c =
ln |u| + (1/2)(1/u²) + c
then, substituting back u = secx, you get:
ln |secx| + (1/2)(1/sec²x) + c
thus, finally:
∫ cos²x tan³x dx = ln |secx| + (1/2) cos²x + c