How do you find the integral of int tan^n(x)tann(x) if n is an integer?

3 Answers
Sep 28, 2015

See the explanation section below.

Explanation:

For n >= 3n3, use Integration by substitution to decrease the exponent on tanxtanx

int tan^nx dx = int tan^(n-2) tan^2x dxtannxdx=tann2tan2xdx

= int tan^(n-2) (sec^2x - 1) dx=tann2(sec2x1)dx

= int tan^(n-2) sec^2x dx - int tan^(n-2) x dx=tann2sec2xdxtann2xdx

The first integral is int u^(n-2) duun2du, so we get

int tan^nx dx = 1/(n+1) tan^(n-1) x - int tan^(n-2) x dxtannxdx=1n+1tann1xtann2xdx

The second integral is of the same form as the first. So, repaet the process until you arrive at

(for nn even): int tan^2 x dx = int (sec^2x -1) dx = tanx - x +Ctan2xdx=(sec2x1)dx=tanxx+C

or

(for nn odd): int tan x dx = int (sinx/cosx) dx = ln abs(secx) +Ctanxdx=(sinxcosx)dx=ln|secx|+C.

Sep 28, 2015

The general formula is too difficult for elementary calculus classes.

Click for "Answer"

You have to determine these the hard way, sorry. I will do the first three.

int tanxdxtanxdx

Multiply by secx/secxsecxsecx:

= int (secxtanx)/secxdx=secxtanxsecxdx

Let:
u = secxu=secx
du = secxtanxdxdu=secxtanxdx

=> int 1/udu1udu

= ln|u|=ln|u|

= color(blue)(ln|secx| + C)=ln|secx|+C

Ironically, the second degree tantan is easier to differentiate.

int tan^2xdxtan2xdx

Use trig identity and follow up:

= int sec^2x - 1dx=sec2x1dx

= color(blue)(tanx - x + C)=tanxx+C

And the third:

int tan^3xdxtan3xdx

Split into familiar first and second-degree tantan terms:

= int tan^2x tanx dx=tan2xtanxdx

Use trig identity:

= int tanx(sec^2x - 1)dx=tanx(sec2x1)dx

= inttanxsec^2x - tanxdx=tanxsec2xtanxdx

Split into familiar uu and dudu pairs:

= int secxtanx*secx - tanxdx=secxtanxsecxtanxdx

Let:
u = secxu=secx
du = secxtanxdxdu=secxtanxdx

=> int udu - inttanxdxudutanxdx

Recall the first-degree tantan solution and re-use it.

= color(blue)(sec^2x/2 - ln|secx| + C)=sec2x2ln|secx|+C

Hopefully that gave you the general techniques you can use to approach higher degree problems.

Sep 28, 2015

See the explanation.

Explanation:

Maybe this helps:

Let n=2k+1n=2k+1, then:

int tan^nxdx= int tan^(2k+1)xdx=int (tan^2x)^k tanxdx=Itannxdx=tan2k+1xdx=(tan2x)ktanxdx=I

tan^2x=t => 2tanxsec^2xdx=dt => tanxdx=dt/(2(t+1))tan2x=t2tanxsec2xdx=dttanxdx=dt2(t+1)

since: sec^2x=tan^2x+1sec2x=tan2x+1

I=1/2 int t^k/(t+1)dtI=12tkt+1dt

Dividing polynomial t^ktk with t+1t+1 gives us following result:

t^k:(t+1)=t^(k-1)-t^(k-2)+t^(k-3)-t^(k-4)+...

and reminder

1/(t+1)

which sign depends on k (if k is even it's positive and vice versa)

Hence,

t^k/(t+1)=sum_(i=1)^k (-1)^(i+1) t^(k-i) + (-1)^k 1/(t+1)

I=1/2 int (sum_(i=1)^k (-1)^(i+1) t^(k-i) + (-1)^k 1/(t+1)) dt

I=1/2 (sum_(i=1)^k (-1)^(i+1) int t^(k-i)dt+(-1)^k int dt/(t+1))

I=1/2 (sum_(i=1)^k (-1)^(i+1) t^(k-i+1)/(k-i+1) + (-1)^k ln(t+1))

I=1/2 (sum_(i=1)^k (-1)^(i+1) (tan^2x)^(k-i+1)/(k-i+1) + (-1)^k ln(tan^2x+1))

I=1/2 (sum_(i=1)^k (-1)^(i+1) (tan^2x)^(k-i+1)/(k-i+1) + (-1)^k lnsec^2x)

When n=2k:

int tan^nxdx= int tan^(2k)xdx = I

tanx=t => sec^2xdx=dt => dx=dt/(t^2+1)

And hence:

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

t^(2k)/(t^2+1)=sum_(i=1)^k (-1)^(i+1) t^(2(k-i)) + (-1)^k 1/(t^2+1)

Hence,

I=int ( sum_(i=1)^k (-1)^(i+1) t^(2(k-i)) + (-1)^k 1/(t^2+1) ) dt

I= sum_(i=1)^k (-1)^(i+1) int t^(2(k-i)) dt + (-1)^k int 1/(t^2+1) dt

I= sum_(i=1)^k (-1)^(i+1) t^(2(k-i)+1)/(2(k-i)+1) + (-1)^k arctant

I= sum_(i=1)^k (-1)^(i+1) (tanx)^(2(k-i)+1)/(2(k-i)+1) + (-1)^k arctan(tanx)

I= sum_(i=1)^k (-1)^(i+1) (tanx)^(2(k-i)+1)/(2(k-i)+1) + (-1)^k x