# Techniques of integration (3)

• May 14th 2009, 05:40 PM
NonCommAlg
Techniques of integration (3)
Let $\displaystyle n \geq 0$ be an integer. Evaluate $\displaystyle I_n=\int_0^{\frac{\pi}{2}} (\cos x)^n \cos (nx) \ dx.$
• May 14th 2009, 06:38 PM
pickslides
Using itegration by parts I could probably kick this thing off...

$\displaystyle \int_0^{\frac{\pi}{2}} (\cos x)^n \cos (nx) \ dx = \frac{1}{n}cos^n(x)sin(nx) + \int_0^{\frac{\pi}{2}} sin(nx)sin(x)cos^{n-1}(x) \ dx$

Not really sure how to do,

$\displaystyle \int_0^{\frac{\pi}{2}} sin(nx)sin(x)cos^{n-1}(x) \ dx$

probably needs some trig identities to tidy it up.
• May 14th 2009, 07:22 PM
NonCommAlg
Quote:

Originally Posted by pickslides
Using itegration by parts I could probably kick this thing off...

$\displaystyle \int_0^{\frac{\pi}{2}} (\cos x)^n \cos (nx) \ dx =$ $\displaystyle \color{red}\frac{1}{n}cos^n(x)sin(nx)$ $\displaystyle + \int_0^{\frac{\pi}{2}} sin(nx)sin(x)cos^{n-1}(x) \ dx.$

Not really sure how to do $\displaystyle \int_0^{\frac{\pi}{2}} sin(nx)sin(x)cos^{n-1}(x) \ dx.$

probably needs some trig identities to tidy it up.

that's a good start. we have $\displaystyle I_0=\frac{\pi}{2}.$ for $\displaystyle n \geq 1,$ as you (almost) showed, we have: $\displaystyle I_n=\int_0^{\frac{\pi}{2}} \sin(nx) \sin(x) \cos^{n-1}x \ dx.$ now what?(Evilgrin)
• May 15th 2009, 12:10 AM
Moo
Hello,

Okay, I think I got the correct idea (Evilgrin)

From $\displaystyle \cos(a-b)=\cos(a)\cos(b)+\sin(a)\sin(b)$, it follows that :
$\displaystyle \sin(nx)\sin(x)=\cos[(n-1)x]-\cos(nx)\cos(x)$

The integral is thus :

$\displaystyle I_n=\int_0^{\frac\pi2} \cos[(n-1)x]\cos^{n-1}(x)-\cos(nx)\cos(x)\cos^{n-1}(x) ~dx$

$\displaystyle I_n=\int_0^{\frac\pi2} \cos[(n-1)x]\cos^{n-1}(x) ~dx-\int_0^{\frac\pi2} \cos(nx)\cos^n(x) ~dx$

Which is :
$\displaystyle I_n=I_{n-1}-I_n$

$\displaystyle I_n=\frac 12 \cdot I_{n-1}$

$\displaystyle \Rightarrow \boxed{I_n=\frac{\pi}{2^{n+1}}}$

That's a really nice one (Surprised)
• May 15th 2009, 12:17 AM
NonCommAlg
Bravo Moo! that's exactly the idea ... although you made a strange mistake at the end of your solution, which i'm sure you'll easily find and fix it! (Wink)
• May 15th 2009, 12:22 AM
Moo
Quote:

Originally Posted by NonCommAlg
Brave Moo! that's exactly the idea ... although you made a strange mistake at the end of your solution, which i'm sure you'll easily find and fix it! (Wink)

Yes indeed (Rofl)

1+1=n+1 : that's a very well-known result !!
Had a too short night... (Sleepy)
• May 17th 2009, 02:03 AM
simplependulum
Consider
$\displaystyle cos^n(x) = \frac{1}{2^n} \sum_{k=1}^{n} \binom{n}{k} [cos(n-2k)x + i sin(n-2k)x]$

Since $\displaystyle cos^n(x)$ is real , the terms of sine function will be cancelled finally ,

but we experience that $\displaystyle \int_0^{\frac\pi2} cos(n-2k)x ~cosnx ~dx = 0$ if n-2k is not equal to n so the integral becomes :

$\displaystyle \frac{\pi}{2^{n+1}}$
• May 17th 2009, 02:23 PM
NonCommAlg
Quote:

Originally Posted by simplependulum

$\displaystyle \cos^n(x) = \frac{1}{2^n} \sum_{k=1}^{n} \binom{n}{k} [\cos(n-2k)x + i \sin(n-2k)x]$

this is not an identity!(Shake)
• May 17th 2009, 03:05 PM
TheEmptySet
Quote:

Originally Posted by NonCommAlg
Let $\displaystyle n \geq 0$ be an integer. Evaluate $\displaystyle I_n=\int_0^{\frac{\pi}{2}} (\cos x)^n \cos (nx) \ dx.$

It can be done using complex variables...

First note that

$\displaystyle 4\int_0^{\frac{\pi}{2}} (\cos x)^n \cos (nx) \ dx=\int_0^{2\pi} (\cos x)^n \cos (nx) \ dx$

Parameterize the unit circle in the comples plane with

$\displaystyle z=e^{i\theta} \implies \frac{dz}{iz}=d\theta$

So the integral becomes

$\displaystyle \oint \left(\frac{z+z^{-1}}{2}\right)^n\left( \frac{z^n+z^{-n}}{2}\right)\frac{dz}{iz}$

expanding with the binomial theorem we get

$\displaystyle \frac{1}{i\cdot 2^{n+1}}\left[ \oint \sum_{i=0}^{n}\binom{n}{i}z^{n-i}z^{-i}\right]\left[z^{n-1}+z^{-n-1} \right]dz$

$\displaystyle \frac{1}{i\cdot 2^{n+1}}\left[ \oint \sum_{i=0}^{n}\binom{n}{i}z^{2n-2i-1}+ \sum_{i=0}^{n}\binom{n}{i}z^{i-1}\right]$

each finite sume is its own larent series so the residues are coeffients on the $\displaystyle \frac{1}{z}$ terms so we get

$\displaystyle \frac{1}{i\cdot 2^{n+1}}\left[2\pi i (1)+2\pi i (1) \right]=\frac{4\pi}{2^{n+1}}$

$\displaystyle 4\int_0^{\frac{\pi}{2}} (\cos x)^n \cos (nx) \ dx=\frac{4\pi}{2^{n+1}}$

$\displaystyle \int_0^{\frac{\pi}{2}} (\cos x)^n \cos (nx) \ dx=\frac{\pi}{2^{n+1}}$
• May 17th 2009, 03:55 PM
NonCommAlg
Quote:

Originally Posted by TheEmptySet
It can be done using complex variables...

First note that

$\displaystyle 4\int_0^{\frac{\pi}{2}} (\cos x)^n \cos (nx) \ dx=\int_0^{2\pi} (\cos x)^n \cos (nx) \ dx$

Parameterize the unit circle in the comples plane with

$\displaystyle z=e^{i\theta} \implies \frac{dz}{iz}=d\theta$

So the integral becomes

$\displaystyle \oint \left(\frac{z+z^{-1}}{2}\right)^n\left( \frac{z^n+z^{-n}}{2}\right)\frac{dz}{iz}$

expanding with the binomial theorem we get

$\displaystyle \frac{1}{i\cdot 2^{n+1}}\left[ \oint \sum_{i=0}^{n}\binom{n}{i}z^{n-i}z^{-i}\right]\left[z^{n-1}+z^{-n-1} \right]dz$

Quote:

$\displaystyle \frac{1}{i\cdot 2^{n+1}}\left[ \oint \sum_{i=0}^{n}\binom{n}{i}z^{2n-2i-1}+ \sum_{i=0}^{n}\binom{n}{i}z^{i-1}\right]$

i think the power of $\displaystyle z$ in the second sum should be $\displaystyle -2i-1.$

Quote:

each finite sume is its own larent series so the residues are coeffients on the $\displaystyle \frac{1}{z}$ terms so we get

$\displaystyle \frac{1}{i\cdot 2^{n+1}}\left[2\pi i (1)+2\pi i (1) \right]=\frac{4\pi}{2^{n+1}}$

$\displaystyle 4\int_0^{\frac{\pi}{2}} (\cos x)^n \cos (nx) \ dx=\frac{4\pi}{2^{n+1}}$

$\displaystyle \int_0^{\frac{\pi}{2}} (\cos x)^n \cos (nx) \ dx=\frac{\pi}{2^{n+1}}$
looks good to me! (Smile)