How do you integrate $\int_{-a}^{a}\sin^{m}(\pi x)\,dx$ and $\int_{-a}^{a}\cos^{m}(\pi x)\,dx$

191 Views Asked by At

How do you integrate $$\int_{-a}^{a}\sin^{m}(\pi x)\,dx\quad \text{and}\quad \int_{-a}^{a}\cos^{m}(\pi x)\,dx$$

when $m$ is an odd or even natural order without using the gamma function?

2

There are 2 best solutions below

10
On BEST ANSWER

Convert $\sin^m(\pi x)$ or $\cos^m(\pi x)$ to a sum of constants times sines or cosines of multiple angles: complex exponentials are useful here. Then integrate term-by-term.

For example,

$$ \eqalign{\sin^8 (\pi x) &= \left(\frac{e^{\pi i x} - e^{-\pi i x}}{2i}\right)^8 \cr &= \frac{1}{256} \left(e^{8 \pi i x} - 8 e^{6 \pi i x} + 28 e^{4 \pi i x} - 56 e^{2\pi i x} + 70 - 56 e^{-2\pi i x} + 28 e^{-4\pi i x} + 8 e^{-6 \pi i x} + e^{-8 \pi i x}\right)\cr &= \frac{\cos(8 \pi x)}{128} - \frac{\cos(6 \pi x)}{16} + \frac{7 \cos(4 \pi x)}{32} - \frac{7 \cos(2 \pi x)}{16} + \frac{35}{128} \cr}$$ And integrating, $$ \int_{-a}^a \sin^8(\pi x)\; dx = \frac{\sin(8\pi a)}{512\pi} - \frac{\sin(6\pi a)}{48\pi} + \frac{7 \sin(4\pi a)}{64 \pi} - \frac{7\sin(2\pi a)}{16 \pi} + \frac{35 a}{64} $$

EDIT: In the case $a=1$, $$\int_{-1}^1 \sin(n \pi x)\; dx = \int_{-1}^1 \cos(n \pi x)\; dx = 0$$ for nonzero integers $n$, so only the constant term in the expansion gives a nonzero contribution. There is no constant term in the expansion of $\sin^{m}(\pi x)$ or $\cos^{m}(\pi x)$ if $m$ is odd, while if $m = 2k$ is even the binomial theorem gives you the term: in the case of $\sin^{2k}(\pi x) = \left( \frac{e^{\pi i x} - e^{-\pi i x}}{2i}\right)^{2k}$ it's $(2i)^{-2k} (-1)^k {2k \choose k} = 2^{-2k} {2k \choose k}$, and similarly in the case of $\cos^{2k}(\pi x) = \left( \frac{e^{\pi i x} + e^{-\pi i x}}{2}\right)^{2k}$ it's $2^{-2k} {2k \choose k}$. Integrate that constant term from $-1$ to $1$ to get another factor of $2$.

0
On

Let $S_m$ be the integral $\int_{-a}^{a} \sin ^m \pi x\ dx$.

Using integration by parts,

$$\begin{align*} S_m &= \int_{-a}^{a} \sin ^m \pi x\ dx\\ &= -\frac1\pi\int_{-a}^a\sin^{m-1}\pi x \ d \cos \pi x\\ &= -\frac1\pi\left[\sin^{m-1}\pi x\cos\pi x\right]_{-a}^a + \frac1\pi\int_{-a}^a\cos\pi x \ d\sin^{m-1}\pi x\\ &= -\frac1\pi\left[\sin^{m-1}\pi x\cos\pi x\right]_{-a}^a + (m-1)\int_{-a}^a\cos^2\pi x\sin^{m-2}\pi x\ dx\\ &= -\frac1\pi\left[\sin^{m-1}\pi x\cos\pi x\right]_{-a}^a + (m-1)\int_{-a}^a\left(1-\sin^2\pi x\right)\sin^{m-2}\pi x\ dx\\ &= -\frac1\pi\left[\sin^{m-1}\pi x\cos\pi x\right]_{-a}^a + (m-1)S_{m-2} - (m-1)S_m\\ mS_m&= -\frac1\pi\left[\sin^{m-1}\pi x\cos\pi x\right]_{-a}^a + (m-1)S_{m-2}\\ S_m&= -\frac1{m\pi}\left[\sin^{m-1}\pi x\cos\pi x\right]_{-a}^a + \frac{m-1}mS_{m-2}\\ \end{align*}$$

This gives a reduction formula for the sine integral, and similarly for cosine. If $a$ is an integer, the first term can be simplified to zero.