2

Calculate the Fourier series of $f(x)= \frac{1}{2} - |x-\frac{1}{2}|$

According to our definition of Fourier Series $\hat{f}(k) = \int_{0}^1 f(x) e^{-2 \pi ikx} dx $ is the k-th Fourier coefficient of $f$.

for $k\ne 0$ $$\int_{0}^1 ( \frac{1}{2} - |x -\frac{1}{2}|)e^{-2 \pi ikx} dx $$ $$=\frac{1}{2}\int_{0}^1 e^{-2 \pi ikx} dx + \int_{0}^1 |x -\frac{1}{2}|e^{-2 \pi ikx} dx$$

Integrating the first integral, it evaluates to zero $\left[ \frac{1}{2} \frac{e^{-2 \pi ikx}}{-2 \pi ik} \right]_0^{1} = 0$ $$=0 + \int_{0}^1 |x -\frac{1}{2}|e^{-2 \pi ikx} dx$$ Now I substitute $t=x-\frac{1}{2}$ and change the integration boundaries to $t=-\frac{1}{2}$ and $t=\frac{1}{2}$ $$\int_{-\frac{1}{2}}^\frac{1}{2} |t|e^{-2 \pi ki(t+\frac{1}{2})} dt $$ I can pull out $e^{-\pi ik}$ because it does not depend on t and this $e^{-\pi ik}= (-1)^k $ according to my notes(correct me if I am wrong) $$(-1)^k \int_{-\frac{1}{2}}^\frac{1}{2} |t|e^{-2 \pi ki(t)} dt$$ Now I use integration by parts and set $f=|t|$, $f^\prime(t)= \frac{t}{|t|}$, $g=\frac{e^{-2 \pi ikt}}{-2 \pi ik}$ and $g^\prime(t) = e^{-2 \pi ikt}$ $$(-1)^k \left[ |t| \frac{e^{-2 \pi ikt}}{-2 \pi ik} \right]_\frac{-1}{2}^\frac{1}{2} - \int_{-\frac{1}{2}}^\frac{1}{2} \frac{t}{|t|} \frac{e^{-2 \pi ikt}}{-2 \pi ik} dt$$ The first integrand evaluates to zero. Thus we have $$(-1)^k - \int_{-\frac{1}{2}}^\frac{1}{2} \frac{t}{|t|} \frac{e^{-2 \pi ikt}}{-2 \pi ik} dt$$ Then I use subsitution $u=\frac{t}{|t|}e^{-2 \pi ikt}$ and $\frac{du}{dt}= \frac{-2 \pi ikte^{-2 \pi ikt}}{|t|}$ and $dt=|t|\frac{e^{-2 \pi ikt}}{-2 \pi ik} du$ $$(-1)^k \left[ t \frac{e^{-2 \pi ikt}}{-2 \pi ik} \right]_\frac{-1}{2}^\frac{1}{2}$$ $$=(-1)^k [\frac{1}{-4\pi ik} + \frac{1}{-4\pi ik}] = \frac{2}{-4\pi ik} = \frac{1}{-2\pi ik}= \frac{(-1)^k}{-2\pi ik}$$

for $k=0$ we know the $e^{-2 \pi ikx}=0$ $$\int_{0}^1 |x-\frac{1}{2}|dx = \frac{1}{4}$$

So $$Sf(x)= \frac{1}{4} +\sum_{k\ne 0} \frac{(-1)^k}{-2\pi ik}e^{2\pi ikx}= \frac{1}{4} -\frac{1}{2\pi i}\sum_{k\ne 0} \frac{(-1)^k}{k}e^{2\pi ikx}= \frac{1}{4} -\frac{1}{2\pi i}\sum_{k\ne 0} \frac{(-1)^k}{k}i\sin(2\pi kx)$$ $$ = \frac{1}{4} -\frac{1}{2\pi}\sum_{k\ne 0} \frac{(-1)^k}{k}\sin(2\pi kx)$$

Could someone please verify if what I have done is correct. I hope this is clear enough as I had to let out some "somehow more obvious" parts otherwise I would have been very long. Also sorry if I had some typos. Any help is appreciated and Thanks.

  • 2
    When you state the problem you should say on what interval. Of course your result is a periodic function, so it is not equal to your $f(x)$ outside that interval. The statement of the problem might be: "Computer the Fourier sine series of $f(x)$ on $[0,1]$". Of course there is also a cosine series for it, which will be different... – GEdgar Nov 14 '21 at 21:28
  • @GEdgar In our exercise course we have not specified the interval for this exercise but we integrate on [0,1] as it was set by our instructor. Is this what you mean? – Gunners Nov 14 '21 at 21:32
  • What is the question here? Solution verification? –  Nov 14 '21 at 21:34
  • @LouisPan Yes, Please! – Gunners Nov 14 '21 at 21:37
  • Also note this. $f(0) = 0$, but $Sf(0) = 1/4$. Does that mean there is an error in the calculation? – GEdgar Nov 14 '21 at 21:37
  • @GEdgar You are right I oversaw that the absolute value evalutes to zero with constant. Thanks for catching it! – Gunners Nov 14 '21 at 21:40
  • @DougM So I have to do case distinction for $k=0$ and $k\ne 0$ – Gunners Nov 14 '21 at 21:42
  • I missed that you consider $k=0$ near the end. – user317176 Nov 14 '21 at 21:43
  • Note $\sin(2\pi k x) = \sin(2\pi(-k)x)$, so you should combine the negative $k$ terms with the positive ones. – GEdgar Nov 14 '21 at 21:43
  • If we consider the periodic function that the fourrier series will generate... that is $f(x+1) = f(x)$ we should be generating an even function. That would suggest that we have cosine terms and not sine terms in the series. – user317176 Nov 14 '21 at 21:46
  • @GEdgar I have to consider the negative and positive $k$, which would result in more terms right? – Gunners Nov 14 '21 at 21:46
  • @DougM I really have a hard time how to come up if it has cosine or sine term. Here I decided based on $-2\pi ik$ as stupid as it may sound. – Gunners Nov 14 '21 at 21:51

0 Answers0