# Techniques of integration (3)

• May 14th 2009, 05:40 PM
NonCommAlg
Techniques of integration (3)
Let $n \geq 0$ be an integer. Evaluate $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...

$\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,

$\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...

$\int_0^{\frac{\pi}{2}} (\cos x)^n \cos (nx) \ dx =$ $\color{red}\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 $\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 $I_0=\frac{\pi}{2}.$ for $n \geq 1,$ as you (almost) showed, we have: $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 $\cos(a-b)=\cos(a)\cos(b)+\sin(a)\sin(b)$, it follows that :
$\sin(nx)\sin(x)=\cos[(n-1)x]-\cos(nx)\cos(x)$

The integral is thus :

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

$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 :
$I_n=I_{n-1}-I_n$

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

$\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
$cos^n(x) = \frac{1}{2^n} \sum_{k=1}^{n} \binom{n}{k} [cos(n-2k)x + i sin(n-2k)x]
$

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

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

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

Originally Posted by simplependulum

$\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 $n \geq 0$ be an integer. Evaluate $I_n=\int_0^{\frac{\pi}{2}} (\cos x)^n \cos (nx) \ dx.$

It can be done using complex variables...

First note that

$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

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

So the integral becomes

$\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

$\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$

$\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 $\frac{1}{z}$ terms so we get

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

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

$\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

$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

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

So the integral becomes

$\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

$\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:

$\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 $z$ in the second sum should be $-2i-1.$

Quote:

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

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

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

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