fourier series of a function - kennesaw state university

27
Fourier Series of a Function Philippe B. Laval KSU Today Philippe B. Laval (KSU) Fourier Series Today 1 / 26

Upload: others

Post on 25-Oct-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Fourier Series of a Function

Philippe B. Laval

KSU

Today

Philippe B. Laval (KSU) Fourier Series Today 1 / 26

Introduction

We first review how to derive the Fourier series of a function. We thenstate some important results about Fourier series.As noted earlier, Fourier Series are special expansions of functions of theform

f (x) = A0 +∞∑n=1

(An cos

nπxL+ Bn sin

nπxL

)Finding the Fourier series for a given function f (x) (if it exists) amountsto finding the coeffi cients An for n = 0, 1, 2, ... and Bn for n = 1, 2, 3, ....

Philippe B. Laval (KSU) Fourier Series Today 2 / 26

Euler Formulas for the Coeffi cients

In the previous chapter, we already learned how to find the coeffi cients Anand Bn. We remind the reader of the formulas and look at some examples.

DefinitionThe Fourier series of a function f (x) on the interval [−L, L] where L > 0is given by

f (x) = A0 +∞∑n=1

(An cos

nπxL+ Bn sin

nπxL

)(1)

The coeffi cients which appear in the Fourier series were known to Eulerbefore Fourier, hence they bear his name. They are given by the followingformulas.

Philippe B. Laval (KSU) Fourier Series Today 3 / 26

Euler Formulas for the Coeffi cients

TheoremThe coeffi cients in equation 1 are given by

A0 =12L

∫ L

−Lf (x) dx (2)

An =1L

∫ L

−Lf (x) cos

nπxLdx for n = 1, 2, ... (3)

Bn =1L

∫ L

−Lf (x) sin

nπxLdx for n = 1, 2, ... (4)

Philippe B. Laval (KSU) Fourier Series Today 4 / 26

Euler Formulas for the Coeffi cients

Definition

For a positive integer N, we denote the N th partial sum of the Fourierseries of f by SN (x). So, we have

SN (x) = A0 +N∑n=1

(An cos

nπxL+ Bn sin

nπxL

)We now illustrate what we did with some examples.

Philippe B. Laval (KSU) Fourier Series Today 5 / 26

Examples

Find the Fourier series off (x) =

∣∣sin x2 ∣∣ on [−π, π].

We should have found

A0 =2π

An =−4

π (4n2 − 1)Bn = 0∣∣∣sin x2

∣∣∣ = 2π+∞∑n=1

−4π (4n2 − 1) cos nx

­10 ­5 5 10

1

x

y

Figure: Graph of∣∣sin x2 ∣∣ and S2 (x)

­10 ­5 5 10

1

x

y

Figure: Graph of∣∣sin x2 ∣∣ and S10 (x)Philippe B. Laval (KSU) Fourier Series Today 6 / 26

Examples

Find the Fourier series off (x) =

∣∣sin x2 ∣∣ on [−π, π].We should have found

A0 =2π

An =−4

π (4n2 − 1)Bn = 0∣∣∣sin x2

∣∣∣ = 2π+∞∑n=1

−4π (4n2 − 1) cos nx

­10 ­5 5 10

1

x

y

Figure: Graph of∣∣sin x2 ∣∣ and S2 (x)

­10 ­5 5 10

1

x

y

Figure: Graph of∣∣sin x2 ∣∣ and S10 (x)Philippe B. Laval (KSU) Fourier Series Today 6 / 26

Examples

We now look at a 2π-periodic function with discontinuities and deriveits Fourier series using the formulas of this section (assuming it islegitimate). This function is called the sawtooth function. It isdefined by

g (x) ={ 1

2 (π − x) if 0 < x ≤ 2πg (x + 2π) otherwise

Find the Fourier series for this function. Plot this function as well asS1 (x) ,S7 (x) ,S20 (x) where SN (x) is the N th partial sum of itsFourier series.

Philippe B. Laval (KSU) Fourier Series Today 7 / 26

Examples

We should have found:

A0 = 0

An = 0

Bn =1n

g (x) =∞∑n=1

sin nxn

­5 5 10

­4­2

24

x

y

Graph of the sawtooth function(black) and S1 (x) (red)

­5 5 10

­4­2

24

x

y

Graph of the sawtooth function(black) and S7 (x) (red)

Philippe B. Laval (KSU) Fourier Series Today 8 / 26

Examples

­5 5 10

­4

­2

2

4

x

y

Graph of the sawtooth function(black) and S20 (x) (red)

­5 5 10

­4

­2

2

4

x

y

Graph of the sawtooth function(black) and S100 (x) (red)

Philippe B. Laval (KSU) Fourier Series Today 9 / 26

Some Remarks

Several important facts are worth noticing here.

1 The Fourier series seems to agree with the function, except at thepoints of discontinuity.

2 At the points of discontinuity, the series converges to 0, which is theaverage value of the function from the left and from the right.

3 Near the points of discontinuity, the Fourier series overshoots itslimiting values. This is a well known phenomenon, known as Gibbsphenomenon. You can see an online simulation of the Gibbsphenomenon

Philippe B. Laval (KSU) Fourier Series Today 10 / 26

Piecewise Continuous and Piecewise Smooth Functions

DefinitionWe will denote f (c−) = lim

x→c−f (x) and f (c+) = lim

x→c+f (x)

Remembering that a function f is continuous at c if and only iflimx→c

f (x) = f (c), we see that a function f is continuous at c if and only if

f (c−) = f (c+) = f (c)

Definition (Piecewise Continuous)

A function f is said to be piecewise continuous on the interval [a, b] if thefollowing are satisfied:

1 f (a+) and f (b−) exist.2 f is defined and continuous on (a, b) except possibly at a finitenumber of points in (a, b) where the left and right limit at thesepoints exist. Such points are called jump discontinuities.

Philippe B. Laval (KSU) Fourier Series Today 11 / 26

Piecewise Continuous and Piecewise Smooth Functions

Definition (Piecewise Smooth)

A function f , defined on [a, b] is said to be piecewise smooth if f and f ′

are piecewise continuous on [a, b].

DefinitionThe average of f at c is defined to be

f (c−) + f (c+)2

Clearly, if f is continuous at c , then its average at c is f (c).

Philippe B. Laval (KSU) Fourier Series Today 12 / 26

Piecewise Continuous and Piecewise Smooth Functions

ExampleIs the function f (x) = bxc piecewise continuous on [−1, 1]?

Example

Is the function f (x) =1xpiecewise continuous on [−1, 1]?

ExampleIs the sawtooth function piecewise smooth on [−10, 10]?

Example

Is the function x13 piecewise smooth on [−1, 1]?

Philippe B. Laval (KSU) Fourier Series Today 13 / 26

Convergence Theorem for Fourier Series

TheoremIf f is a piecewise smooth function on [−L, L], then, ∀x ∈ [−L, L]

f (x−) + f (x+)2

= A0 +∞∑n=1

(An cos

nπxL+ Bn sin

nπxL

)(5)

where the coeffi cients are given by equations 2, 3, and 4. In particular, if fis piecewise smooth and continuous at x, then

f (x) = A0 +∞∑n=1

(An cos

nπxL+ Bn sin

nπxL

)(6)

Thus, at points where f is continuous, the Fourier series converges to thefunction. At points of discontinuity, the series converges to the average ofthe function at these points. This was the case in the example with thesawtooth function.

Philippe B. Laval (KSU) Fourier Series Today 14 / 26

One More Example

Example (Triangular Wave)

The 2π-periodic triangular wave is given on the interval [−π, π] by

h (x) ={π + x if −π ≤ x ≤ 0π − x if 0 ≤ x ≤ π

1 Find its Fourier series.2 Plot h (x) as well as some partial sums of its Fourier series.3 Show how this series could be used to approximate π

(actually π2

).

Philippe B. Laval (KSU) Fourier Series Today 15 / 26

One More Example

We should have found:

A0 =π

2

An =

{0 if n even4πn2 if n odd

Bn = 0

h (x) =π

2+4π

∞∑n=0

cos (2n + 1) x

(2n + 1)2

Philippe B. Laval (KSU) Fourier Series Today 16 / 26

One More Example

­8 ­6 ­4 ­2 2 4 6 8

2

4

x

y

Figure: Plot of the triangular wave andS1 (x)

­8 ­6 ­4 ­2 2 4 6 8

2

4

x

y

Figure: Plot of the triangular wave andS5 (x)

Philippe B. Laval (KSU) Fourier Series Today 17 / 26

Fourier Series of Even and Odd Functions

We finish this section by noticing that in the special cases that f is eithereven or odd, the series simplifies greatly.

1 If f is even, then∫ L−L f (x) sin

nπxL

is odd so that Bn = 0 and the

series is simply a cosine series.

2 If f is odd, then∫ L−L f (x) cos

nπxL

is odd and An = 0 and the series is

simply a sine series.

We summarize this in a theorem.

Philippe B. Laval (KSU) Fourier Series Today 18 / 26

Fourier Series of Even and Odd Functions

Theorem

Suppose that on [−L, L] f has the Fourier series representation

f (x) = A0 +∞∑n=1

[An cos

nπxL+ Bn sin

nπxL

]Then:

1 If f is even then Bn = 0 for all n and in this case

f (x) = A0 +∞∑n=1

An cosnπxL

2 If f is odd then An = 0 for all n and in this case

f (x) =∞∑n=1

Bn sinnπxL

Philippe B. Laval (KSU) Fourier Series Today 19 / 26

Periodic Extensions

The most we were able to establish above is that given an arbitrarypiecewise smooth function f and an interval [−L, L], the Fourier series of fconverges to either f (if f is continuous) or the average of f on [−L, L].We now define a new function to which the Fourier series of f willconverge for all reals.

Definition (Periodic Extension)

Given a function f and an interval [−L, L] on which f is defined, by theperiodic extension of f of period 2L, we mean the new function F weobtain by taking the graph of f on the interval [−L.L] and repeating it forthe other intervals of length 2L in other words F (x) = f (x) if−L ≤ x ≤ L and F (x + T ) = F (x) for all x where T = 2L.

We illustrate this with some examples.

Philippe B. Laval (KSU) Fourier Series Today 20 / 26

Periodic Extensions

The first graph shows y = |x |.The portion of this graph forx ∈ [−1, 1] is shown in red.The second graph shows thegraph of y = |x | in blue and itsperiodic extension on [−1, 1] inred.

Note that the periodic extensionis continuous.

Figure: Graph of |x |

Figure: Graph of |x | and its periodicextension on [−1, 1]Philippe B. Laval (KSU) Fourier Series Today 21 / 26

Periodic Extensions

The first graph shows y = x3.The portion of this graph forx ∈ [−1, 1] is shown in red.The second graph shows thegraph of y = x3 in blue and itsperiodic extension on [−1, 1] inred.

Note that the periodic extensionis not continuous though theoriginal function is continuous.

Figure: Graph of x3

Figure: Graph of x3 and its periodicextension on [−1, 1]Philippe B. Laval (KSU) Fourier Series Today 22 / 26

Periodic Extensions

We can now update our theorem on convergence of Fourier series.

Theorem (Convergence Theorem for Fourier Series)

Suppose that f is a piecewise smooth function on [−L, L]. Then theFourier series of f converges to:

1 the periodic extension of f where the periodic extension is continuous.

2 the average of f (x) that isf (x+) + f (x−)

2at points x where the

periodic extension has a jump discontinuity.

We illustrate it with some examples.

Philippe B. Laval (KSU) Fourier Series Today 23 / 26

Periodic Extensions

Consider f (x) = |x |.Its Fourier series on [−1, 1] isf (x) =

12+

10∑n=1

2 (−1)n − 2(nπ)2

cos nπx

Figure: Graph of |x | and itsperiodic extension on [−1, 1]

­4 ­2 0 2 4

1

2

3

4

5

x

y

Graph of |x | and its Fourier series on[−1, 1]

Philippe B. Laval (KSU) Fourier Series Today 24 / 26

Periodic Extensions

Remember above, we derivedthe Fourier series of thesawtooth function.

The sawtooth function has jumpdiscontinuities.

Its Fourier series agrees with thefunction where the function iscontinuous.

At jump discontinuities, itsFourier series converges to theaverage of the function there,

that is−1+ 12

= 0

­5 5 10

­4

­2

2

4

x

y

Graph of the sawtooth function(black) and S100 (x) (red)

Philippe B. Laval (KSU) Fourier Series Today 25 / 26

Exercises

See the problems at the end of my notes on Fourier series of a function.

Philippe B. Laval (KSU) Fourier Series Today 26 / 26