Fourier Series (Half-range expansion)

4 replies · 2K views · last reply
galaxy_twirl
Messages
137
Reaction score
1

Homework Statement



Printed exam question: Question 2(a) [5 marks]. Let f(x) = cos x on the open interval (0, π). Find the first two non-zero terms of the sine Fourier half range expansion for f(x), giving exact values.


Homework Equations



Handwritten formula: b_n = (1/L) times the integral from -L to L of f(x) sin(n pi x / L) dx.


The Attempt at a Solution



I don't really understand why my solution is wrong as I think I have substituted everything in correctly..

Is it okay if anyone can help me take a look at my solution? Thank you. :)

My solution: (Only bn)

Handwritten working on lined paper: bn = (1/L) integral from -L to L of f(x) sin(nπ/L) x dx; then 2L = (π - 0), so L = π/2; substituting gives bn = (2/π) integral from -π/2 to π/2 of cos x sin(nπ/2) x dx, simplified to (1/π) integral from 0 to π/2 of cos x sin 2nx dx; and for n = 1, (1/π) integral from 0 to π/2 of cos x sin 2x dx.


My teacher's solution (not the whole solution):

Handwritten working: b_n = (2/π) times the integral from 0 to π of cos x sin nx dx; below, b_1 = (1/π) times the integral from 0 to π of sin 2x dx, = (-1/2π)[cos 2x] from 0 to π = 0.


The thing I don't understand is why is my teacher's sin portion "sin nx" and not "sin 2nx" like mine?

Thanks. :)
 
Your L should be pi. As it is now you are missing half of the interval and not using all of the basis functions.
 
Orodruin said:
Your L should be pi. As it is now you are missing half of the interval and not using all of the basis functions.

I see. Is this due to the half-range expansion, or is it because of the range from (0, π)?

Thank you. :)
 
Well, both. The half-range is 0 to pi so the length of the full range must be 2pi. In the end, you could just as well have considered it to be just an expansion on 0 to pi without making an extension, the basis functions are the same.
 
Orodruin said:
Your L should be pi. As it is now you are missing half of the interval and not using all of the basis functions.

I see. Just wondering, if this is just a normal Fourier series expansion of cos(x) from (0,π), will the L still be the same?