Integrating abs(x)*cos(nx)

Thread Starter

guitarguy12387

Joined Apr 10, 2008
359
Hey, i'm back with another infinite series question... this time fourier series of f(x) = abs(x)

In short, where i am stuck is when trying to integrate abs(x)*cos(nx) from -2pi to 2pi in order to find a_n.

Anyone have any ideas? Thanks in advance.
 

Ratch

Joined Mar 20, 2007
1,070
guitarguy12387,

They find the fourier series of x on that site...
They also proscribe limits on the range of x, which you neglected to mention. What is there about the explanation given on that link that you do not understand?

Ratch
 

Thread Starter

guitarguy12387

Joined Apr 10, 2008
359
They also proscribe limits on the range of x, which you neglected to mention
Sorry i assumed since i put the limits of integration, you'd be able to tell what the limits on x are. The problem calls for the fourier series of f(x) = abs(x) on (-2pi, 2pi]

I understand the procedure. However, in this specific problem, when calculating b_n, it requires:

b_n = 1/2pi ∫ (abs(x) * cos(n*x/2))dx from -2pi to 2pi

and i don't know how to do that integration.
 

Ratch

Joined Mar 20, 2007
1,070
guitarguy12387,

..and i don't know how to do that integration.
Looks to me like that it is a good candidate for integration by parts. http://www.math.hmc.edu/calculus/tutorials/int_by_parts/

Looking up Intg(x*cos(ax)*dx) in a table, I find that integration to be (cos(ax)/a^2)+(x/a)*sin(ax) . To accomodate abs(x), do the evaluation in two parts, changing "x" to "-x" when within the -2pi to 0 range, and positive "x" when within 0 to 2pi range.

Ratch
 
Top