# Math Help - Fourier Series Basics Problem

1. ## Fourier Series Basics Problem

Hello,

I am learning to calculate fourier series, but am having difficulty with this basic problem. The problem is to find the fourier series for the given function (extended periodically in this case for the sine series only)

f(x)={ x , 0<x<1
1 , 1<x<2

This function is then extended periodically to have a period of 4, with L = 2. when calculating the b_n fourier coefficients I am using the form:

b_n = (1/2) ∫ f(x)cos(n*pi*x/L)dx

I integrated over the interval (-1,3). So from (-1,1) i am integrating xsin(ax) and a square wave centered around the x-axis from (1,3). The square wave integral is an odd function over a symmetric interval so goes to zero....I am left with the xsin(ax) portion from (-1,1). I get:

(-(2/(n*pi))cos((n*pi*x)/2)+(4/((n*pi)^2)sin((n*pi*x)/2) evaluated from -1 to 1

using cos(-x) = cos(x) and sin(-x) = -sin(x), it looks to me as though the sine terms will cancel off, and the cosine terms should double. but this is not the correct answer (solving just for the coefficient not the fourier series). Any help would be greatly appreciated.

Thanks,
Nick

2. The period is 2 not 4.

3. well, maybe i didnt explain the problem very clearly. i am given a function f(x), which is defined over an interval (a,b). I am then told to extend this periodically as either a sine series or cosine series which will essentially make the period (-b,b).

So the initial function is defined from (0,2), but after being extended as an odd function for the sine series representation it is periodic from (-2,2)....at least this is how I understood the problem.

Thanks.