7.3 Applications

Back

Remark 7.3.1. Why are we interested in orthogonal functions? Well, we

have something very like an orthogonal basis for a space of functions. I

could certainly project some other function in C[−_, _] onto these orthogonal

functions.

If we project a vector P in R3 onto three orthogonal axes, the projections

U, V,W have the useful property that they sum to P. This is indicated by

figure 7.2. The result is quite general:

Proposition 7.3.1. In any inner product space, if P is projected onto a

finite set {vj}, j 2 J of orthogonal vectors by

Pproj vj =

< P, vj >

< vj , vj >

vj = uj

then

P =

X

j2J

uj

7.3. APPLICATIONS 135

whenever P is in the span of the vj

Proof:

Since P is in the span of the {vj} certainly there are numbers tj such that

P =

X

j2J

tjvj

Then by bilinearity of the inner product we have

8 i 2 J < P, vi > = <

X

tjvj , vi >=

X

j2J

tj < vj , vi >

But since the different vj are orthogonal, < vj , vi > = 0 for i 6= j. Hence

< P, vi > = ti < vi, vi > and so

ti =

< P, vi >

< vi, vi >

and the result follows. _

Example 7.3.1. Take the function

sign(x) =

x

|x|

which is not defined at the origin, or make it zero there if you feel a need.

Now we calculate the projection down onto the vector sin(nt) in C[−_, _] by

using the inner product. Remember that the projection of v on u in any

inner product space is

< v,u >

< u,u >

u

The coefficient is

Z _

−_

sign(x) sin(nt) dt = 2

Z _

0

sin(nt) dt =

2

n

(1 − cos(n_))

divided by Z _

−_

sin2(nt) dt =

Z _

−_

1 − cos(2nt)

2

dt = _

So the projection of sign(x) on sin(nt) is

4

n_

sin(nt)

when n is odd and 0 when n is even.

The following Mathematica program is useful:

136 CHAPTER 7. FOURIER THEORY

Figure 7.3: Approximating a squarewave

Plot[(4/Pi)*(Sum[Sin[n*t]/n, {n, 1, 101, 2}]), {t, -Pi, Pi}]

This gives the sum from n = 1 to 101 in steps of 2 that is, taking only odd

terms, of the sum of the functions sin(nt) with the coefficients

4

n_

You can see the output in figure 7.3 and it is clearly an approximation to the

original discontinuous function. Certain things have happened to it in being

transmogrified to its new shape: It is now continuous and periodic. This

is because the sum of continuous component functions is continuous, and

each component function is defined over all R and is periodic over [−_, _],

so the sum must be also. If we plot the function over a larger range we get a

“square wave”, or a passing approximation to it. Try using the mathematica

notebook “squarewave” and playing with it. In particular try it for one term,

two terms, and so on, in the sum, to see how it builds up.

Exercise 7.3.1. Try to get a sawtooth function this way by taking the

function

tri(x) = sign(x) − x on the interval [−_, _]

Remark 7.3.2. It is fairly easy, given Mathematica, to explore this idea for

lots of functions. Try it. See parabola.nb in the mathematica notebooks for

a painless expansion of the parabola y = x2, but you should try it yourself

first.

Remark 7.3.3. One point to note is that I have done this for functions

not in C[−_, _], the one in the example and the one in the exercise are not

continuous. This needs thinking about.

7.4. FIDDLY THINGS 137

Remark 7.3.4. Another point to observe, we may have a sequence which

converges in the L2 metric but not in the supremum metric. Whether we

have convergence of any sort needs to be examined. Mucking about with the

sum of more and more terms (it’s called ‘experimental method’) certainly

gives the impression of some sort of convergence.

Remark 7.3.5. Another point to note is that the series of trig functions does

not appear to converge very smoothly to the sign function. It overshoots and

then oscillates. This overshoot is called the Gibbs Phenomenon and can be

investigated.