# Integration by Parts and Reduction Formula of $\int\tan^n(x)dx$

The integral of: $$\int\tan^n(x)dx$$

I found this proof online for the answer and it went like this: $$\int\tan^{n-2}(x)\tan^2(x)dx$$ $$\int\tan^{n-2}(x)(\sec^2(x)-1)dx$$ $$\int\tan^{n-2}(x)\sec^2(x)dx-\int\tan^{n-2}(x)dx$$ Then using u-substitution it yielded the reduction formula: $$\frac{\tan^{n-1}(x)}{n-1}-\int\tan^{n-2}dx$$

I tried using integration by parts because this is in the integration by parts: I set my $u=\tan^n(x)$ and my $du=\frac{\tan^{n-1}(x)}{n-1}\sec^2(x)$, and $dv=dx$

I achieve this expression:

$$x\tan^n(x)-\frac{1}{n-1}\int x\tan^{n-1}(x)\sec^2(x)dx$$

And then if I continue working I set it like this:

I use u-substitution to evaluate the integral setting my $u=\tan(x)$, and $x=\tan^{-1}(u)$, and $du=\sec^2(x)dx$

Then I get: $$x\tan^n(x)-\frac{1}{n-1}\int\tan^{-1}(u)u^{n-1}du$$ Then I used integration by parts and got:

$$x\tan^n(x)-\frac{1}{n-1}[\frac{\tan^{-1}(u)u^n}{n}-\frac{1}{n}\int\frac{u^n}{u^2+1}du]$$

If I keep going down this way do I get the reduction formula above?

• Is there a way to keep going down this path, and still get the same conclusion What do you mean by that ? – StephenG Nov 23 '17 at 1:50
• @StephenG Is there a method to attain the same answer from the conclusion I reached? – EnlightenedFunky Nov 23 '17 at 1:51
• That's still vague. What do you mean by "same answer" and what do you mean by "same conclusion" ? What are you trying to find out ? I don't know what you expect to happen. – StephenG Nov 23 '17 at 1:54
• This is the natural way to obtain the reduction formula. – StubbornAtom Nov 23 '17 at 7:10

The reduction formula for $\int tan^n x dx$ is obtained as follows.

For positive integer $n$

$I_n$ = $\int tan^n x dx$ = $\int tan^{n-2}$$x \tan^2x dx = \int tan^{n-2}$$x$ ($\sec^2x$$-1)$$dx$

= $\int tan^{n-2}$$x \sec^2x$$dx$ - $\int tan^{n-2}$$x dx =\frac{tan^{n-1}x}{n-1} - I_{n-2} Thus, I_n = \frac{tan^{n-1}x}{n-1} - I_{n-2}. Now If n is positive integer \int tan^n x dx = \frac{tan^{n-1}x}{n-1} - \frac{tan^{n-3}x}{n-3} +$$\frac{tan^{n-5}x}{n-5}$ $-$ $.$ $.$ $.$

If $n$ be odd, the last term is ${(-1)}^{\frac{n-1}{2}}$ $\int tan x$ $dx$ = ${(-1)}^{\frac{n-1}{2}}$ $\ln$ $\sec x$.

If $n$ be even, the last term is ${(-1)}^{\frac{n+2}{2}}$ $\int tan^2 x$ $dx$ = ${(-1)}^{\frac{n+2}{2}}$ ($\tan x -x)$.

• This doesn't really answer the question. OP is looking for ways other than $u-substituion$ – Dylan Nov 23 '17 at 3:53
• I used neither integration by parts nor any 'u' substitution. – Edumaths555 Nov 23 '17 at 4:02
• Seriously? It's the exact solution in OP's question. They wanted to find another method to get to the same answer. – Dylan Nov 23 '17 at 4:33
• Also, The u-sub is implicit when you had $\int \tan^{n-2} x \sec^2 x dx = \frac{\tan^{n-1} x}{n-1}$ – Dylan Nov 23 '17 at 4:40
• Just @Dylan stated, this answer is a reiteration of the solution I found online. – EnlightenedFunky Nov 24 '17 at 18:41