Orthogonality of sine and cosine integrals.
I will assume that $T$ is the period and $\omega $ is the angular frequency of the wave $\sin (\omega t)$. In such a case, which is important to obtain the final results, the following relation holds $$\omega =\frac{2\pi }{T}.\tag{1}$$ Let $x=\omega t$, $x_{0}=\omega t_{0}$. Then
\begin{eqnarray*}
I(m,n) &=&\int_{t_{0}}^{t_{0}+T}\sin (m\omega t)\sin (n\omega t)\,dt\tag{2} \\
&=&\frac{1}{\omega }\int_{x_{0}}^{x_{0}+2\pi }\sin (mx)\sin (nx)\,dx \\
&=&\frac{1}{2\omega }\int_{x_{0}}^{x_{0}+2\pi }\cos (\left( m-n\right)
x)-\cos (\left( m+n\right) x)\,dx\text{,}\tag{3}
\end{eqnarray*}
because in general
\begin{equation*}
\cos (\alpha -\beta )-\cos (\alpha +\beta )=2\sin \alpha \sin \beta ,\tag{4}
\end{equation*}
as can be seen by subtracting
\begin{equation*}
\cos (\alpha +\beta )=\cos \alpha \cos \beta -\sin \alpha \sin \beta
\end{equation*}
from
\begin{equation*}
\cos (\alpha -\beta )=\cos \alpha \cos \beta +\sin \alpha \sin \beta .
\end{equation*}
- For $m\neq n$, since \begin{eqnarray*} \int_{x_{0}}^{x_{0}+2\pi }\cos (\left( m-n\right) x)\,dx &=&\left. \frac{ \sin (\left( m-n\right) x)}{m-n}\right\vert _{x_{0}}^{x_{0}+2\pi }=0 \\ \int_{x_{0}}^{x_{0}+2\pi }\cos (\left( m+n\right) x)\,dx &=&\left. \frac{ \sin (\left( m+n\right) x)}{m+n}\right\vert _{x_{0}}^{x_{0}+2\pi }=0\tag{5} \end{eqnarray*} the integral $I(m,n)=0$.
- For $m=n\ne 0$, by $(1)$ \begin{eqnarray*} I(m,n)&=&I(m,m) =\frac{1}{2\omega }\int_{x_{0}}^{x_{0}+2\pi }1-\cos (2mx)\,dx\\&=&\left. \frac{1}{2\omega }\left( x-\frac{\sin (2mx)}{2m}\right) \right\vert _{x_{0}}^{x_{0}+2\pi } \\ &=&\frac{1}{2\omega }\left( 2\pi \right) =\frac{\pi }{\omega } =\frac{T}{2}\tag{6}. \end{eqnarray*}
The evaluation of the second integral is similar.