Integrating abs(x)*cos(nx)

Discussion in 'Math' started by guitarguy12387, Sep 10, 2008.

1. guitarguy12387 Thread Starter Active Member

Apr 10, 2008
359
12
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.

2. Ratch New Member

Mar 20, 2007
1,068
3
guitarguy12387

Is someone trying to pull your leg? How can you get a Fourier series out of an aperiodic function?

Ratch

Apr 10, 2008
359
12
4. Ratch New Member

Mar 20, 2007
1,068
3
guitarguy12387,

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

5. guitarguy12387 Thread Starter Active Member

Apr 10, 2008
359
12
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.

6. Ratch New Member

Mar 20, 2007
1,068
3
guitarguy12387,

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

7. guitarguy12387 Thread Starter Active Member

Apr 10, 2008
359
12
Ahh. Once again, thanks for the help, ratch.