Show that: \begin{equation*} \frac{2}{T}\int_0^T\sin(n\omega t)\sin(m\omega t)dt=\delta_{m,n} \end{equation*} Here the period \(T=2\pi/\omega\), and \(n\) and \(m\) are integers greater than zero. Recall that \(\delta_{m,n}\) (the "Kronecker delta") is given by \[\delta_{m,n}= \begin{cases} 1 &m=n\\ 0 &m\ne n \end{cases} \] You will have to treat the two cases separately. Do not choose specific values of \(m\) and \(n\), prove this relationship in general for ANY integer \(m\) and \(n\).
Hints: Since it is easy to integrate exponentials, even if the exponent is a complex number, use Euler's formula to change the sines into exponentials: \begin{equation*} \sin(n\omega t)=\frac{e^{i n\omega t}-e^{-i n\omega t}}{2i} \end{equation*} Beware of zero in the denominator of fractions!
Please evaluate all integrals analytically by hand.
Use the Euler substitutions in the integral: \begin{equation*} \end{equation*} \begin{align*} \frac{2}{T} \int_{0}^{T} \sin (n \omega t) \sin (m \omega t) d t &=\frac{2}{T} \int_{0}^{T}\left(\frac{e^{i n \omega t}-e^{-i n \omega t}}{2 i}\right)\left(\frac{e^{i m \omega t}-e^{-i m \omega t}}{2 i}\right) d t \\ &=\frac{2}{T(2i)(2i)} \int_{0}^{T}\left[e^{in \omega t}e^{im \omega t}+e^{-in \omega t}e^{-im \omega t}-e^{in \omega t}e^{-im \omega t}-e^{-in \omega t}e^{im \omega t}\right] d t\\ &=-\frac{2}{4T} \int_{0}^{T}\left[e^{i(n+m) \omega t}+e^{-i(n+m) \omega t}-e^{i(n-m) \omega t}-e^{-i(n-m) \omega t}\right] d t \end{align*}
Integrate term by term: \begin{align*} \int_0^T e^{i(n+m) \omega t} dt &= \frac{e^{i(n+m) \omega t}}{i(n+m)\omega}\\ \int_0^T e^{-i(n+m) \omega t} dt &= \frac{e^{i(n+m) \omega t}}{-i(n+m)\omega}\\ \int_0^T -e^{i(n-m) \omega t} dt &= \frac{-e^{i(n-m) \omega t}}{i(n-m)\omega}\\ \int_0^T -e^{-i(n-m) \omega t} dt &= \frac{-e^{i(n-m) \omega t}}{-i(n-m)\omega}\\ \end{align*}
but I have to be careful when I deal with the \(m=n\) case, because there is a zero in the denominator of the last terms.
First deal with the case \(m \neq n\): \begin{align*} \frac{2}{T} \int_{0}^{T} \sin (n \omega t) \sin (m \omega t) d t &=\frac{2}{-4 T}\left[\left(\frac{e^{i(n+m) \omega t}-e^{-i(n+m) \omega t}}{i \omega(n+m)}\right)-\left(\frac{e^{i(n-m) \omega t}-e^{-i(n-m) \omega t}}{i \omega(n-m)}\right)\right]_{0}^{T}\\ &= \frac{2}{-4 T}\left[\left(\frac{1}{\omega(n+m)}\frac{e^{i(n+m) \omega t}-e^{-i(n+m) \omega t}}{i}\right)\right.\\ &\qquad\left.- \left(\frac{1}{\omega(n-m)}\frac{e^{i(n-m) \omega t}-e^{-i(n-m) \omega t}}{i}\right)\right]_{0}^{T}\\ &= \frac{2}{-4 T}\left[\left(\frac{1}{\omega(n+m)}2\sin[(n+m)\omega t]\right)\right.\\ &\qquad\left. -\left(\frac{1}{\omega(n-m)}2\sin[(n-m)\omega t]\right)\right]_{0}^{T}\\ &=-\frac{1}{T}\left[\left(\frac{\sin [(n+m) \omega t]}{\omega(n+m)}\right)-\left(\frac{\sin [(n-m) \omega t]}{\omega(n-m)}\right)\right]_{0}^{T=2 \pi / \omega}\\ &=-\frac{1}{T}\left[\left(\frac{\sin [(n+m) 2\pi]}{\omega(n+m)}\right)-\left(\frac{\sin [(n-m)2\pi]}{\omega(n-m)}\right)\right.\\ &\qquad\left. -\left(\frac{\sin 0}{\omega(n+m)}\right)+\left(\frac{\sin 0}{\omega(n-m)}\right)\right]\\ &= 0 \end{align*} This follows because the integral of a sine function over a whole period is zero, and since \(n\) and \(m\) are integers, so too are \(n+m\) and \(n-m\) (and non-zero), thus the time \(T\) contains an integral number of periods of \(\sin[(n\pm m)\omega t]\).
The case \(m = n\) is special:
There are several ways to look at it. The easiest way is to avoid the zero denominator by setting \(m=n\) BEFORE you do the integral: \begin{align*} \frac{2}{T} \int_{0}^{T} \sin (n \omega t) \sin (m \omega t) d t=&\frac{2}{T} \int_{0}^{T} \sin ^{2}(m \omega t) d t\\ =& \frac{2}{T} \int_{0}^{T}\left[\frac{1}{2}+\frac{1}{2} \cos 2 m \omega t\right] d t\\ =& \frac{2}{T}\left[\frac{T}{2}+0\right]\\ =& 1 \end{align*}
OR \begin{align*} \frac{2}{T} \int_{0}^{T} \sin (n \omega t) \sin (m \omega t) d t =&\frac{2}{T} \int_{0}^{T}\left(\frac{e^{i n \omega t}-e^{-i n \omega t}}{2 i}\right)\left(\frac{e^{i m \omega t}-e^{-i m \omega t}}{2 i}\right) d t\\ =&\frac{2}{-4 T} \int_{0}^{T}\left[e^{i(2 m) \omega t}+e^{-i(2 m) \omega t}-\left(e^{i 0 \omega t}+e^{-i 0 \omega t}\right)\right] d t\\ =&\frac{2}{-4 T} \int_{0}^{T}[2 \cos \left( 2 m \omega t-2\right)] d t\\ =&\frac{2}{4 T} \int_{0}^{T} 2 d t\\ =& \frac{2}{4T}(2T)\\ =&1 \end{align*} If you do the integral first, before setting \(m=n\), then you must be careful how you evaluate limits. Note that the integral with \(n+m\) in the denominator evaluates to zero for the same reason as above, but the other term does not evaluate to zero! Let's look: \begin{equation*} -\frac{2}{T}\left[-\left(\frac{\sin [(n-m) \omega t]}{\omega(n-m)}\right)\right]_{0}^{T=\frac{2\pi}{\omega}} =\frac{2}{T}\left[\frac{\sin [(n-m) 2\pi]}{(n-m) \omega}-\frac{\sin [0]}{(n-m) \omega}\right] \end{equation*} Now I need to look at limits as \(m\rightarrow n\). The numerator on the 2\(^{nd}\) term right hand term is zero always because \(t=0\). So as I take the limit \(m\rightarrow n\), the term remains zero. The 1\(^{st}\) term on the right goes to 1 as \(m\rightarrow n\) as you can verify by L'Hopital's rule. I get the same result as before.
\[\sum_{n=1}^\infty\delta_{n3}=1 \]
\begin{align*} \sum_{n=1}^\infty\delta_{n3} &=\delta_{13}+\delta_{23}+\delta_{33}+\delta_{43}+\cdots\\ &=0+0+1+0+\cdots\\ &=1 \end{align*}
\[\sum_{n=1}^\infty b_n\delta_{n3}=b_3\]
\begin{align*} \sum_{n=1}^\infty b_n\delta_{n3} &=b_1\delta_{13}+b_2\delta_{23}+b_3\delta_{33}+b_4\delta_{43} +\cdots\\ &=b_10+b_20+b_31+b_40+\cdots\\ &=b_3 \end{align*}
\[\sum_{n=1}^{10}\sum_{m=1}^{10}\delta_{nm}=\,\,\,?\]
\begin{align*} \sum_{n=1}^{10}\sum_{m=1}^{10}\delta_{nm}&=\sum_{n=1}^{10}(\delta_{n1}+\delta_{n2}+\delta_{n3}+\cdots+\delta_{n10}) \\ &=(\delta_{11}+\delta_{12}+\cdots+\delta_{1,10})+(\delta_{21}+\delta_{22}+\cdots+\delta_{10,2})+\cdots+(\delta_{10,1}+\delta_{10,2}+\cdots+\delta_{10,10})\\ &=(\delta_{11}+0+0+\cdots+0)+(0+\delta_{22}+0+\cdots+0)+\cdots+(0+0+\cdots+\delta_{10,10})\\ &=(\delta_{11}+\delta_{22}+\delta_{33}+\cdots+\delta_{10,10})\\ &=10 \end{align*}
The Kronecker delta is 1 only if the integers are the same, so \(n=m+1\) gives the only non-zero result. \[(n-1)\times m\times \delta_{n,m+1}=((m+1)-1)m= m^2 \] or \[(n-1)\times m\times \delta_{n,m+1}=(n-1)(n-1) =(n-1)^2\]