How do you integrate #int xtan^2x# using integration by parts?

1 Answer
Aug 26, 2016

Use #tan^2 x = sec^2 x -1# first.

Explanation:

#x tan^2 x = xsec^2 x - x#

#-int x dx = -x^2/2#

#int x sec^2 x dx#

Let #u = x# and #dv = sec^2 x dx#, so that

#du = dx# and #v = tan x# to get

#int x sec^2 x dx = x tan x - int tan x dx#.

Now integrate #tan x = sinx/cosx# using substitution #u = cos x#.

#int x sec^2 x dx = x tan x - (- ln abs(cosx)) = x tan x + ln abs cosx #

Finish by putting it all together.

#int x tan^2 x = -x^2/2 + x tan x + ln abs cosx +C#.