Docsity

Even and Odd Functions in Fourier Series: A Comprehensive Guide with Examples, Exams of Physics

Toggle sidebar
bg1
Even and odd functions
•We define an even function such that f(−x) = f(x)
•We define an odd function such that f(−x) = −f(x)
•Example, sin xis an odd function because sin −x=−sin x
•Example, cos xis an even function because cos −x= cos x
•Now consider a Fourier series of a periodic, even function f(x)
(f(−x) = f(x)), over the interval −π < x< π
f(x) = a0
2+
∞
X
n=1
ancos nx +
∞
X
n=1
bnsin nx
•Now consider the integrals to determine the coefficients, first a0
a0=1
πZπ
−π
f(x)dx =2
πZπ
0
f(x)dx
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Even and Odd Functions in Fourier Series: A Comprehensive Guide with Examples and more Exams Physics in PDF only on Docsity!

Even and odd functions

  • We define an even function such that f (−x) = f (x)
  • We define an odd function such that f (−x) = −f (x)
  • Example, sin x is an odd function because sin −x = − sin x
  • Example, cos x is an even function because cos −x = cos x
  • Now consider a Fourier series of a periodic, even function f (x) (f (−x) = f (x)), over the interval −π < x < π

f (x) = a^0 2

∑^ ∞

n=

an cos nx +

∑^ ∞

n=

bn sin nx

  • Now consider the integrals to determine the coefficients, first a 0

a 0 =^1 π

∫ (^) π

−π

f (x)dx =^2 π

∫ (^) π

0

f (x)dx

Even/odd functions continued

  • Next the an for finite n, we again use the fact that f (x) is even, and also cos nx is even,

an = π^1

∫ (^) π

−π

f (x) cos nxdx = π^2

∫ (^) π

0

f (x) cos nxdx

  • Next we can show bn = 0 when f (x) is even,

bn =

π

[∫ (^) π

0

f (x) sin nxdx −

∫ (^) π

0

f (x) sin nxdx

]

Example of an odd function

  • The step function provides us an example of an odd function
  • For the step function, we found a 0 = 1, so actually it is neither odd nor even, but if we define the step function as f (x) = − 1 /2 for −π < x < 0 and f (x) = 1/2 for 0 < x < π, then f (x) is odd and

f (x) =^2 π

sin x 1 +

sin 3x 3 +

sin 5x 5 +^ ...

  • The point is that the cos nx terms vanish (an = 0 for all n)
  • The advantage is that we could have predicted that an = 0 for all n even before trying to do the integral

Another example: even function

  • Find the expansion for f (x) = x^2 on the interval −π < x < π, periodically repeating with period 2π
  • For this case, f (x) is clearly even since f (−x) = (−x)^2 = x^2 = f (x), hence bn = 0 for each n, and

an =^2 π

∫ (^) π

0

x^2 cos nxdx

  • We find a 0 = 2 π 32
  • For the other n, we evaluate the integral (homework!) 2 π

∫ (^) π

0

x^2 cos nxdx =

n^2 (−1)

n

f (x) = π

2 3

[

− cos^ x 1

  • cos 2x 4

− cos 3x 9

]

Parseval’s theorem continued

  • Using the previous integrals, we find

1 2 l

∫ (^) l

−l

[f (x)]^2 dx =

2 a^0

∑^ ∞

n=

(a^2 n + b^2 n)

  • Example: Problem 5.8 and Problem 11.
  • Find the Fourier series for f (x) = 1 + x defined on −π < x < π

a 0 =^1 π

∫ (^) π

−π

(1 + x)dx = 2

an =^1 π

∫ (^) π

−π

(1 + x) cos nxdx = 0

bn = π^1

∫ (^) π

−π

(1 + x) sin nxdx = 2(−1)

n+ n

Example of Parseval’s theorem continued

  • Then Parseval’s theorem states,

1 2 π

∫ (^) π

−π

(1 + x)^2 dx = 1 +

∑^ ∞

n=

n^2 = 1 + 2

∑^ ∞

n=

n^2

  • Problem 11.8 asks us to evaluate

n=

1 n^2 , and from Parseval’s theorem we see that,

∑^ ∞

n=

n^2 =^ −^

2 +^

4 π

∫ (^) π

−π

(1 + x)^2 dx = π

2 6

  • Might even use to compute π!

π =

[ ∞

n=

n^2

] 1 / 2

Parseval’s theorem for complex Fourier series

  • When we average |f (x)|^2 = f ∗(x)f (x) over one period, we obtain

n=−∞ |cn|

2

  • Proof in problem 3, for f (x) periodic with periodicity 2π (−π < x < π) f (x) =

∑^ ∞

n=−∞

cneinx

  • We use the orthogonality of the functions einx^ , 1 2 π

∫ (^) π

−π

ei(n−m)x^ dx = δm,n

2 π

∫ (^) π

−π

f ∗(x)f (x)dx =

2 π

∑^ ∞

m=

∑^ ∞

n=

c m∗cn

∫ (^) π

−π

ei(m−n)x^ dx =

∑^ ∞

n=−∞

c∗ n cn

Another example: problem 2

  • We can also average [f (x)]^2 using the complex series (contrast to averaging |f (x)|^2 = f ∗(x)f (x))

2 π

∫ (^) π

−π

[f (x)]^2 dx = (^21) π

∑^ ∞

m=

∑^ ∞

n=

cmcn

∫ (^) π

−π

ei(m+n)x^ dx =

∑^ ∞

n=−∞

cnc−n

  • Consider the special case where f (x) is real, then the expansion in complex Fourier series is

f (x) =

∑^ ∞

n=−∞

cneinx^ = c 0 +

∑^ ∞

n=

cneinx^ + c−ne−inx^

  • Since f (x) is real, the complex parts must cancel, so using the Euler formula