Calculate integral of y=x*tan^2x? Solution Since we know that (tan x)^2+1 = (tan x)\', we\'ll add and subtract 1 inside the expression of the given function; Int f(x)dx = Int x[(tan x)^2+1-1]dx We\'ll remove the brackets: Int x[(tan x)^2+1] - Int xdx We\'ll note Int x[(tan x)^2+1] = I1 and Int xdx = I2. Since I2 is an elementary formula, we\'ll solve it first: I2 = x^2/2 + C For solving I1 we\'ll apply integration by parts: Int udv = uv - Int vdu u = x => du = dx dv = [(tan x)^2+1] = (tan x)\'dx v = tan x I1 = x*tanx - Int tan xdx I1 = x*tanx + ln (cos x) Int f(x)dx = I1 - I2 Int f(x)dx = x*tanx + ln (cos x) - x^2/2 + C.