What is #int \ 1/((1+tanx)^2+1) \ dx#?

1 Answer
Apr 3, 2017

# int \ 1/((1+tanx)^2+1) \ dx #
# \ \ \ \= 1/5 {ln(tan^2x+2tanx+2) + arctan(tanx+1)} + ln(tan^2x+1) - x} + C#

Explanation:

Let:

# I= int \ 1/((1+tanx)^2+1) \ dx #

Expanding the denominator gives:

# I = int \ 1/(1+2tanx+tan^2x+1) \ dx #
# \ \ = int \ 1/(tan^2x + 2tanx + 2) \ dx #

Because #d/dxtan^2x = sec^2x# and #sec^2x=tan^2x+1# then we can manipulate the integrand as follows::

# I = int \ 1/(tan^2x + 2tanx + 2) \ sec^2x/(1+tan^2x) \ dx #

Now we can simplify the integrand by using the substitution:

# t = tan x => (dt)/dx = sec^2x #

Which gives us:

# I = int \ 1/((t^2 + 2t + 2)(1+t^2)) \ dt #

Therefore we have transformed the integral into a simpler problem which can be solved by decomposing the new integrand into partial fraction. I will omit the partial fraction decomposition, bt the resulting expansion is:

# I = int \ (2t+3)/(5(t^2+2t+2)) - (2t-1)/(5(t^2+1)) \ dt #
# \ \ = 1/5 \ int \ (2t+3)/(t^2+2t+2) - (2t-1)/(t^2+1) \ dt \ \ ..... (star)#

Consider the first part of the integral #(star)#:

# int \ (2t+3)/(t^2+2t+2) \ dt = int \ (2t+2 + 1)/(t^2+2t+2) \ dt #
# " " = int \ (2t+2)/(t^2+2t+2) +1/(t^2+2t+2) \ dt#
# " " = int \ (2t+2)/(t^2+2t+2) +1/((t+1)^2+1) \ dt#
# " " = ln|t^2+2t+2| + arctan(t+1)#
# " " = ln(t^2+2t+2) + arctan(t+1)#

And for the second part of the integral #(star)#:

# int \ (2t-1)/(t^2+1) \ dt = int \ (2t)/(t^2+1) -1/(t^2+1) \ dt #
# " " = ln|t^2+1| - arctant #
# " " = ln(t^2+1) - arctant #

Note that in both cases the modulus signs can be removed as the logarithmic arguments are both positive.

Combining our results into #(star)# we get:

# I = 1/5 {ln(t^2+2t+2) + arctan(t+1)} + ln(t^2+1) - arctant} + C#

Restoring the substitution then gives s:

# I = 1/5 {ln(tan^2x+2tanx+2) + arctan(tanx+1)} + ln(tan^2x+1) - arctantanx} + C#

# \ \ = 1/5 {ln(tan^2x+2tanx+2) + arctan(tanx+1)} + ln(tan^2x+1) - x} + C#