0

Even if this problem was answered here before, I still think my solution process is different and needs some assistance.

Still the complex Fourier series is given by: $f(x) =\dfrac{1}{2\,\pi}\displaystyle{\sum_{n = -\infty}^{\infty}}c_n\,e^{-i\,n\,x}$

In my case $c_n$ is being calculation like: $c_n =\displaystyle{\int_{-\pi}^{\pi}|x|\,e^{-i\,n\,x}\,\mathrm{dx}=\int_{-\pi}^{0}-x\,e^{-i\,n\,x}\,\mathrm{dx}+\int_{0}^{\pi}x\,e^{-i\,n\,x}\,\mathrm{dx} }$

Solving this: $c_n = \left[\left(-\dfrac{t\,i}{n}-\dfrac{1}{n^2}\right)\,e^{-i\,n\,t}\right]_{-\pi}^{0}+\left[\left(\dfrac{t\,i}{n}+\dfrac{1}{n^2}\right)\,e^{-i\,n\,t}\right]_{0}^{\pi} = \dfrac{-2}{n^2}+2\,(-1)^n$

thus $f(x) = \dfrac{1}{2\,\pi}\,\displaystyle{\sum_{n = -\infty}^{\infty}}\left(\dfrac{-2}{n^2}+2\,(-1)^n\right)\,e^{-i\,n\,x}$. But I'm really not sure about that.

Leon
  • 1,117
  • 1
    Just looking at it, there cannot be a $2(-1)^n$ term. Should that be divided by $n^2$? – Paul Jul 12 '21 at 14:39
  • You basically get an integral $\int_0^\pi xe^{inx}\mathrm dx$ which can be solved readily via integration by parts. – K.defaoite Jul 12 '21 at 15:24
  • Actually I checked those 2 integrals by a program, but you‘re right it looks weird. Why solving for $\int_0^\pi x,e^{i,n,x}$? I thought you can‘t sum it up like that since $e^{i,n,x}$ is neither odd nor even. – Leon Jul 12 '21 at 17:54
  • If the Fourier series is given by $e^{\color{red}{-} i n x}$ then the integral should be the inner product of $\text{abs}(x)$ against $e^{\color{orange}{+} i n x}$ – Matthew Cassell Jul 12 '21 at 18:02
  • What about $c_0$? your formula have a division by $0$ – jjagmath Jul 12 '21 at 18:05
  • @jjagmath: Direct computation suggests it should be $\pi^2$. – Brian Tung Jul 12 '21 at 18:08
  • @BrianTung I do know. The question was for the OP to realize that the case $n=0$ needs to be dealt with separately. – jjagmath Jul 12 '21 at 18:33
  • yea, of course, I had done that, but I just wanted to check the general idea first. Thank you for that hint though. – Leon Jul 12 '21 at 18:47
  • @mattos What you mean by that? I took it, the inner product of Fourier series is given by $ c_n = \langle f,e^{i,n,x}\rangle$ thus $c_n = \displaystyle{\int_{-\pi}^{\pi}|x|,e^{-i,n,x}}$. I thought the complex conjugate is already taken into consideration. – Leon Jul 12 '21 at 18:51
  • @jjagmath: OK got it. – Brian Tung Jul 12 '21 at 19:15
  • So is this the right one? Of course I'd add a $c_0$ in front. – Leon Jul 12 '21 at 20:09

1 Answers1

1

\begin{align} \int_{-\pi}^{\pi}|x|e^{-inx}dx & = \int_{-\pi}^{\pi}|x|\cos(nx)dx \\ &=2\int_0^\pi x\cos(nx)dx \\ &=\left.2x\frac{\sin(nx)}{n}\right|_{x=0}^{\pi}-2\int_0^{\pi}\frac{\sin(nx)}{n}dx \\ &=\left.2\frac{\cos(nx)}{n^2}\right|_{x=0}^{\pi}=2\left[\frac{(-1)^n-1}{n^2}\right] \end{align}

Disintegrating By Parts
  • 87,459
  • 5
  • 65
  • 149