I was given the following formula for the Fourier series of a function with period $2\pi$:

$$ \begin{align*} \hat f(x) = \frac {a_0} 2 + \sum_{n=1}^\infty a_n \cos (nx) + b_n \sin (nx) \end{align*} $$

This formula is awkward because the coefficient $a_0$ is halved, whereas the coefficients $a_n$ and $b_n$ aren't, for $n > 0$. Then I realized that I could rewrite this as:

$$ \begin{align*} \hat f(x) = \sum_{n \in \mathbb Z} c_n \cos (nx) + d_n \sin (nx) \end{align*} $$


$$ \begin{align*} a_n & = c_n + c_{-n} && \mbox{for } n \ge 0 \\ b_n & = d_n - d_{-n} && \mbox{for } n \ge 0 \\ \end{align*} $$

This is IMO much easier on the eyes. Then you can add a constraint that $c_n, d_n = 0$ when $n < 0$, if you want to. Is there a good reason not to work this way?

  • 5
    $\begingroup$ The best way is $\sum_{-\infty}^\infty c_ne^{inx}$. $\endgroup$ – Lord Shark the Unknown Apr 25 '17 at 16:00
  • $\begingroup$ @LordSharktheUnknown I'm inclined to agree, but my differential equations professor is going through great lengths to avoid complex numbers. $\endgroup$ – pyon Apr 25 '17 at 16:01
  • $\begingroup$ One reason not to work this way is that your functions $\cos nx$, $\sin nx$ for $n\in\mathbb Z$ do not form a basis, because they are not linearly independent. $\endgroup$ – Rahul Apr 25 '17 at 16:02
  • $\begingroup$ @Rahul: For my current use case (solving PDEs with initial and buondary conditions), it is enough that they span the entire space of periodic functions with period $2\pi$ satisfying the Dirichlet conditions. In any case, as I said, if you need to work with a basis, you can add a constraint that $c_n, d_n = 0$ for negative $n$. (And, of course, $\sin 0x$ is the zero vector, so it doesn't matter what $d_0$ is.) $\endgroup$ – pyon Apr 25 '17 at 16:06
  • 1
    $\begingroup$ It does solve the inconsistency that bothered you. Why does it seem wrong? Why should the integral of the basis function sum to $2\pi$ instead than $\pi$ or $1$. It is not particularly uncommon for that matter to use a scale factor to get an orthonormal Fourier system and then yet another constant $\frac{1}{\sqrt{2\pi}}$ does the job. Renormalization is simply a part of life. $\endgroup$ – mathreadler Apr 25 '17 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.