I am working on a simple Fourier question from an introductory PDE text by John Davis.
The question begins with a graph that can be reduced into piecewise: $$f(x) = \begin{cases} 1, &0 \leq x < 0.5 \\ 0, &0.5 \leq x \leq 1, \ -1 \leq x \leq -0.5\\ -1, &-0.5 < x < 0 \end{cases}$$
Questions:
(a) Find the value of $a_{99}$, the 99th Fourier cosine coefficient for $-3 < x < 3$
(b) Find the value of the full Fourier series at $x = 0, x = 1$ and also $x = -1$.
Here are my attempts at the solutions so far:
(a) The text provides this formula for $a_n$,
$$a_n = \frac {2}{l} \int_{0}^{l} f(x) \cos (\frac{n \pi x}{l}) dx.$$
After assigning $f(x) = \pm 1$, that is by ignoring the $f(x) = 0$ from the piecewise, putting in $l = 3, n = 99$ and $ f(x) = \pm 1$, I get the answer $a_{99} = \pm 3.7463 x 10^{-12}$ from TI-84 graphic calculator. Am I correct, especially in assigning $f(x) = \pm 1$?
(b) Here I am totally lost except getting these lengthy formulas from text, and any help would be very much appreciated:
$$\begin{align} f(x) &= \frac{1}{2}a_0 + \sum_{n=1}^{\infty} [a_n \cos (\frac{n \pi x}{l}) + b_n \sin(\frac{n \pi x}{l})].\\ a_n &= \frac{1}{l} \int_{-l}^{l}f(x) \cos (\frac{n \pi x}{l}) dx,\\ b_n &= \frac{1}{l} \int_{-l}^{l}f(x) \sin (\frac{n \pi x}{l}) dx, {}\end{align}$$
Thank you very much for your time and help.
Your function is an odd function, hence we simply have $a_n=0$.
Using standard theorems on the pointwise convergence of Fourier series, we have that the Fourier series of $f(x)$ equals zero both in $x=0$ and in $x=\pm 1$ (even without computing it!).