3

I've recently discovered Wallis' formula to compute powers of cos and sine from $[0,\pi/2]$, However what If I have a function like $\cos^m (x)\sin^n(x)$ where both $m$ and $n$ are even, this function is even, so it must be symmetric to some axis.

If I want to compute the integral of this function but from $[0,k\pi]$. Can I use parity of the function to integrate from $0$ to $\pi/2$ and then use Wallis formula?

Also I've noticed that for $\cos^m (x)\sin^n(x)$ if one of $m$ or $n$ is odd then the integral on $[0,k\pi]$ is $0$, why is that?

Bernard
  • 179,256
Souames
  • 303
  • 2
  • 7
  • 2
    I know I'm late but here is something, which might help: $$\int_{0}^{\frac{\pi}{2}}\sin(x)^m\cos(x)^n,\textrm{d}x=k\cdot\dfrac{(m-1)!!(n-1)!!}{(m+n)!!}$$where $k$ is $\pi/2$ itself when both $m$ and $n$ are even, and $1$ otherwise. – ultralegend5385 Aug 21 '21 at 13:35

1 Answers1

1

If I want to compute the integral of this function but from $[0,kπ]$ . Can I use parity of the function to integrate from $0$ to $π/2$ and then use Wallis formula?

Essentially, yes. Here's how. Assume $m$, $n$, and $K-1$ are non-negative integers, and define the integral $$I_{m,n}(K)=\int_0^{K\pi}\sin(x)^m\cos(x)^ndx.$$

We can split up the interval $[0,K\pi]$ into subintervals as $$[0,K\pi]=\bigcup_{j=0}^{2K-1}\left[j\frac{\pi}{2},(j+1)\frac\pi2\right],$$ so that we can split up the integral $$I_{m,n}(K)=\sum_{j=0}^{2K-1}\int_{j\pi/2}^{(j+1)\pi/2}\sin(x)^m\cos(x)^ndx.$$ Then we preform the substitution $t=x-j\pi/2$ in each integral. Then, using the sine and cosine addition formulae, $$\sin(t+j\pi/2)= \begin{cases} (-1)^{j/2}\sin t, & \text{ even }j \\ (-1)^{(j-1)/2}\cos t, & \text{ odd }j ,\\ \end{cases} $$ and $$\cos(t+j\pi/2)= \begin{cases} (-1)^{j/2}\cos t, & \text{ even }j \\ (-1)^{(j+1)/2}\sin t, & \text{ odd }j ,\\ \end{cases} $$ so that $$\begin{align} I_{m,n}(K)&=\sum_{j=0}^{2K-1}\int_0^{\pi/2}\sin(t+j\pi/2)^n\cos(t+j\pi/2)^mdt\\ &=\sum_{0\le 2r\le 2K-1}\int_0^{\pi/2}\sin(t+2r\pi/2)^n\cos(t+2r\pi/2)^mdt\\ &+\sum_{0\le 2r+1\le2K-1}\int_0^{\pi/2}\sin(t+(2r+1)\pi/2)^n\cos(t+(2r+1)\pi/2)^mdt\\ &=\sum_{0\le 2r\le 2K-1}\int_0^{\pi/2}((-1)^r\sin t)^n((-1)^r\cos t)^mdt\\ &+\sum_{0\le 2r+1\le2K-1}\int_0^{\pi/2}((-1)^r\cos t)^n((-1)^{r+1}\sin t)^mdt\\ &=\sum_{0\le 2r\le 2K-1}(-1)^{r(n+m)}\int_0^{\pi/2}\sin(t)^n\cos(t)^mdt\\ &+\sum_{0\le 2r+1\le2K-1}(-1)^{r(n+m)+m}\int_0^{\pi/2}\cos(t)^n\sin(t)^mdt. \end{align}$$ Since $$\int_0^{\pi/2}\sin(t)^n\cos(t)^mdt=\int_0^{\pi/2}\cos(t)^n\sin(t)^mdt$$ via symmetry, we have that $$I_{m,n}(K)=\left[\sum_{0\le 2r\le 2K-1}(-1)^{r(n+m)}+\sum_{0\le 2r+1\le2K-1}(-1)^{r(n+m)+m}\right]\int_0^{\pi/2}\sin(t)^n\cos(t)^mdt.$$ This simplifies to $$I_{m,n}(K)=\left[(1+(-1)^m)\sum_{r=0}^{K-1}(-1)^{r(m+n)}\right]\int_0^{\pi/2}\sin(t)^n\cos(t)^mdt.$$ You can use the Wallis formula at this point.

Also I've noticed that for $\cos^m(x)\sin^n(x)$ if one of $m$ or $n$ is odd then the integral on $[0,kπ]$ is $0$ , why is that?

This isn't always true actually. Take the case $n=7$, $m=4$, and $K=7$. We have that $$\int_0^{7\pi}\sin(x)^7\cos(x)^4dx=32/1155.$$

clathratus
  • 18,002