# Trigonometric definite integral $\int ^\frac{\pi}{2} _0 \cos^4(s)\mathrm{ds}-\int^\frac{\pi}{2}_0 \cos^6(s)\mathrm{ds}$

$$\int ^\frac{\pi}{2} _0 \cos^4(s)\mathrm{ds}-\int^\frac{\pi}{2}_0 \cos^6(s)\mathrm{ds}$$

the answer is $$\dfrac{3\cdot1}{4\cdot2}-\dfrac{5\cdot3\cdot1}{6\cdot4\cdot2}$$

I really don't know why

There may be some tricks in this, but I have not seen it in the textbook

• Wallis integral formula is useful Feb 7 at 6:52
• Take out $\operatorname{cos}^4s$ as a common factor and then refer to this Feb 7 at 7:06
• Find $cos^n(x)$ in terms of $cos(x)$ in Wikipedia, then integrate. Feb 7 at 7:08
• I'm a rookie.... Feb 7 at 8:01
• I think there are some missing $\pi/2$ Feb 7 at 14:04

1. Define $$I_n=\int_0^{\pi/2}\cos^{2n}(t)dt$$

2. Integrate by parts $$I_n=\int_0^{\pi/2}\cos^{2n-1}(t)\cos(t)dt=\color{blue}{\cos^{2n-1}(t)\sin(t)\Big|_0^{\pi/2}}+(2n-1)\int_0^{\pi/2}\cos^{2n-2}(t)\sin^2(t)dt$$ and observe that the blue part is equal to zero.

3. Use $$\cos^2(t)+\sin^2(t)=1$$ $$(2n-1)\int_0^{\pi/2}\cos^{2n-2}(t)\sin^2(t)dt=(2n-1)\Big(\int_0^{\pi/2}\cos^{2(n-1)}(t)dt-\int_0^{\pi/2}\cos^{2n}(t)dt\Big)$$

4. Collect all results $$I_n=(2n-1)(I_{n-1}-I_n)$$

5. Isolate $$I_n$$ $$I_n=\frac{2n-1}{2n}I_{n-1}$$

6. Compute $$I_0, I_1, I_2, I_3$$ $$I_0=\frac{\pi}{2},\quad I_1=\frac{1}{2}\frac{\pi}{2},\quad I_2=\frac{3\cdot 1}{4\cdot 2}\frac{\pi}{2},\quad I_3=\frac{5\cdot 3\cdot 1}{6\cdot 4\cdot 2}\frac{\pi}{2}$$

7. Compute $$I_2-I_3$$

Integrate-by-parts below to obtain the recursive formula

\begin{align} I_n=\int ^\frac{\pi}{2} _0 \cos^n s \>{ds}&= \int ^\frac{\pi}{2}_0 \frac{\cot^{n-1} s }{n}d(\sin^{n}s) {ds}=\frac{n-1}nI_{n-2},\>\>\>I_0=\frac\pi2 \end{align}

and then apply it to

$$\int^\frac{\pi}{2}_0 \cos^4s \> {ds} -\int^\frac{\pi}{2}_0 \cos^6s \>{ds} =I_4-I_6=\frac34\frac12I_0-\frac56 \frac34\frac12I_0$$

• Nice answer! An explicit formula is also possible: $$I_n=\frac{\sqrt{\pi}~\Gamma\left(\frac{n+1}{2}\right)}{2~\Gamma\left(\frac{n}{2}+1\right)}$$ Feb 7 at 21:58

It seems that one of the solution may be the formula for $$\cos$$ at even power: $$\cos^{2n}(s)=\frac{1}{2^{2n}}(e^{is}+e^{-is})^{2n}$$: $$I(n)=\int ^\frac{\pi}{2} _0 \cos^{2n}(s)\mathrm{ds}=\frac{1}{4}\int ^{2\pi} _0 \cos^{2n}(s)\mathrm{ds}=\frac{1}{2^{2n}4}\int ^{2\pi} _0 (e^{is}+e^{-is})^{2n}\mathrm{ds}=\frac{1}{2^{2n}4}\int ^{2\pi} _0 (e^{2ins}+\binom{2n}{1}e^{is(2n-1)-is}+...+\binom{2n}{n}e^{is(2n-n)-isn}+...+e^{-2ins})\mathrm{ds}$$

After integration the only surviving term is $$\frac{2\pi}{2^{2n}4}\binom{2n}{n}=\frac{2\pi(2n)!}{2^{2n}4(n!)^2}$$