*i.e.*you are probably on a mobile phone). Due to the nature of the mathematics on this site it is best views in landscape mode. If your device is not in landscape mode many of the equations will run off the side of your device (should be able to scroll to see them) and some of the menu items will be cut off due to the narrow screen width.

### Section 8.3 : Periodic Functions & Orthogonal Functions

This is going to be a short section. We just need to have a brief discussion about a couple of ideas that we’ll be dealing with on occasion as we move into the next topic of this chapter.

#### Periodic Function

The first topic we need to discuss is that of a periodic function. A function is said to be **periodic** with **period \(T\)** if the following is true,

The following is a nice little fact about periodic functions.

#### Fact 1

If \(f\) and \(g\) are both periodic functions with period \(T\) then so is \(f + g\) and \(fg\).

This is easy enough to prove so let’s do that.

\[\begin{align*}& \left( {f + g} \right)\left( {x + T} \right) = f\left( {x + T} \right) + g\left( {x + T} \right) = f\left( x \right) + g\left( x \right) = \left( {f + g} \right)\left( x \right)\\ & \left( {fg} \right)\left( {x + T} \right) = f\left( {x + T} \right)g\left( {x + T} \right) = f\left( x \right)g\left( x \right) = \left( {fg} \right)\left( x \right)\end{align*}\]The two periodic functions that most of us are familiar are sine and cosine and in fact we’ll be using these two functions regularly in the remaining sections of this chapter. So, having said that let’s close off this discussion of periodic functions with the following fact,

#### Fact 2

\(\sin \left( {\omega \,x} \right)\) and \(\cos \left( {\omega \,x} \right)\) are periodic functions with period \(\displaystyle T = \frac{{2\pi }}{\omega }\).

#### Even and Odd Functions

The next quick idea that we need to discuss is that of even and odd functions.

Recall that a function is said to be **even** if,

and a function is said to be **odd** if,

The standard examples of even functions are \(f\left( x \right) = {x^2}\) and \(g\left( x \right) = \cos \left( x \right)\) while the standard examples of odd functions are \(f\left( x \right) = {x^3}\) and \(g\left( x \right) = \sin \left( x \right)\). The following fact about certain integrals of even/odd functions will be useful in some of our work.

#### Fact 3

- If \(f\left( x \right)\) is an even function then, \[\int_{{ - L}}^{L}{{f\left( x \right)\,dx}} = 2\int_{0}^{L}{{f\left( x \right)\,dx}}\]
- If \(f\left( x \right)\) is an odd function then, \[\int_{{ - L}}^{L}{{f\left( x \right)\,dx}} = 0\]

Note that this fact is only valid on a “symmetric” interval, *i.e.* an interval in the form \(\left[ { - L,L} \right]\). If we aren’t integrating on a “symmetric” interval then the fact may or may not be true.

#### Orthogonal Functions

The final topic that we need to discuss here is that of orthogonal functions. This idea will be integral to what we’ll be doing in the remainder of this chapter and in the next chapter as we discuss one of the basic solution methods for partial differential equations.

Let’s first get the definition of orthogonal functions out of the way.

#### Definition

- Two non-zero functions, \(f\left( x \right)\) and \(g\left( x \right)\), are said to be
**orthogonal**on \(a \le x \le b\) if, \[\int_{{\,a}}^{{\,b}}{{f\left( x \right)g\left( x \right)\,dx}} = 0\] - A set of non-zero functions, \(\left\{ {{f_i}\left( x \right)} \right\}\), is said to be
**mutually orthogonal**on \(a \le x \le b\) (or just an**orthogonal set**if we’re being lazy) if \({f_i}\left( x \right)\) and \({f_j}\left( x \right)\) are orthogonal for every \(i \ne j\). In other words, \[\int_{{\,a}}^{{\,b}}{{{f_i}\left( x \right){f_j}\left( x \right)\,dx}} = \left\{ {\begin{array}{*{20}{l}}0&{i \ne j}\\{c > 0}&{i = j}\end{array}} \right.\]

Note that in the case of \(i = j\) for the second definition we know that we’ll get a positive value from the integral because,

\[\int_{{\,a}}^{{\,b}}{{{f_i}\left( x \right){f_i}\left( x \right)\,dx}} = \int_{{\,a}}^{{\,b}}{{{{\left[ {{f_i}\left( x \right)} \right]}^2}\,dx}} > 0\]Recall that when we integrate a positive function we know the result will be positive as well.

Also note that the non-zero requirement is important because otherwise the integral would be trivially zero regardless of the other function we were using.

Before we work some examples there are a nice set of trig formulas that we’ll need to help us with some of the integrals.

\[\begin{align*}\sin \alpha \cos \beta & = \frac{1}{2}\left[ {\sin \left( {\alpha - \beta } \right) + \sin \left( {\alpha + \beta } \right)} \right]\\ \sin \alpha \sin \beta & = \frac{1}{2}\left[ {\cos \left( {\alpha - \beta } \right) - \cos \left( {\alpha + \beta } \right)} \right]\\ \cos \alpha \cos \beta & = \frac{1}{2}\left[ {\cos \left( {\alpha - \beta } \right) + \cos \left( {\alpha + \beta } \right)} \right]\end{align*}\]Now let’s work some examples that we’ll need over the course of the next couple of sections.

This is not too difficult to do. All we really need to do is evaluate the following integral.

\[\int_{{ - L}}^{L}{{\cos \left( {\frac{{n\pi x}}{L}} \right)\cos \left( {\frac{{m\pi x}}{L}} \right)\,dx}}\]Before we start evaluating this integral let’s notice that the integrand is the product of two even functions and so must also be even. This means that we can use Fact 3 above to write the integral as,

\[\int_{{ - L}}^{L}{{\cos \left( {\frac{{n\pi x}}{L}} \right)\cos \left( {\frac{{m\pi x}}{L}} \right)\,dx}} = 2\int_{0}^{L}{{\cos \left( {\frac{{n\pi x}}{L}} \right)\cos \left( {\frac{{m\pi x}}{L}} \right)\,dx}}\]There are two reasons for doing this. First having a limit of zero will often make the evaluation step a little easier and that will be the case here. We’ll discuss the second reason after we’re done with the example.

Now, in order to do this integral we’ll actually need to consider three cases.

\(\underline {n = m = 0} \)

In this case the integral is very easy and is,

\(\underline {n = m \ne 0} \)

This integral is a little harder than the first case, but not by much (provided we recall a simple trig formula). The integral for this case is,

Now, at this point we need to recall that \(n\) is an integer and so \(\sin \left( {2n\pi } \right) = 0\) and our final value for the integral is,

\[\int_{{ - L}}^{L}{{{{\cos }^2}\left( {\frac{{n\pi x}}{L}} \right)\,dx}} = 2\int_{0}^{L}{{{{\cos }^2}\left( {\frac{{n\pi x}}{L}} \right)\,dx}} = L\]The first two cases are really just showing that if \(n = m\) the integral is not zero (as it shouldn’t be) and depending upon the value of \(n\) (and hence \(m\)) we get different values of the integral. Now we need to do the third case and this, in some ways, is the important case since we must get zero out of this integral in order to know that the set is an orthogonal set. So, let’s take care of the final case.

\(\underline {n \ne m} \)

This integral is the “messiest” of the three that we’ve had to do here. Let’s just start off by writing the integral down.

In this case we can’t combine/simplify as we did in the previous two cases. We can however, acknowledge that we’ve got a product of two cosines with different arguments and so we can use one of the trig formulas above to break up the product as follows,

\[\begin{align*}\int_{{ - L}}^{L}{{\cos \left( {\frac{{n\pi x}}{L}} \right)\cos \left( {\frac{{m\pi x}}{L}} \right)\,dx}} & = 2\int_{0}^{L}{{\cos \left( {\frac{{n\pi x}}{L}} \right)\cos \left( {\frac{{m\pi x}}{L}} \right)\,dx}}\\ & = \int_{0}^{L}{{\cos \left( {\frac{{\left( {n - m} \right)\pi x}}{L}} \right) + \cos \left( {\frac{{\left( {n + m} \right)\pi x}}{L}} \right)\,dx}}\\ & = \left[ {\frac{L}{{\left( {n - m} \right)\pi }}\sin \left( {\frac{{\left( {n - m} \right)\pi x}}{L}} \right) + \frac{L}{{\left( {n + m} \right)\pi }}\sin \left( {\frac{{\left( {n + m} \right)\pi x}}{L}} \right)} \right]_0^L\\ & = \frac{L}{{\left( {n - m} \right)\pi }}\sin \left( {\left( {n - m} \right)\pi } \right) + \frac{L}{{\left( {n + m} \right)\pi }}\sin \left( {\left( {n + m} \right)\pi } \right)\end{align*}\]Now, we know that \(n\) and \(m\) are both integers and so \(n - m\) and \(n + m\) are also integers and so both of the sines above must be zero and all together we get,

\[\int_{{ - L}}^{L}{{\cos \left( {\frac{{n\pi x}}{L}} \right)\cos \left( {\frac{{m\pi x}}{L}} \right)\,dx}} = 2\int_{0}^{L}{{\cos \left( {\frac{{n\pi x}}{L}} \right)\cos \left( {\frac{{m\pi x}}{L}} \right)\,dx}} = 0\]So, we’ve shown that if \(n \ne m\) the integral is zero and if \(n = m\) the value of the integral is a positive constant and so the set is mutually orthogonal.

In all of the work above we kept both forms of the integral at every step. Let’s discuss why we did this a little bit. By keeping both forms of the integral around we were able to show that not only is \(\left\{ {\cos \left( {\frac{{n\pi x}}{L}} \right)} \right\}_{n\,\, = \,\,0}^\infty \) mutually orthogonal on \( - L \le x \le L\) but it is also mutually orthogonal on \(0 \le x \le L\). The only difference is the value of the integral when \(n = m\)and we can get those values from the work above.

Let’s take a look at another example.

First, we’ll acknowledge from the start this time that we’ll be showing orthogonality on both of the intervals. Second, we need to start this set at \(n = 1\) because if we used \(n = 0\) the first function would be zero and we don’t want the zero function to show up on our list.

As with the first example all we really need to do is evaluate the following integral.

\[\int_{{ - L}}^{L}{{\sin \left( {\frac{{n\pi x}}{L}} \right)\sin \left( {\frac{{m\pi x}}{L}} \right)\,dx}}\]In this case integrand is the product of two odd functions and so must be even. This means that we can again use Fact 3 above to write the integral as,

\[\int_{{ - L}}^{L}{{\sin \left( {\frac{{n\pi x}}{L}} \right)\sin \left( {\frac{{m\pi x}}{L}} \right)\,dx}} = 2\int_{0}^{L}{{\sin \left( {\frac{{n\pi x}}{L}} \right)\sin \left( {\frac{{m\pi x}}{L}} \right)\,dx}}\]We only have two cases to do for the integral here.

\(\underline {n = m} \)

Not much to this integral. It’s pretty similar to the previous examples second case.

Summarizing up we get,

\[\int_{{ - L}}^{L}{{{{\sin }^2}\left( {\frac{{n\pi x}}{L}} \right)\,dx}} = 2\int_{0}^{L}{{{{\sin }^2}\left( {\frac{{n\pi x}}{L}} \right)\,dx}} = L\]\(\underline {n \ne m} \)

As with the previous example this can be a little messier but it is also nearly identical to the third case from the previous example so we’ll not show a lot of the work.

As with the previous example we know that \(n\) and \(m\) are both integers a and so both of the sines above must be zero and all together we get,

\[\int_{{ - L}}^{L}{{\sin \left( {\frac{{n\pi x}}{L}} \right)\sin \left( {\frac{{m\pi x}}{L}} \right)\,dx}} = 2\int_{0}^{L}{{\sin \left( {\frac{{n\pi x}}{L}} \right)\sin \left( {\frac{{m\pi x}}{L}} \right)\,dx}} = 0\]So, we’ve shown that if \(n \ne m\) the integral is zero and if \(n = m\) the value of the integral is a positive constant and so the set is mutually orthogonal.

We’ve now shown that \(\left\{ {\sin \left( {\frac{{n\pi x}}{L}} \right)} \right\}_{n\,\, = \,\,1}^\infty \) is mutually orthogonal on \( - L \le x \le L\) and on \(0 \le x \le L\).

We need to work one more example in this section.

This example is a little different from the previous two examples. Here we want to show that together both sets are mutually orthogonal on \( - L \le x \le L\). To show this we need to show three things. First (and second actually) we need to show that individually each set is mutually orthogonal and we’ve already done that in the previous two examples. The third (and only) thing we need to show here is that if we take one function from one set and another function from the other set and we integrate them we’ll get zero.

Also, note that this time we really do only want to do the one interval as the two sets, taken together, are not mutually orthogonal on \(0 \le x \le L\). You might want to do the integral on this interval to verify that it won’t always be zero.

So, let’s take care of the one integral that we need to do here and there isn’t a lot to do. Here is the integral.

\[\int_{{ - L}}^{L}{{\sin \left( {\frac{{n\pi x}}{L}} \right)\cos \left( {\frac{{m\pi x}}{L}} \right)\,dx}}\]The integrand in this case is the product of an odd function (the sine) and an even function (the cosine) and so the integrand is an odd function. Therefore, since the integral is on a symmetric interval, *i.e.* \( - L \le x \le L\), and so by Fact 3 above we know the integral must be zero or,

So, in previous examples we’ve shown that on the interval \( - L \le x \le L\) the two sets are mutually orthogonal individually and here we’ve shown that integrating a product of a sine and a cosine gives zero. Therefore, as a combined set they are also mutually orthogonal.

We’ve now worked three examples here dealing with orthogonality and we should note that these were not just pulled out of the air as random examples to work. In the following sections (and following chapter) we’ll need the results from these examples. So, let’s summarize those results up here.

- \(\displaystyle \left\{ {\cos \left( {\frac{{n\pi x}}{L}} \right)} \right\}_{n\,\, = \,\,0}^\infty \) and \(\left\{ {\sin \left( {\frac{{n\pi x}}{L}} \right)} \right\}_{n\,\, = \,\,1}^\infty \) are mutually orthogonal on \( - L \le x \le L\) as individual sets and as a combined set.
- \(\displaystyle \left\{ {\cos \left( {\frac{{n\pi x}}{L}} \right)} \right\}_{n\,\, = \,\,0}^\infty \) is mutually orthogonal on \(0 \le x \le L\).
- \(\displaystyle \left\{ {\sin \left( {\frac{{n\pi x}}{L}} \right)} \right\}_{n\,\, = \,\,1}^\infty \) is mutually orthogonal on \(0 \le x \le L\).

We will also be needing the results of the integrals themselves, both on \( - L \le x \le L\) and on \(0 \le x \le L\) so let’s also summarize those up here as well so we can refer to them when we need to.

- \(\displaystyle \int_{{ - L}}^{L}{{\cos \left( {\frac{{n\pi x}}{L}} \right)\cos \left( {\frac{{m\pi x}}{L}} \right)\,dx}} = \left\{ {\begin{array}{*{20}{l}}{2L}&{{\mbox{if }}n = m = 0}\\L&{{\mbox{if }}n = m \ne 0}\\0&{{\mbox{if }}n \ne m}\end{array}} \right.\)
- \(\displaystyle \int_{0}^{L}{{\cos \left( {\frac{{n\pi x}}{L}} \right)\cos \left( {\frac{{m\pi x}}{L}} \right)\,dx}} = \left\{ {\begin{array}{*{20}{l}}L&{{\mbox{if }}n = m = 0}\\{\frac{L}{2}}&{{\mbox{if }}n = m \ne 0}\\0&{{\mbox{if }}n \ne m}\end{array}} \right.\)
- \(\displaystyle \int_{{ - L}}^{L}{{\sin \left( {\frac{{n\pi x}}{L}} \right)\sin \left( {\frac{{m\pi x}}{L}} \right)\,dx}} = \left\{ {\begin{array}{*{20}{l}}L&{{\mbox{if }}n = m}\\0&{{\mbox{if }}n \ne m}\end{array}} \right.\)
- \(\displaystyle \int_{0}^{L}{{\sin \left( {\frac{{n\pi x}}{L}} \right)\sin \left( {\frac{{m\pi x}}{L}} \right)\,dx}} = \left\{ {\begin{array}{*{20}{l}}{\frac{L}{2}}&{{\mbox{if }}n = m}\\0&{{\mbox{if }}n \ne m}\end{array}} \right.\)
- \(\displaystyle \int_{{ - L}}^{L}{{\sin \left( {\frac{{n\pi x}}{L}} \right)\cos \left( {\frac{{m\pi x}}{L}} \right)\,dx}} = 0\)

With this summary we’ll leave this section and move off into the second major topic of this chapter : Fourier Series.