0% found this document useful (0 votes)
16 views3 pages

fourierseriesonotherintervals

Uploaded by

Akanksha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views3 pages

fourierseriesonotherintervals

Uploaded by

Akanksha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Fourier Series on other Intervals : Notes

from Class
In class on W we investigated Fourier series on intervals other than (-p, p). For functions that are 2
L periodic (where 2 L is the wavelength), we compute Fourier coefficients and the Fourier series
making the modifications derived in class :

f x = +  an cos  n p x  L + bn  bn sin n p x  L


¶ ¶
a0
2 n=1 n=1

where :

 f x dx  f x cos n p x  L dx  f x sin n p x  L dx


1 L 1 L 1 L
a0 = an = bn =
L -L L -L L -L
2
Example 1 : Consider f (x) = x on (-2, 2):
It is important to recall that 2L is the length of the interval, therefore 2 L = 2 - (-2) so that the value
of L to use in the calculations is L = 2.

 x dx  x cos n p x  2 dx  x sin n p x  2 dx
1 2 1 2 1 2
a0 = 2
an = 2
bn = 2
2 -2 2 -2 2 -2

Now, since f (x) is even on (-2, 2) we can employ symmetry to write :

 x dx  x cos n p x  2 dx
2 2 2 2
a0 = 2
an = 2
bn = 0
2 0 2 0

Now, going the lazy route and letting Mathematica do the heavy lifting :
In[330]:= a0  Integratex2 , x, 0, 2

8
Out[330]=
3
In[332]:= an  Integratex2 Cosn  x  2, x, 0, 2

8 2 n  Cosn    2  n2 2  Sinn 


Out[332]=
n3 3

and let' s just be sure :


In[337]:= bn  Integratex ^ 2 Sinn  x  2, x,  2, 2
Out[337]= 0

It is easy to show that the a coefficients reduce to :

-1n
16
an =
n p
2 2

-1n cos n p x  2
so that our Fourier series is :

f x = 

4 16
+
3 p2 n=1 n2
2 fourierseriesonotherintervals.nb

Verifying through Mathematica :

 16  2  Sum 1n Cosn  x  2  n2 , n, 1, 21, x,  6, 6


4
In[339]:= Plot
3
4

Out[339]= 2

-6 -4 -2 2 4 6

Note that the values are consistent with our function (f (2) = 4 ) and the function repeats with a
periodicity of 4.
Now, let' s examine the same function on (0, 4). Since our limits are not symmetric across the
origin, we cannot make use of symmetry arguments. Our integrals become :

 x dx  x cos n p x  2 dx  x sin n p x  2 dx
1 4 1 4 1 4
a0 = 2
an = 2
bn = 2
2 0 2 0 2 0

Even though the limits have changed, L = 2 since the total length of the interval, 2 L = 4.
Computing coefficients :
Cleara0, an, bn, L, f

L  2;
 I know I have stressed we should not use capital letters for variables;
In[340]:=

but I know that "L" is not restricted for Mathematica use, so let's use it. 
fx_ : x2
a0  1  L Integratefx, x, 0, 4
an  1  L Integratefx Cosn  x  L, x, 0, 4
bn  1  L Integratefx Sinn  x  L, x, 0, 4
32
Out[342]=

8 2 n  Cos2 n    1  2 n2 2  Sin2 n 


3

Out[343]=
n3 3
8 1   1  2 n2 2  Cos2 n   2 n  Sin2 n 
Out[344]= 
n3 3

And we get our three outputs. Knowing that sin (2 n p) is always zero for integer values of n, these
complicated expressions reduce quite nicely, and we have :
16 -16
an = bn =
n2 p 2 np
fourierseriesonotherintervals.nb 3

16 cos n p x  2 -16 sin n p x  2


Our Fourier series then becomes :

f x = + +
¶ ¶
32
6 n=1 p2 n2 n=1
p n2
Plotting three cycles of this function using the first 31 terms of the expansion :
In[345]:= Plot32  6  Sum16  2  Cosn  x  2  n2   16   Sinn  x  2  n, n, 1, 31, x,  4, 8

15

10

Out[345]=

-4 -2 2 4 6 8

And we reproduce our function over three cycles.

You might also like