2

I just want to know if there is a nice closed form for this integral:

$$\int_{}^{}(\tan x)^{2n}dx$$

I know that a reduction formula exists and this is what I get by following it:

$$\begin{align*} \int\tan^{2n}{x}dx &= \int\tan^{2n-2}{x}\left(\sec^2{x}-1\right)dx\\ &= \int\tan^{2n-2}{x} \sec^2{x}dx-\int\tan^{2n-2}{x}dx\\ &=\frac{1}{2n-1}\tan^{2n-1}{x}-\int\tan^{2n-2}{x}dx \end{align*}$$

but still I wasn't reaching any answer. I want (if possible) one of those answers where there are binomial coefficients and exponents etc.

In short I just want a closed form for this integral so that I can just plug a value of n and get the answer.

Travis Willse
  • 108,056
cdkw2
  • 43

3 Answers3

4

Yes. Observing that $\int \tan^2 x \: dx = \tan x - x + C$, and using your reduction formula, we can prove by induction that: $$ \int \tan^{2n}x \: dx = \left(\sum_{k=1}^n \frac{(-1)^{n-k}}{2k-1} \tan^{2k-1}x\right) + (-1)^n x + C $$ For in the case of $n=1$, this is simply the observation above. All that is left is to use the reduction formula to show that this relation follows; this I have left as a short but worthwhile exercise.

Sputnik
  • 3,887
2

Let’s build up the reduction formula by addition.

$$ \begin{aligned} I_{2 n}+I_{2 n-2} & =\int\left(\tan ^{2 n} x+\tan ^{2 n-2} x\right) d x \\ & =\int \tan ^{2 n-2} x\left(\tan ^2 x+1\right) d x \\ & =\int \tan ^{2 n-2} x d(\tan x) \\ & =\frac{\tan ^{2 n-1} x}{2 n-1} \end{aligned} $$

Let the proposition be $$ P(n): \int \tan ^{2 n} x k x=\sum_{k=1}^n \frac{(-1)^{n-k}}{2 k-1} \tan ^{2 k-1} x+(-1)^n x+C $$ When $n=1$, $$ \begin{aligned} &I_2+I_0 =\frac{\tan x}{1} \\ \Rightarrow \quad &I_2 =\tan x-x \end{aligned} $$ $\therefore$ $P(1)$ is true.

Assume $P(m)$ is true for some integer $m$, i.e. $$\int \tan ^{2 m} x k x=\sum_{k=1}^m \frac{(-1)^{m-k}}{2 k-1} \tan ^{2 k-1} x+(-1)^m x+C $$ For $n=m+1$, using the reduction formula yields

$$ \begin{aligned} I_{2(m+1)}= & \frac{\tan ^{2 m+1} x}{2 m+1}-I_{2 m} \\ = & \frac{\tan ^{2 m+1} x}{2 m+1}-\left[\sum_{k=1}^m \frac{(-1)^{m+k}}{2 k-1} \tan ^{2k-1} x-(-1)^m x\right] \\ & \sum_{k=1}^{m+1} \frac{(-1)^{m+1-k}}{2 k-1} \tan ^{2 k-1} x+(-1)^{m+1} x \end{aligned} $$ Hence $P(m+1)$ is also true. By the principle of Mathematical Induction, $P(n)$ is true for any natural number $n. \blacksquare$

Wish it helps.

Lai
  • 31,615
0

Since $n$ is a real number, for convenience denote $m = 2 n$.

If $m$ is a positive, even integer, instead repeatedly applying the reduction formula in the problem statement together gives $$\int \tan^m x \,dx = \sum_{k = 1}^{\frac m2} \frac{(-1)^{\frac m2 + k}}{2 k - 1} \tan^{2 k - 1} x - x + C ,$$ and if $m$ is a positive, odd integer, applying the reduction formula and using the special case $\int \tan x \,dx = \log |\sec x| + C$ gives $$\int \tan^m x \,dx = \sum_{k = 1}^{\frac{m - 1}2} \frac{(-1)^{\frac{m - 1}2 + k}}{2 k} \tan^{2 k} x + (-1)^{\frac{m - 1}2} \log |\sec x| + C .$$ More generally, if $n$ is a positive rational number, $\frac pq$, then the substitution $v = (\tan x)^{\frac 1q}$ rationalizes the integral, giving $$q \int \frac{v^{p + q - 1} \,dx}{1 + v^{2 q}},$$ so in antiderivative has a closed form in terms of elementary functions, though in practice explicit formulae are complicated even for small $q > 1$; see Quanto's answer to another related question for a compact summation formula for the case $p = 1$.

If $m$ is a negative integer, say, $-M$, then we are evaluating $\int \cot^M x \,dx$, for which another reduction formula is available. More generally, if $m$ is a negative rational number, $-\frac PQ$, then substituting $w = \cot^{\frac1Q} x$ again rationalizes the integral.

More generally, if $m$ is not rational, the antiderivative cannot be expressed in closed form in terms of elementary functions alone, but it can be expressed in terms of the ordinary hypergeometric function, ${}_2F_1$, or the Lerch transcendent, $\Phi$. Substituting $u = \tan x$ gives $$\int \tan^{m} x \,dx = \int \frac{u^{m} \,du}{1 + u^2} .$$

For $|u| < 1$, expanding into a series gives $$\int \sum_{k = 0}^\infty (-1)^k u^{m + 2 k} \,du = \sum_{k = 0}^\infty \int u^{m + 2 k} \,du = \sum_{k = 0}^\infty \frac{u^{m + 2 k + 1}}{m + 2 k + 1} + C .$$ (Provided that $m$ is not a negative integer,) rewriting this series using special functions and back-substituting gives that $$\boxed{\int \tan^{2 n} x \,dx = \frac{\tan^{m + 1} x}{m + 1} {}_2F_1\left(1, \frac12 + \frac m2; \frac32 + \frac m2; -\tan^2 x\right) = \frac{\tan^{m + 1} x}2 \Phi\left(-\tan^2 x, 1, \frac12 + \frac m2\right)} .$$ Cf. Robert Israel's answer to a similar question. (Even though the series in $u$ converges only for $|u| < 1$, i.e., $|\tan x| < 1$, these expressions are antiderivatives for $\tan^m x$ wherever they are defined.)

Travis Willse
  • 108,056