We computed the Fourier series for a \(2\pi\)-periodic function, but what about functions of different periods. Well, fear not, the computation is a simple case of change of variables. We just rescale the independent axis. Consider a \(2L\)-periodic function \(f(t)\text{.}\) The \(L\) is called the half period. Let \(s = \frac{\pi}{L} t\text{.}\) Then the function
\begin{equation*}
g(s) = f\left(\frac{L}{\pi} s \right)
\end{equation*}
is \(2\pi\)-periodic and we know what to do with it. We must also rescale all our sines and cosines. In the series, we use \(\frac{\pi}{L} t\) as the variable. That is, we want to write
We compute \(a_n\) and \(b_n\) as before. After we write down the integrals, we change variables from \(s\) back to \(t\text{,}\) noting also that \(ds = \frac{\pi}{L} \, dt\text{.}\)
The two most common half periods that show up in examples are \(\pi\) and 1 because of the simplicity of the formulas. We should stress that we have done no new mathematics, we have only changed variables. If you understand the Fourier series for \(2\pi\)-periodic functions, you understand it for \(2L\)-periodic functions. You can think of it as just using different units for time. All that we are doing is moving some constants around, but all the mathematics is the same.
First, we recognize that \(f\) is \(2\)-periodic and so \(L=1\text{.}\) We want to write \(f(t) = \frac{a_0}{2} + \sum_{n=1}^\infty a_n \cos (n \pi t) + b_n
\sin (n \pi t)\text{.}\) We start with \(a_n\) for \(n \geq 1\text{.}\) We note that \(\lvert t \rvert \cos (n \pi t)\) is even and for \(0 \leq t \leq 1\text{,}\)\(f(t) = \lvert t \rvert = t\text{.}\) Hence,
You should be able to find this integral by thinking about the integral as the area under the graph without doing any computation at all. Finally, we find \(b_n\text{.}\) Notice that \(\lvert t \rvert \sin (n \pi t)\) is odd, and so
The plot of these few terms and also a plot up to the \({20}^{\text{th}}\) harmonic is given in Figure 4.10. You should notice how close the graph is to the real function. You should also notice that there is no “Gibbs phenomenon” present as there are no discontinuities.
If you are unfamiliar with this notation, \(\lim_{t \uparrow c} f(t)\) means we are taking a limit of \(f(t)\) as \(t\) approaches \(c\) from below (i.e. \(t < c\)) and \(\lim_{t \downarrow c} f(t)\) means we are taking a limit of \(f(t)\) as \(t\) approaches \(c\) from above (i.e. \(t > c\)). For example, for the square wave function
Let \(f(t)\) be a function defined on an interval \([a,b]\text{.}\) Suppose that we find finitely many points \(a=t_0\text{,}\)\(t_1\text{,}\)\(t_2\text{,}\) ..., \(t_k=b\) in the interval, such that \(f(t)\) is continuous on the intervals \((t_0,t_1)\text{,}\)\((t_1,t_2)\text{,}\) ..., \((t_{k-1},t_k)\text{.}\) Also suppose that all the one sided limits exist, that is, all of \(f(t_0+)\text{,}\)\(f(t_1-)\text{,}\)\(f(t_1+)\text{,}\)\(f(t_2-)\text{,}\)\(f(t_2+)\text{,}\) ..., \(f(t_k-)\) exist and are finite. Then we say \(f(t)\) is piecewise continuous.
If moreover, \(f(t)\) is differentiable at all but finitely many points, and \(f'(t)\) is piecewise continuous, then \(f(t)\) is said to be piecewise smooth.
The square wave function, (4.8) extended periodically, is piecewise smooth on \([-\pi,\pi]\) or any other finite interval, so we just say that \(f(t)\) is piecewise smooth without mentioning an interval.
The function \(f(t) = \frac{1}{t}\) is not piecewise smooth on \([-1,1]\) (or any other interval containing zero). In fact, it is not even piecewise continuous.
The function \(f(t) = \sqrt[3]{t}\) is not piecewise smooth on \([-1,1]\) (or any other interval containing zero). The function \(f(t)\) is continuous, but its derivative \(f'(t) = \frac{1}{3t^{2/3}}\text{,}\) is unbounded near zero and hence not piecewise continuous.
If we happen to have that \(f(t) = \frac{f(t-)+f(t+)}{2}\) at all the discontinuities, the Fourier series converges to \(f(t)\) everywhere. We can always just redefine \(f(t)\) by changing the value at each discontinuity appropriately. Then we can write an equals sign between \(f(t)\) and the series without any worry. We mentioned this fact briefly at the end last section.
The theorem does not say how fast the series converges. Think back to the discussion of the Gibbs phenomenon in the last section. The closer you get to the discontinuity, the more terms you need to take to get an accurate approximation to the function.
Subsection4.3.3Differentiation and integration of Fourier series
Not only does Fourier series converge nicely, but it is easy to differentiate and integrate the series. We can do this just by differentiating or integrating term by term.
is a piecewise smooth continuous function and the derivative \(f'(t)\) is piecewise smooth. Then the derivative can be obtained by differentiating term by term,
\begin{equation*}
f'(t) = \sum_{n=1}^\infty \frac{-a_n n \pi}{L}
\sin \left( \frac{n \pi}{L} t \right)
+ \frac{b_n n \pi}{L} \cos \left( \frac{n \pi}{L} t \right) .
\end{equation*}
It is important that the function is continuous. It can have corners, but no jumps. Otherwise, the differentiated series will fail to converge. For an exercise, take the series obtained for the square wave and try to differentiate the series. Similarly to differentiation, integration of Fourier series is also done term by term.
Note that the series for \(F(t)\) is no longer a Fourier series as it contains the \(\frac{a_0 t}{2}\) term. The antiderivative of a periodic function need no longer be periodic and so we should not expect a Fourier series. Unless, of course, \(a_0 = 0\text{.}\)
and extend to a 2-periodic function. The derivative \(f'(t)\) exists for all \(t\text{,}\) but \(f''(t)\) does not exist if \(t\) is an integer. In particular, \(f'(t) = 2t+1\) if \(-1 \leq t \leq 0\) and \(f'(t) = 1-2t\) if \(0 \leq t \leq 1\text{,}\) so \(f'(t)\) has a “corner” at \(0\text{.}\) See Figure 4.11 for the plot of \(f(t)\) and \(f'(t)\text{.}\)
the plot is almost indistinguishable from the plot of \(f(t)\) in Figure 4.11. In fact, the coefficient \(\frac{8}{27 \pi^3}\) is already just 0.0096 (approximately). The reason for this behavior is the \(n^3\) term in the denominator. The coefficients \(b_n\) in this case go to zero as fast as \(\nicefrac{1}{n^3}\) goes to zero.
For functions constructed piecewise from polynomials as above, it is generally true that if you have one derivative but not two derivatives, the Fourier coefficients will go to zero approximately like \(\nicefrac{1}{n^3}\text{.}\) If you have only a continuous function that is not differentiable, then the Fourier coefficients will go to zero as \(\nicefrac{1}{n^2}\text{.}\) If you have discontinuities, then the Fourier coefficients will go to zero approximately as \(\nicefrac{1}{n}\text{.}\) For more general functions the story is somewhat more complicated but the same idea holds, the more derivatives you have, the faster the coefficients go to zero. Similar reasoning works in reverse. If the coefficients go to zero like \(\nicefrac{1}{n^2}\) (or faster), you always obtain a continuous function. If they go to zero like \(\nicefrac{1}{n^3}\) (or faster), you obtain an everywhere differentiable function.
Therefore, the coefficients now go down like \(\nicefrac{1}{n^2}\text{,}\) which means that we have a continuous function. The derivative of \(f'(t)\) is defined at most points, but there are points where \(f'(t)\) is not differentiable. It has corners, but no jumps. If we differentiate again (where we can), we find that the function \(f''(t)\text{,}\) now fails to be continuous (has jumps)
Use a computer to plot the series we obtained for \(f(t)\text{,}\)\(f'(t)\) and \(f''(t)\text{.}\) That is, plot say the first 5 harmonics of the functions. At what points does \(f''(t)\) have the discontinuities?
Let \(f(t) = \sum_{n=1}^\infty \frac{1}{n^3} \cos (n t)\text{.}\) Is \(f(t)\) continuous and differentiable everywhere? Find the derivative (if it exists everywhere) or justify why \(f(t)\) is not differentiable everywhere.
Let \(f(t) = \sum_{n=1}^\infty \frac{{(-1)}^n}{n} \sin (n t)\text{.}\) Is \(f(t)\) differentiable everywhere? Find the derivative (if it exists everywhere) or justify why \(f(t)\) is not differentiable everywhere.
a) \(\sum\limits_{n=1}^\infty
\frac{{(-1)}^{n+1}}{n} \sin(nt)\) b) \(f\) is continuous at \(t=\nicefrac{\pi}{2}\) so the Fourier series converges to \(f(\nicefrac{\pi}{2}) = \nicefrac{\pi}{4}\text{.}\) Obtain \(\nicefrac{\pi}{4} = \sum\limits_{n=1}^\infty
\frac{{(-1)}^{n+1}}{2n-1} = 1 - \nicefrac{1}{3} + \nicefrac{1}{5}-
\nicefrac{1}{7} + \cdots\text{.}\) c) Using the first 4 terms get \(\nicefrac{76}{105}\approx 0.72\) (quite a bad approximation, you would have to take about 50 terms to start to get to within \(0.01\) of \(\nicefrac{\pi}{4}\)).