Fourier Series (Part 3)
Taylor vs. Fourier Series Approximations
We are now going to compare the Taylor approximations and Fourier approximations to the same function to see which is better for approximating values.
Consider the function
-
Write down the first four terms and the general term for the MacLaurin power series of . What is the interval of convergence?
The interval of convergence is .
-
Let be the th degree Taylor series approximation for . Draw a graph of and on the same axes on the interval . How good of an approximation is near zero? Near ?
As the values approach 0, the approximation becomes more accurate. However, as the values approach , the approximation becomes less accurate.
-
Let be the Fourier series that goes up to the term/coefficient. For example, . Using your previous work on Fourier series, find the coefficients for . Graph and on the same axes on the interval . How good of an approximation is near zero? Near ?
As the values approach 0, the approximation yields an underestimation. However, as the values approach , the approximation yields an overestimation. The approximation around is much better than the previous Taylor Series approximation.
Now we will define something called the least-squares error, which takes the form of . The argument in parentheses represents the difference between the actual function and its approximation. Think about why this would be called the “least-squares error.”
-
Find the least squares error for , , and .
-
Explain why we would expect the least squares error to increase for as increases (at least for some time)
For these initial truncations, the endpoint region near dominates the squared error. The alternating exponential terms initially grow when , so adding a term can increase the error before enough terms are included. The full series converges uniformly on this fixed interval, and the error eventually tends to zero; higher degree does not generally mean a worse Taylor approximation.
-
Find the least squares error for , , and .
-
Explain why we would expect the least squares error to decrease for as increases.
The least squares error decreases for as increases because the Fourier series approximation becomes more accurate as the number of terms in the series increases. This is because the Fourier series is accurate over the entire interval, and as the number of terms increases, the approximation becomes more accurate.
-
For what value of does the least squares error of first become less than 0.001? Show your work.
With defined as a degree- polynomial,
The original Desmos calculation counts the largest summation index instead of polynomial degree:
Largest summation index Polynomial degree Recomputed squared error 2 4 1001.030453 3 6 6416.169822 23 46 0.046312817 24 48 0.007084198 25 50 0.001002047 26 52 0.000131458 Thus the first polynomial degree is , corresponding to the original summation cutoff 26. Rounding the degree-50 error to “0.001” conceals that it is still greater than the threshold.
-
For what value of does the least squares error of first become less than 0.00001? Show your work.
The least squares error of is already less than 0.00001. See #3.
Correction
The original formulas actually had degrees 6, 8, and 10; their errors were 6416.169, 25822.818, and 71126.021. Degree labels and associated errors are corrected above. The derivative values at zero were mislabeled as derivatives for general . The coefficient integrals in the Fourier section lacked their normalization factors, although the numerical coefficients already used them. The error decreases when harmonics are added, rather than removed.
The graph embeds retain the original calculations; use the reviewed equations and degree labels in this note. The Fourier coefficients minimize the integrated squared error among trigonometric polynomials of the same order, so adding modes cannot increase this error. MIT: orthogonal functions and least squares.
Related: Fourier coefficients for even functions, Odd and general Fourier series, Changing the Fourier interval.