# how to integrate tan x/(sec x+tan x)?

the complete question is to integrate x.tan x/(sec x+tan x) in the limit 0 to pi, (0 is lower limit and pi is upper limit).

Relevance

x * tan(x) * dx / (sec(x) + tan(x)) =>

x * tan(x) * (sec(x) - tan(x)) * dx / (sec(x)^2 - tan(x)^2) =>

x * (tan(x) * sec(x) - tan(x)^2) * dx / 1 =>

x * (sec(x) * tan(x) - sec(x)^2 + 1) * dx

u = x

du = dx

dv = sec(x) * tan(x) * dx - sec(x)^2 * dx + dx

v = sec(x) - tan(x) + x

int(u * dv) =>

u * v - int(v * du) =>

x * (sec(x) - tan(x) + x) - int((sec(x) - tan(x) + x) * dx) =>

x * (sec(x) - tan(x) + x) - int(sec(x) * dx) + int(tan(x) * dx) - int(x * dx) =>

x * (sec(x) - tan(x) + x) - ln|sec(x) + tan(x)| - ln|cos(x)| - (1/2) * x^2 + C =>

x * ((1 - sin(x)) / cos(x) + x) - ln|cos(x) * (sec(x) + tan(x))| - (1/2) * x^2 + C =>

x * (cos(x)^2 / (cos(x) * (1 + sin(x))) + x^2 - ln|1 + sin(x)| - (1/2) * x^2 + C =>

x * (cos(x) / (1 + sin(x)) - ln|1 + sin(x)| + (1/2) * x^2 + C

From 0 to pi

pi * (cos(pi) / (1 + sin(pi)) - 0 * (cos(0) / (1 + sin(0)) - ln|1 + sin(pi)| + ln|1 + sin(0)| + (1/2) * pi^2 - (1/2) * 0^2 =>

pi * (-1 / (1 + 0)) - 0 * (1 / (1 + 0)) - ln|1 + 0| + ln|1 + 0| + (1/2) * pi^2 =>

-pi + pi^2 / 2 =>

(1/2) * pi * (pi - 2)

You should note that your original function is not continuous along the interval. It is only through some tweaking that this result emerges

• Login to reply the answers
• Use a Wiererstrass substitution t = tan(x/2)

You will see how it works out, it is a longer problem so you can understand me not wanting to write the solution, but this should be straightforward. If you have problems, feel free to post your work and we can troubleshoot, but ultimately it is not necessary for us to solve the whole thing for you.

• Login to reply the answers
• int(tanx * secx)dx = int(sinx / (cosx)^2)dx replace u = cosx du = -sinx dx int(-u^-2)du = u^-a million + C yet u = cosx So: u^-a million + C = secx + C remember your trig identities while integrating! There are some neat little tricks like this, esp. with tan and the inverse applications... and it saves you having to memorize hundreds of diverse elementary integrals and derivatives.

• Login to reply the answers