Notes on Fourier Series

ibobev1 pts0 comments

Notes on Fourier series - Eli Bendersky's website

Toggle navigation

Eli Bendersky's website

About

Projects

Archives

The trigonometric Fourier series is a beautiful mathematical theory that<br>shows how to decompose a periodic function into an infinite sum of<br>sinusoids. These are my notes on the subject, with some examples and the<br>connection to linear algebra in Hilbert space.

Coefficients of Fourier series

Let’s assume that is a well-behaved 2L-periodic [1]<br>function and that we can find coefficients a_n and b_n<br>such that:

\[f(x)=\sum_{n=0}^{\infty}\left(a_n cos\frac{n\pi x}{L}+b_n sin\frac{n\pi x}{L}\right)\]<br>Then we say that the Fourier series on the right-hand side converges<br>to . We’ll talk more about the assumptions mentioned above<br>and convergence in the next section.

Note that when n=0, the sum becomes just ; therefore<br>it’s customary to write the series starting with n=1, with a<br>separate constant component (which is the function's average over<br>one period). To make computations nicer, this constant is typically<br>called a_0 / 2, so:

\[f(x)=\frac{a_0}{2}+\sum_{n=1}^{\infty}\left(a_n cos\frac{n\pi x}{L}+b_n sin\frac{n\pi x}{L}\right)\]<br>Our goal is to find the coefficients a_n and b_n that<br>satisfy this equation. We’ll do this in three steps.

Step 1: Integrate both sides of the equation between -L and<br>L [2].

\[\int_{-L}^{L}f(x)dx=\int_{-L}^{L}\frac{a_0}{2}dx+\sum_{n=1}^{\infty}\bigg (\int_{-L}^{L}a_n cos\frac{n\pi x}{L}dx+\int_{-L}^{L}b_n sin\frac{n\pi x}{L}dx\bigg )\]<br>Per Appendix A, all integrals within the sum are zero, so we’re left<br>with:

\[\int_{-L}^{L}f(x)dx=\int_{-L}^{L}\frac{a_0}{2}dx=\bigg[\frac{x\cdot a_0}{2}\bigg]_{-L}^{L}=a_0\cdot L\]<br>And thus we find :

\[a_0=\frac{1}{L}\int_{-L}^{L}f(x)dx\]<br>Step 2: Multiply both sides by cos\frac{m\pi x}{L}<br>(m is a positive integer constant) and integrate between<br>-L and L.

\[\begin{aligned}<br>\int_{-L}^{L}f(x)cos\frac{m\pi x}{L}dx&=\int_{-L}^{L}\frac{a_0}{2}cos\frac{m\pi x}{L}dx\\<br>&+\sum_{n=1}^{\infty}\bigg (\int_{-L}^{L}a_n cos\frac{n\pi x}{L}cos\frac{m\pi x}{L}dx+\int_{-L}^{L}b_n sin\frac{n\pi x}{L}cos\frac{m\pi x}{L}dx\bigg )<br>\end{aligned}\]<br>Looking at the right-hand side, the first integral is zero per Appendix<br>A, and the last integral is zero per Appendix B. We’re left with:

\[\int_{-L}^{L}f(x)cos\frac{m\pi x}{L}dx=\sum_{n=1}^{\infty}\int_{-L}^{L}a_n cos\frac{n\pi x}{L}cos\frac{m\pi x}{L}dx\]<br>Per Appendix B, the integral on the right is zero for all<br>n\neq m, and L for n=m. Therefore, we can write:

\[\int_{-L}^{L}f(x)cos\frac{m\pi x}{L}dx=a_m\cdot L\]<br>Recall that m is an arbitrary integer, just like ; for<br>consistency, we’ll replace m by and isolate<br>a_n:

\[a_n=\frac{1}{L}\int_{-L}^{L}f(x)cos\frac{n\pi x}{L}dx\]<br>Step 3: Hopefully it’s clear where this is going now; multiply both<br>sides by sin\frac{m\pi x}{L} and integrate between -L<br>and L. Using a very similar reasoning to step 2, we’ll end up<br>with:

\[b_n=\frac{1}{L}\int_{-L}^{L}f(x)sin\frac{n\pi x}{L}dx\]<br>We’ve just found a way to calculate all the coefficients of our Fourier<br>series for :

\[f(x)=\frac{a_0}{2}+\sum_{n=1}^{\infty}\left(a_n cos\frac{n\pi x}{L}+b_n sin\frac{n\pi x}{L}\right)\]<br>Where:

\[\begin{aligned}<br>a_0&=\frac{1}{L}\int_{-L}^{L}f(x)dx\\<br>a_n&=\frac{1}{L}\int_{-L}^{L}f(x)cos\frac{n\pi x}{L}dx\\<br>b_n&=\frac{1}{L}\int_{-L}^{L}f(x)sin\frac{n\pi x}{L}dx<br>\end{aligned}\]

Conditions on f and convergence of Fourier series

The previous section discusses Fourier series for a function<br>that is well-behaved - but what does that mean? The full<br>answer would lead us deep into analysis, which I’d like to avoid here.<br>So I’ll keep it brief.

We typically assume that is square<br>integrable,<br>which is denoted as L^2. Moreover, we assume that the function<br>is piecewise<br>smooth: each<br>segment of the function has continuous derivatives. A very simple<br>example of a piecewise smooth function is f(x)=|x|. Another is<br>the triangular wave function used in the example below.

These conditions hold for pretty much any reasonable function we want to<br>approximate using Fourier series, so they aren’t a serious burden.

For a function that satisfies these conditions, it’s<br>guaranteed to have a Fourier series that pointwise converges to it.<br>This means that at every continuous point of , the Fourier<br>series converges to it exactly; at every jump point, the Fourier series<br>converges to the mid-point of the jump.

Cosine and Sine series

Sometimes, additional properties of the function can help<br>us simplify the Fourier series for it. If f_e(x) is an even<br>function,<br>then we know that:

\[b_n=\frac{1}{L}\int_{-L}^{L}f(x)sin\frac{n\pi x}{L}dx=0\]<br>Because the function inside the integral is odd, and integrating an<br>odd function over a symmetric interval results in 0.

Therefore, the Fourier series for such f_e(x) is a cosine<br>series:

\[f_e(x)=\frac{a_0}{2}+\sum_{n=1}^{\infty}a_n cos\frac{n\pi x}{L}\]<br>With coefficients and a_n given as before.

Similarly if f_o(x) is an odd function, then its<br>and a_n are 0, and its Fourier series is a...

frac int_ series fourier function sum_

Related Articles