0

How would I write the Fourier series for $|x|$ in complex form over the interval $[-2,2]$? I have already tried writing $$|x|=\sum c_ne^{i\pi nx/2}$$ where \begin{align*}c_n&=\frac{1}{4}\int_{-2}^{2}|x|e^{-i\pi nx/2}dx\\ &=\frac{1}{4}\left(\int_{-2}^0-xe^{-i\pi nx/2}dx+\int_0^2xe^{-i\pi nx/2}dx\right) \end{align*} but that integral seems hopelessly complicated to evaluate. I also have seen this previous post involving $|x|$, but it involves a different interval.

ant11
  • 2,033
  • 15
  • 38
  • And why would the different interval prevent you from using the same approach, i.e. partial integration? – fgp Apr 21 '14 at 00:30
  • I apologize, I think I misread the previous solution. I thought that having a 2 instead of a $\pi$ somehow prevented me from evaluating the exponent in the integral; i.e $e^{i2nx}$ instead of $e^{i\pi nx}$ I will try again with renewed faith. – ant11 Apr 21 '14 at 01:58

1 Answers1

2

Hint: Integration by parts $$ \int_a^b \underbrace{x}_{=u}\, \underbrace{e^{\lambda x}}_{=v'} \,dx = \bigg(\underbrace{x}_{=u}\,\underbrace{\frac{e^{\lambda x}}{\lambda}}_{=v}\bigg)\Bigg|_a^b - \int_a^b \underbrace{1}_{u'}\,\underbrace{\frac{e^{\lambda x}}{\lambda}}_{=v} \,dx $$

fgp
  • 21,050
  • 1
    To the intrepid reader: what is called "partial integration" here is more commonly (to my knowledge) referred to "integration by parts". – Ben Grossmann Apr 21 '14 at 00:41
  • @Omnomnomnom Uh, sorry, I guess I translated the german word "Partielle Integration" literally. Will fix. – fgp Apr 21 '14 at 00:42
  • Not a problem; I only put the comment there because it took me an embarrassing amount of time to make the connection – Ben Grossmann Apr 21 '14 at 00:43