How do you find the fourier expansion coefficients?

1. Apr 18, 2017

Vitani11

1. The problem statement, all variables and given/known data
I need to expand this piecewise function f(x) = h for a<x<L and f(x) = 0 for 0<x<a. I am told that this is a square wave so ao and an in the expansion are 0 (odd function). Therefore I only need to worry about bn. The limits on the integral are from a to L, but what about the coefficient? Is it 1/(L-a)? Also for the sine term which is inside the integrand - is this just (L-a) in replace of the L in the general formula?That's what I did and I want to make sure.
2. Relevant equations
bn = 1/L∫f(x)sin(nπx/L)dx where the limits are from -L to L in general.
I have bn = 1/(L-a)∫hsin(nπx/(L-a))dx where the limits are from a to L.

3. The attempt at a solution
I've found the fourier expansion to be 4hL/π(L-a) ∑sin(nπx/(L-a))

Last edited: Apr 18, 2017
2. Apr 18, 2017

Ken Miller

It looks like you are stating some things that aren't true, and plugging some values into formulas without really understanding how the formulas work.
First questions:
1) Can you verify for yourself whether this is a square wave? What is the definition of a square wave? Does it matter?
1a) Is this really a square wave? It is a rectangular wave, yes, but square? I think many (most?) would say that a square wave has equal amounts of on/off (high/low, etc.). 1b) Does the answer to 1a) matter?
2) Is this an odd function? Draw it out, and use the definition of odd function.
Odd function means $f(-x)=-f(x)$. How do you know that is odd? It is not obvious from the information you give.