Originally posted by robgb
Thanks mate, yep i essentially understand, just 1 question though:
How did you get from the second line to the third line in the following:
Could you work me though that bit in a little more detail mate?
Thanks a lot,
Robert.
i think chroot pulled a fast one on you. there is a bit more to the trick that you have to realize to make the infinite summation turn into a single term, with one integration.
to see this, first let me remind you of some trigonometric identities:
<br />
\cos(a\pm b)=\cos a\cos b \mp\sin a\sin b<br />
so
<br />
\begin{align}<br />
&\frac{1}{2}(\cos(a-b)-\cos(a+b))\\<br />
&=-\frac{1}{2}\cos a\cos b+\frac{1}{2}\sin a\sin b\\<br />
& -\frac{1}{2}\cos a\cos b+\frac{1}{2}\sin a\sin b\\<br />
&= \sin a\sin b<br />
\end{align}<br />
we need to use this identity to evaluate some integrals:
<br />
\begin{align}<br />
&\int_{-T/2}^{T/2}\sin(\frac{2\pi mt}{T})\sin(\frac{2\pi nt}{T})\ dt=\\<br />
&\frac{1}{2}\int_{-T/2}^{T/2}\cos\frac{2\pi(n-m)t}{T}\ dt-\frac{1}{2}\int_{-T/2}^{T/2}\cos\frac{2\pi(n+m)t}{T}\ dt=\\<br />
&\left\frac{T}{4\pi(n-m)}\sin\frac{2\pi(n-m)t}{T}\right]^{T/2}_{-T/2}\\<br />
&-\left\frac{T}{4\pi(n+m)}\sin\frac{2\pi(n+m)t}{T}\right]^{T/2}_{-T/2}\\<br />
&=0<br />
\end{align}<br />
note that this integration is not valid when n=m, since it involves a division by zero. in the n=m case, i have:
<br />
\begin{align}<br />
\int_{-T/2}^{T/2}\sin^2\frac{2\pi nt}{T}\! dt\\<br />
=\frac{1}{2}\int_{-T/2}^{T/2}dt-\frac{1}{2}\int_{-T/2}^{T/2}\cos\frac{4\pi nt}{T}dt\\<br />
=T/2<br />
\end{align}<br />
so, now, armed with these integrals, we can do the problem.
i am going to rename the dummy index n, in the infinite summation to m. you will see why.
<br />
f(t) = \sum_m^\infty b_m \sin\frac{2\pi mt}{T}<br />
then
\begin{equation*}<br />
\begin{split}<br />
\int_{-T/2}^{T/2} f(t) \sin{n \omega t}\ dt &= \int_{-T/2}^{T/2} \left[ \sum_m^\infty b_m \sin\frac{2\pi mt}{T}\right] \sin\frac{2\pi nt}{T}dt\\<br />
&= \sum_m^\infty b_m\int_{-T/2}^{T/2} \sin\frac{2\pi nt}{T}\sin\frac{2\pi mt}{T}\ dt<br />
\end{split}<br />
\end{equation*}<br />
this summation contains an infinite number of terms, one for every value of m, but only when m=n is the term nonzero, so i will drop the summation, and change m to n, so i am only considering one integral, and the value of that integral is T/2. this is the only nonzero term of the infinite summation.
<br />
\int_{-T/2}^{T/2} f(t) \sin{n \omega t}\ dt =\frac{T}{2}b_n<br />
or
<br />
b_n=\frac{2}{T}\int_{-T/2}^{T/2} f(t) \sin{n \omega t}\ dt<br />
and that s it. any questions?