Eruditee
- 13
- 0
Homework Statement
I just have to graph this function to see where the "Gibbs phenomenon" occurs in its Fourier Series representation. I am pretty sure I integrated correctly.
Homework Equations
Fourier Series
The Attempt at a Solution
a_{0}=\frac{1}{\pi}\int_{-pi}^{pi}f(x)dx=\int_{-\pi}^{\pi}x^{2}dx=\frac{x^{3}}{3}|_{-\pi}^{\pi}=\frac{x^{3}}{3}|_{-\pi}^{-\frac{\pi}{2}}+\frac{x^{3}}{3}|_{-\frac{\pi}{2}}^{0}+\frac{x^{3}}{3}|_{0}^{\frac{\pi}{2}}+\frac{x^{3}}{3}|_{-\frac{\pi}{2}}^{\pi}==\frac{1}{\pi}(\frac{16\pi^{3}}{24})=\frac{2\pi^{2}}{3}<br />
With 2 successive integration by parts; I arrive at:
Fourier=\frac{\pi^{2}}{3}+4\overset{\infty}{\underset{1}{\sum}}\frac{cos(nx)}{n^{2}};cosine=even=\frac{\pi^{2}}{3}+4\overset{\infty}{\underset{1}{\sum}}\frac{(-1)^{n}}{n^{2}}
I do not know how to graph the first 5, 20, 400 etc terms. I have tried Mathematica, using
ListPlot[Table[{n, 4pi(-1)^n/(n^2)},{n,0,500}] but I get a blank graph. The problem is done; I just don't get how to graph this? I'd like to graph it from x= 0 to x= 4pi
Last edited by a moderator: