Home » Blog » Prove the orthogonality relations for sine and cosine

Prove the orthogonality relations for sine and cosine

  1. Prove the following for all n \in \mathbb{Z} with n \neq 0:

        \[ \int_0^{2 \pi} \sin (nx) \, dx = \int_0^{2 \pi} \cos x \, dx = 0. \]

  2. Prove the following formulas for m, n \in \mathbb{Z} with m^2 \neq n^2:

        \[ \int_0^{2 \pi} \sin (nx) \cos (mx) \, dx = \int_0^{2 \pi} \sin (nx) \sin (mx) \, dx = \int_0^{2 \pi} \cos (nx) \cos (mx) \, dx = 0, \]

    and,

        \[ \int_0^{2 \pi} \sin^2 (nx) \, dx = \int_0^{2 \pi} \cos^2 (nx) \, dx = \pi, \qquad \text{if } n \neq 0. \]


  1. Proof. Here we compute, using the expansion/contraction of the interval of integration to get rid of the nx

        \[  \int_0^{2 \pi} \sin (nx) \, dx = \frac{1}{n} \int_0^{2 n \pi} \sin x \, dx = \frac{1}{n}(1 - \cos (2n \pi)) = 0. \]

    And,

        \[  \int_0^{2 \pi} \cos (nx) \, dx = \frac{1}{n} \int_0^{2n \pi}  \cos x \, dx = \frac{1}{n} (\sin (2n\pi) - \sin 0) = 0. \qquad \blacksquare\]

  2. Proof. Here we have a bunch of computations using part (a) and the formulas for sine and cosine of a sum:

        \begin{align*}  \int_0^{2 \pi} \sin (nx) \cos (mx) \, dx &= \frac{1}{2} \int_0^{2 \pi} 2 \sin (nx) \cos (mx) \, dx \\  &= \frac{1}{2} \left( \int_0^{2 \pi} (\sin ((n+m)x) - \sin((n-m)x) ) \, dx \\  &= \frac{1}{2(n+m)} \int_0^{2 \pi (n+m)} \sin x \, dx - \frac{1}{2 (n-m)} \int_0^{2 \pi (n-m)} \sin x \, dx \\  & = 0 \end{align*}

    where we know n-m \neq 0 and n+m \neq 0 since n^2 \neq m^2.
    Next,

        \begin{align*}  \int_0^{2 \pi} \sin (nx) \sin (mx) \, dx &= -\frac{1}{2} \int_0^{2 \pi} - 2 \sin (nx) \cos (mx) \, dx \\  &= -\frac{1}{2} \int_0^{2 \pi} (\cos ((n+m)x) - \cos((n-m)x)) \, dx \\  &= - \frac{1}{2(n+m)} \int_0^{2 \pi (n+m)} \cos x \, dx + \frac{1}{2(n-m)} \int_0^{2 \pi (n-m)} \cos x \, dx \\  &= 0. \end{align*}

    Then,

        \begin{align*}  \int_0^{2 \pi} \cos (nx) \cos (mx) \, dx &= \int_0^{2 \pi} (\cos (nx) \cos (mx) - \sin (nx) \sin (mx) + \sin (nx) \sin (mx)) \ , dx \\  &= \int_0^{2 \pi} \cos (n+m)x \, dx + \int_0^{2 \pi} \sin (nx) \sin (mx) \, dx \\  & = \frac{1}{n+m} \int_0^{2 \pi (n+m)} \cos x \, dx \\  &= 0. \end{align*}

    And for the fourth integral formula,

        \begin{align*}  \int_0^{2 \pi} \sin^2 (nx) \, dx &= -\frac{1}{2n} \int_0^{2 \pi n} -2 \sin^2 x \, dx \\  &= - \frac{1}{2n} \int_0^{2 \pi} (1 - 2 \sin^2 x) \, dx + \frac{1}{2n} \int_0^{2 \pi n} dx \\  &= - \frac{1}{2n} \int_0^{2 \pi n} \cos (2x) \, dx + \pi \\  &= \pi - \frac{1}{4n} \int_0^{ \pi n} cos x \, dx \\  &= \pi.  \end{align*}

    Finally,

        \begin{align*}  \int_0^{2 \pi} \cos^2 nx \, dx &= \int_0^{2 \pi} dx - \int_0^{2 \pi} \sin^2 nx \, dx \\  &= 2 \pi - \pi \\  &= \pi. \qquad \blacksquare \end{align*}

2 comments

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):