Fourier series solutions III - Series representations of periodic functions

Representing periodic functions with sine functions


Our new goal is to replicate the theory of power series, only now using linear combinations of basic periodic functions instead of powers of x. We are building this new theory purposely to handle periodic functions, for which power series are particularly ill suited.

So, suppose f(t) is a periodic function.[1] For simplicity, let's assume for the moment that f has period 1. (However, we are not assuming the fundamental period of f is 1.) We wish to represent f as a linear combination of some
"basic" periodic functions. By our earlier work, the periods of a linear combinations of periodic functions are the common integer multiples of the periods of the component functions. Thus, if we want our linear combination to model , which has period 1, we had better restrict our attention to "basic" periodic functions with period 1. The functions that immediately come to mind are probably the scaled versions of sine:

sin⁑(2Ο€t),sin⁑(4Ο€t),…,sin⁑(2Ο€nt),…

Note that sin⁑(2Ο€nt) has fundamental period 1n, and hence period 1=nβ‹…1n, as well.

We might also like to horizontally shift some of these functions, i.e., adjust the phase. For example, to represent cos⁑(2Ο€t) we could use sin⁑(2Ο€t+Ο€). (Observe that if we allow n=0 then we have the function sin⁑(Ο•0), which is a constant function.) In general, then, we would like to allow functions of the form sin⁑(2Ο€nt+Ο•n) as constituting our family of "basic" functions with period 1. We've thus come to Fourier's big idea: given a function f(t) with period 1, find a way (if possible) to express f as

f(t)=βˆ‘n=0∞Ansin⁑(2Ο€nt+Ο•n),

for some numbers An,Ο•n. The sum on the right-hand side of the above equality is called a Fourier series. We will soon have three equivalent forms of such series, at which point we will refer to the current form as the sines-only (or phase-shifted sines) form.

There are at least three follow-up questions to this big idea:

  1. When can we express a function f as such a linear combination?
  2. Assuming it is possible, how can we determine the unknown numbers An and Ο•n?
  3. Assuming we succeed in representing f as such a combination, how is that useful?

We will focus mainly on answering the second and third questions, but we will give some indications as to the answer to the first question. It turns out that Fourier series will be much easier to deal with if we first spend some time learning how to write them in a different (but equivalent) form.

A comparison with power series

Let us quickly compare the above questions and their answers in the case of power series.

We answered the third question for power series previously: we can use power series to help find solutions to differential equations. There are other uses, as well, but for now we will consider this their main utility. The same will be true for us for Fourier series.

The second question for power series is the following: given a function f(x), when can we write

f(x)=βˆ‘n=0∞anxn?

To answer this, we first suppose we are able to write f in such a form. Let us temporarily denote the power series on the right by P(x). Then f(x)=P(x) on some open interval containing x=0, so in particular we must have f(0)=P(0). Since P(0)=a0, this implies a0=f(0). More generally, every derivative of f and P must agree at x=0, i.e., f(k)(0)=P(k)(0) for every positive integer k. Since P(k)(x)=βˆ‘n=k∞n(nβˆ’1)β‹―(nβˆ’k+1)anxnβˆ’k, we have P(k)(0)=k!ak, and hence we must have ak=f(k)(0)k!. Thus, we have deduced that the power series P(x) must be

P(x)=βˆ‘n=0∞f(n)(0)n!xn.

You might recognize this as Taylor's formula for the power series representation of f at x=0.

This answers the second question, but it does not actually answer the first. What we have shown is that if f can be represented by a power series centered at x=0, then that power series must be the one given above. At the very least, we see that the function f must be infinitely differentiable at x=0. This is usually, but not always, enough. The general answer is just annoying enough that we created a word to describe when f can be represented by a power series centered at x=0. That is when we say f is analytic at x=0.

Using both sines and cosines


You might be asking yourself "Why we are not using the cosine function, which is arguably equally as basic as the sine function?" That's a fair question, and fortunately there's a simple answer. We can convert the above "sines-only" Fourier series into a "sines-and-cosine" form. We simply need to use the basic trig identity sin⁑(α+β)=sin⁑(α)cos⁑(β)+sin⁑(β)cos⁑(α). Using this, we have

sin⁑(2Ο€nt+Ο•n)=sin⁑(2Ο€nt)cos⁑(Ο•n)+cos⁑(2Ο€nt)sin⁑(Ο•n).

Applying this to each term in the series, we can rewrite our original Fourier series in the form

βˆ‘n=0∞(ancos⁑(2Ο€nt)+bnsin⁑(2Ο€nt)),

where an=Ansin⁑(Ο•n) and bn=Ancos⁑(Ο•n). We have effectively traded the phase shift in the sines for some cosines. We call this new type of series a sines-and-cosines form of a Fourier series. We could also similarly convert a series of the above form back into a phase-shifted sine series.

Classically, this new sines-and-cosines form was the preferred form of Fourier series. For our needs, however, it is still a bit unwieldy and obfuscates several very nice properties of Fourier series. Instead, we will reformulate our series in an even more elegant and compact form, which will make most of our computations much simpler. We will do this using the complex exponential function.

Using complex exponential functions


Recall[2] that the complex exponential function satisfies the following identity:

Euler's Formula

For any real number ΞΈ we have the following equality of complex numbers:

eiθ=cos⁑(θ)+isin⁑(θ).

Here are a few convenient consequences:

We can use the two equalities

eiΞΈ=cos⁑(ΞΈ)+isin⁑(ΞΈ)eβˆ’iΞΈ=cos⁑(ΞΈ)βˆ’isin⁑(ΞΈ)

to express both cos⁑(ΞΈ) and sin⁑(ΞΈ) in terms of eiΞΈ and eβˆ’iΞΈ. Indeed, if we add the two equations above we obtain

eiΞΈ+eβˆ’iΞΈ=2cos⁑(ΞΈ),

and so

cos⁑(ΞΈ)=eiΞΈ+eβˆ’iΞΈ2.

Similarly, if we subtract the two equations above we obtain

eiΞΈβˆ’eβˆ’iΞΈ=2isin⁑(ΞΈ),

and so

sin⁑(ΞΈ)=eiΞΈβˆ’eβˆ’iΞΈ2i.

We can now freely convert back and forth between sines and cosines, and complex exponential functions:

Conversion between sines-and-cosines and complex exponential functions

We have the following equalities, for all real values of ΞΈ:

eiΞΈ=cos⁑(ΞΈ)+isin⁑(ΞΈ)cos⁑(ΞΈ)=eiΞΈ+eβˆ’iΞΈ2sin⁑(ΞΈ)=eiΞΈβˆ’eβˆ’iΞΈ2i

Example

Suppose f(t) is the following sines-and-cosines Fourier polynomial, i.e., a Fourier series with only finite many terms:

f(t)=3+2cos⁑(2Ο€t)βˆ’sin⁑(2Ο€t)+3cos⁑(4Ο€t)+2sin⁑(4Ο€t).

Using the above relations, we can rewrite this function in terms of complex exponential functions, as so:

f(t)=3+2β‹…e2Ο€it+eβˆ’2Ο€it2βˆ’e2Ο€itβˆ’eβˆ’2Ο€it2i+3β‹…e4Ο€it+eβˆ’4Ο€it2+2β‹…e4Ο€itβˆ’eβˆ’4Ο€it2i.

Let's rewrite this so that exponential terms with the same exponent have been combined, and then the terms are ordered according to the exponent (from most negative to most positive). We obtain

f(t)=(32+i)eβˆ’4Ο€it+(1βˆ’12i)eβˆ’2Ο€it+3+(1+12i)e2Ο€it+(32βˆ’i)e4Ο€it.

Let's use an index n that keeps track of theses terms, so that e2Ο€int corresponds to index n:

f(t)=(32+i)eβˆ’4Ο€it⏟n=βˆ’2+(1βˆ’12i)eβˆ’2Ο€it⏟n=βˆ’1+3⏟n=0+(1+12i)e2Ο€it⏟n=1+(32βˆ’i)e4Ο€it⏟n=2.

This is very suggestive...


Looking at the previous example, it should be clear that any sines-and-cosines Fourier series can be converted to a sum involving these complex exponential functions. More explicitly, if we started with a finite sum of the form

f(t)=βˆ‘n=0N(ancos⁑(2Ο€nt)+bnsin⁑(2Ο€nt)),

then using our relations above we could rewrite this in the form

f(t)=βˆ‘n=0N(12(anβˆ’ibn)e2Ο€int+12(an+ibn)eβˆ’2Ο€int).

If we did as in the above example, and ordered the terms according to the value of the exponent, we could write this more simply in the form

f(t)=βˆ‘n=βˆ’NNcne2Ο€int,

where c0=a0 and for n>0 we have

cn=12(anβˆ’ibn)cβˆ’n=12(an+ibn).

It should now be reasonable to define:

Definition of complex Fourier series

A complex Fourier series is a series of the form

βˆ‘m=βˆ’βˆžβˆžcme2Ο€imt,

where cm are complex numbers.

Note that we are ignoring any questions of convergence, at least for now.

Notice how similar this new type of series is to a power series!

Suggested next notes


Fourier series solutions IV - Computing Fourier coefficients


  1. For most of these notes we will default to using t for our periodic variable. This is because most of our examples will involve periodic functions of time. It will also help us differentiate our new type of series from power series. β†©οΈŽ

  2. Eventually I'm make a note on this and include the link here. β†©οΈŽ