INTEGRATING POWERS OF TRIGONOMETRIC FUNCTIONS

Joseph Wiener, Donald P. Skow, and Will Watkins

University of Texas – Pan American

The objective of this article is to show that the indefinite integrals of the six trigonometric functions raised to an even or odd power can be expressed in a closed form. Handbooks of mathematics and calculus textbooks show the integrals of the trig functions to the nth power in the form of reduction formulas. Some computer programs on the market will evaluate these integrals but not in closed form. If the reader does not have access to one of these commercial programs then you can use the following ideas to write your own programs. First, in order to obtain our main objective, this article shows how to find closed forms for the integrals of

\frac{dx}{(a^{2} ± x^{2})^{n}} .

Then with certain substitutions, closed forms of trigonometric integrals can be found. \underline{Theorem 1}. The following formula holds true:

∫ \frac{dx}{(a^{2} + x^{2})^{n}} = \binom{2n − 2}{n − 1}\frac{tan^{−1} \frac{x}{a}}{2^{2n−2}a^{2n−1}}

− ∑_{k=0}^{n−2} \frac{\binom{n+k−1}{k}[∑_{j=1}^{n−k−1} \binom{n−k−1}{j}a^{n−k−1−j}x^{j}i^{j+1}]}{(n − k − 1)a^{n+k}2^{n+k−1}(x^{2} + a^{2})^{n−k−1}} + C , a ≠ 0 , i = \sqrt{−1} (1)

where j = 1, 3, 5, … only.

\underline{Proof}. Consider the following two integrals,

(2)  ∫ \frac{dx}{x^{2} + a^{2}} = \frac{1}{a} tan^{−1} \frac{x}{a} + C , a ≠ 0

and

(3)  ∫ \frac{dx}{x^{2} − b^{2}} = \frac{1}{2b}(ln |x − b| − ln |x + b|) + C , b ≠ 0 .

If b = ai where i = \sqrt{−1}, then (3) becomes

(4)  ∫ \frac{dx}{x^{2} + a^{2}} = \frac{1}{2ai}[Ln(x − ai) − Ln(x + ai)] + C , a ≠ 0 ,

where Ln denotes the multi–valued logarithmic function in the complex plane. Equations (2) and (4) imply the formula

(5)  \frac{1}{2ai}[Ln(x − ai) − Ln(x + ai)] = \frac{1}{a}Arctan\frac{x}{a} ,

with Arctan u = tan^{−1} u + nπ (n = 0, ±1, ±2, …). In [1] we differentiated the integral of

\frac{dx}{(x + q)(x + p)}

with respect to the parameters p and q in order to obtain the formula

∫ \frac{dx}{(x + q)^{m}(x + p)^{n}}

= ∑_{k=0}^{m−2} \frac{(−1)^{1−k}(n + k − 1)!}{k!(m − k − 1)(n − 1)!(p − q)^{n+k}(x + q)^{m−1−k}}

+ \frac{(−1)^{m−1}(n + m − 2)!}{(m − 1)!(n − 1)!(p − q)^{n+m−1}} [ln |x + q| − ln |x + p|]

+ \frac{(−1)^{m−1}}{(m − 1)!} ∑_{j=0}^{n−2} \frac{(j + m − 1)!}{(n − 1 − j)(x + p)^{n−1−j}j!(p − q)^{j+m}} + C . (6)

Let m = n, j = k, p = ai, and q = −ai, then substituting (5) into (6) and simplifying, yields formula (1).

\underline{Corollary 1}.

∫ cos^{2n−2} θdθ = \binom{2n − 2}{n − 1}\frac{θ}{2^{2n−2}}

− ∑_{k=0}^{n−2} \frac{\binom{n+k−1}{k} cos^{2n−2k−2} θ ∑_{j=1}^{n−k−1} \binom{n−k−1}{j} tan^{j} θ i^{j+1}}{(n − k − 1)2^{n+k−1}} + C (7)

where j = 1, 3, 5, … only.

\underline{Proof}. Formula (7) is derived from (1) by the substitution x = a tan θ.

\underline{Corollary 2}.

∫ sin^{2n−2} θdθ = \binom{2n − 2}{n − 1}\frac{θ}{2^{2n−2}}

+ ∑_{k=0}^{n−2} \frac{\binom{n+k−1}{k} sin^{2n−2k−2} θ ∑_{j=1}^{n−k−1} \binom{n−k−1}{j} cot^{j} θ i^{j+1}}{(n − k − 1)2^{n+k−1}} + C (8)

where j = 1, 3, 5, … only.

\underline{Proof}. Formula (8) is derived from (1) by the substitution x = a cot θ.

\underline{Theorem 2}. The following formula holds true:

∫ \frac{dx}{(a^{2} − x^{2})^{n}} = −\frac{\binom{2n−2}{n−1}}{(2a)^{2n−1}} ln |\frac{x − a}{x + a}|

− ∑_{k=0}^{n−2} \frac{\binom{n+k−1}{k} ∑_{j=1}^{n−k−1} \binom{n−k−1}{j}(−a)^{n−k−1−j}x^{j}}{(n − k − 1)2^{n+k−1}a^{n+k}(x^{2} − a^{2})^{n−k−1}} + C , a ≠ 0 , (9)

where j = 1, 3, 5, … only.

\underline{Proof}. Formula (9) is obtained from (6) by letting m = n, j = k, p = a and q = −a. \underline{Corollary 3}.

∫ sec^{2n−1} θdθ = \frac{\binom{2n−2}{n−1}}{2^{2n−2}} ln | sec θ + tan θ|

+ ∑_{k=0}^{n−2} \frac{\binom{n+k−1}{k} ∑_{j=1}^{n−k−1} \binom{n−k−1}{j} sin^{j} θ}{(n − k − 1)2^{n+k−1} cos^{2n−2k−2} θ} + C (10)

where j = 1, 3, 5, … only.

\underline{Proof}. Formula (10) is derived from (9) by the substitution x = a sin θ. \underline{Corollary 4}.

∫ csc^{2n−1} θdθ = \frac{\binom{2n−2}{n−1}}{2^{2n−2}} ln | csc θ − cot θ|

− ∑_{k=0}^{n−2} \frac{\binom{n+k−1}{k} ∑_{j=1}^{n−k−1} \binom{n−k−1}{j} cos^{j} θ}{(n − k − 1)2^{n+k−1} sin^{2n−2k−2} θ} + C (11)

where j = 1, 3, 5, … only.

\underline{Proof}. Formula (11) is derived from (9) by the substitution x = a cos θ. \underline{Remark}. The accepted way of the textbooks to evaluate the integrals of sec^{2n−1} θ and

csc^{2n−1} θ is by integration by parts. This method, however, leads not to closed forms but to recursion formulas.

\underline{Example 1}. The integrals of the odd powers of cos θ and sin θ should be taken by substitutions u = sin θ and u = cos θ, respectively. The results are

∫ cos^{2n+1} θdθ = ∫ (cos^{2n} θ)(cos θdθ)

= ∫ (1 − sin^{2} θ)^{n}d(sin θ)

= ∫ ∑_{k=0}^{n} \binom{n}{k}(1)^{n−k}(− sin^{2} θ)^{k}d(sin θ)

= ∑_{k=0}^{n} \binom{n}{k}(−1)^{k} \frac{sin^{2k+1} θ}{2k + 1} + C .

Similarly,

∫ sin^{2n+1} θdθ = ∑_{k=0}^{n} \binom{n}{k}(−1)^{k+1} \frac{cos^{2k+1} θ}{2k + 1} + C .

\underline{Example 2}. The integrals of the even powers of sec θ and csc θ should be taken by the substitutions of u = tan θ and u = cot θ, respectively.

∫ sec^{2n} θdθ = ∫ sec^{2n−2} θ(sec^{2} θdθ)

= ∫ (sec^{2} θ)^{n−1}d(tan θ)

= ∫ ∑_{k=0}^{n−1} \binom{n − 1}{k}(1)^{n−1−k}(tan^{2} θ)^{k}d(tan θ)

= ∑_{k=0}^{n−1} \binom{n − 1}{k}\frac{tan^{2k+1} θ}{2k + 1} + C .

Similarly,

∫ csc^{2n} θdθ = − ∑_{k=0}^{n−1} \binom{n − 1}{k}\frac{cot^{2k+1} θ}{2k + 1} + C .

\underline{Example 3}. To find the integrals of even powers of the tangent and cotangent functions, we will use the integrals for even powers of the secant and cosecant functions. Hence,

∫ tan^{2n} θdθ = ∫ (sec^{2} θ − 1)^{n}dθ

= ∑_{k=0}^{n} \binom{n}{k}(−1)^{n−k} ∫ sec^{2k} θdθ

= (−1)^{n}θ + ∑_{k=1}^{n}(−1)^{n−k}\binom{n}{k} ∑_{j=0}^{k−1} \binom{k − 1}{j}\frac{tan^{2j+1} θ}{2j + 1} + C .

Similarly,

∫ cot^{2n} θdθ = (−1)^{n}θ + ∑_{k=1}^{n} \binom{n}{k}(−1)^{n−k+1} ∑_{j=0}^{k−1} \binom{k − 1}{j}\frac{cot^{2j+1} θ}{2j + 1} + C .

\underline{Example 4}. For odd powers of the tangent function, we use the substitution u = tan θ (which works also for even powers of tan θ). Then dθ = (1 + u^{2})^{−1}du and

∫ tan^{2n+1} θdθ = ∫ \frac{u^{2n+1}}{u^{2} + 1}du

= ∫ (u^{2n−1} − u^{2n−3} + u^{2n−5} + ⋯ + (−1)^{n} \frac{u}{u^{2} + 1})du

= (−1)^{n} ln | sec θ| + ∑_{k=1}^{n}(−1)^{n−k} \frac{tan^{2k} θ}{2k} + C .

∫ cot^{2n+1} θdθ = (−1)^{n} ln | sin θ| + ∑_{k=1}^{n}(−1)^{n−k+1} \frac{cot^{2k} θ}{2k} + C .

\underline{Reference}

1. J. Wiener and D.P. Skow, “Differentiating Indefinite Integrals with Respect to a Parameter,” Missouri Journal of Mathematical Sciences, 3 (1991), 65–69.