FourierSeries
Grant Keady

 
You might find the lab on Fourier Series useful in answering this question. The Matlab lab sheet is here. Find the Fourier series of the 2p-periodic function
f(x) = x        for -p < x £ p
In entering your answers, we will denote the coefficients in the series by
f(x) = a0 + ¥
å
m=1 
( a2m-1 cos((2m-1) x) + b2m-1 sin((2m-1) x) + a2m cos(2m x) + b2m sin(2m x) )
In this sum, m goes from 1 to infinity.
The various coefficients for which you are asked are rational functions of m, and should be entered as such. Use the facts that sin(mp) = 0, cos(2mp) = 1, cos((2m-1)p) = -1 to remove trig functions from your expressions for the coefficients. Enter p as Pi.
5.1 (1 mark)
 

a0 =
Your last answer was:
0

Your answer is correct.
The mark for your last attempt was 1.00

The teacher's answer was:
0


5.2 (1 mark)
 
For the remainder of the question, m ³ 1:
a2m-1 =
Your last answer was:
0

Your answer is correct.
The mark for your last attempt was 1.00

The teacher's answer was:
0


5.3 (1 mark)
 

a2m =
Your last answer was:
0

Your answer is correct.
The mark for your last attempt was 1.00

The teacher's answer was:
0


5.4 (1 mark)
 

b2m-1 =
Your last answer was:
2 ( 2 m-1 ) -1

Your answer is correct.
The mark for your last attempt was 1.00

The teacher's answer was:
2 ( 2 m-1 ) -1

This can be entered as:
2/(2*m-1)


5.5 (1 mark)
 

b2m =
Your last answer was:
-m-1

Your answer is correct.
The mark for your last attempt was 1.00

The teacher's answer was:
-m-1

This can be entered as:
-1/m


Solution:
While there are general formulae for Fourier coefficients, it is usual, and saves effort, to check, at the beginning, whether the function is even or odd. Why? ...
  • Even functions necessarily have all their sine series coefficients equal to zero.

  • Odd functions necessarily have all their cosine series coefficients equal to zero.

In this problem, the function f is odd, and hence all an = 0.

To find the sine coefficients, use the formulae:
bn =  2

p
ó
õ
p

0 
f(x) sin(n x) dx, n ³ 1.
Matlab can be used to evaluate the integrals. While it is possible to give Matlab the information that m, n or whatever are integers and hence that
sin(n p) = 0,    cos(2 m p) = 1,    cos((2 m - 1)p) = -1,    etc.
it is probably easier in this problem to find a few coefficients and look for a pattern.

If the problem arose in a real engineering situation, one would do both this first step - numeric values of m as examples - and the general m case. In any event, Matlab such as the following should find the integrals:
syms x f s0 s1 s2 Pi c sm 
s0 = sym(0); s1 = sym(1); s2 = sym(2); Pi = sym(pi); c = s2/Pi; 
f = x 
for m = 1:5 
  sm = sym(m) 
  b2mMinus1 = simplify(c*int(f*sin((s2*sm-s1)*x), x, s0, Pi)) 
  b2m =  simplify(c*int(f*sin(s2*sm*x), x, s0, Pi)) 
end  

Mark summary:
Question Value Your mark
1 1.00 -
2.1 1.00 -
2.2 1.00 -
3 1.00 -
4.1 1.00 -
4.2 1.00 -
4.3 1.00 -
4.4 1.00 -
5.1 1.00 1.00
5.2 1.00 1.00
5.3 1.00 1.00
5.4 1.00 1.00
5.5 1.00 1.00
6.1 1.00 -
6.2 1.00 -
7.1 1.00 -
7.2 1.00 -
Total 17.00 5.00

Your mark of 5.00 out of 17.00 is equivalent to 29%. You attempted 5 questions, with a total value of 5.00. Considering only these, your mark of 5.00 out of 5.00 is equivalent to 100%

New Version Click here to see a new version of this quiz.
New Quiz Click here to select a new quiz.

If you have technical problems, you can send email to the administrator.
Mathematical questions can be sent to the teacher.