Computing the Fourier series of $\lvert x\rvert$

107 Views Asked by At

I am getting very confused when trying to compute the Fourier series of $f(x) = \lvert x\rvert$, $x \in [-1/2,1/2]$.

Normally I have no trouble with this because it is mindlessly integrating to get your $a_{k}$'s and $b_{k}$'s, but I realized that when I took an introductory course covering Fourier series, the problems were conveniently written so that I never had to consider scaling or periodicity. Now I am not 100% sure what to do using a definition of Fourier series on $[0,1]$ instead of $[-\pi, \pi]$.

Let $f:\mathbb{R}\rightarrow \mathbb{C}$ be a periodic function with period 1 and Riemann integrable on $[0,1]$. Define a Fourier series to be the sequence of partial sums

$$\hat{f} = \sum_{k=-n}^{n} \langle f(x), e^{2i\pi k x}\rangle e^{2i \pi kx}$$

with $\langle f, g\rangle := \int_{0}^{1} f\overline{g}dx$.

What is the best way to calculate the Fourier series of $f(x)$ using this definition? From my understanding, I can define a new function

$$g(x) = \begin{cases} x& x\in [0,1/2],\\ 1-x& x\in (1/2,1],\end{cases}$$

compute the Fourier series of $g$ and it should coincide with $\hat{f}$. Alternatively, I think I can instead calculate the Fourier series of $h(x) = \lvert x-1/2\rvert, x\in [0,1]$ and shift the function afterwards.

My question is as follows:

Would both these approaches work? Also, is there a smarter way of doing this? I think I am missing an obvious change of variables that will let me not only calculate Fourier series as defined above, but also for any continuous function on an interval $[a,b]$.

1

There are 1 best solutions below

2
On BEST ANSWER

Yes, both of those methods should work perfectly.

The change of variables you want, if you like that approach, is $$ t(x) = \frac{1}{b-a} (x-a) $$ Or in this case, $$ t(x) = x+\frac 12 $$