About
Fourier coefficients
The Fourier series of a periodic function f(x) with period x = 2π is of the form
f(x) = a0 /2 + Σ (ancos(nx) + bnsin(nx)); n=1,2,3....∞
To calculate the coefficients of the series, one starts with the following assumed identities:
∫f(x)cos(mx)dx = ∫cos(mx) Σ(a0/2 + Σ ancos(nx) + bnsin(nx))dx
∫f(x)sin(mx)dx = ∫sin(mx) Σ(a0/2 + Σ ancos(nx) + bnsin(nx))dx
where one integrates over one base period (m = 1).
Suppressing constants, the following types of integral are to be evaluated, summed over index n:
With m = 1,2,3...∞ and n = 1,2,3...∞: order of the harmonic (fundamental m, n = 1)
cos (mx)
sin (mx)
cos (mx) * (a*cos (nx) + b*sin (nx))
sin (mx) * (a*cos (nx) + b*sin(nx))
All integrals are zero except of those few where the indices are identical: m = n and the function types are the same (sine or cosine). Therefore every sum for a specific index n has only one member and the coefficients can easily be derived from the reduced equations as:
a0 = 2/T∫f(t) dt
an= 2/T∫cos(nx) f(t) dt
bn = 2/T∫sin(nx) f(t) dt
This simulation demonstrates the different types of functions and their integral.
Operation of the simulation
A ComboBox holds a list of all function combinations described on the Fourier Coefficients page. When one is selected it is displayed in red. The antiderivative is calculated for the fundamental period and drawn as a blue curve. Its end value at x = 2pi is the definite integral over one fundamental period, which is needed for the calculation of the coefficients. The integration process is slowed down to visualize more clearly the consequence of changes in parameters or indices.
Some of the selectable functions contain parameters a and b which can be changed continuously by sliders a/ b . Two other sliders m/n select the critical indices m and n as real numbers between 1 and 10.
Parameters and indices are maintained when functions are changed. Integration is started automatically at any change as long as the selection Integral remains active.
By means of sliders a and b scaling of the ordinate can be adjusted to the specific function. They also allow phase shifting of functions.
E1: Choose cosx in the comboBox. It will be calculated and displayed in red. Activate the Integral check box. The integration process will begin with the initial value of the function at x = 0 and will progress in red to the end of the fundamental period x = 2 π. Reflect why the end value and hence the definite integral over the interval [0, 2pi] is zero for integer n.
E2: Change index n with the slider and watch the integral curve. Reflect again why the definite integral is always zero for integer n.
E3: Choose sinx and verify the experiments for it.
E4: Choose asinx + bcosnx and assure yourself by varying a, b, n that the superposition is always a simple, phase shifted periodical, whose definite integral is zero for integer n.
E5: Choose cosx * sinx and assure yourself that the definite integral is always zero for integer n.
E6: Choose the remaining "mixed" functions and assure yourself that the definite integral is non zero only when both terms are of the same type and have identical indices.
E7: Integrate some of the functions analytically and verify the experimental findings.
E8: Conclude in general which characteristics of the functions sine and cosine are the base of your results.
This file was created by Dieter Roess November 2008
This simulation is part of
“Learning and Teaching Mathematics using Simulations
– Plus 2000 Examples from Physics”
ISBN 978-3-11-025005-3, Walter de Gruyter GmbH & Co. KG
Translations
Code | Language | Translator | Run | |
---|---|---|---|---|
![]() |
Credits
Dieter Roess - WEH- Foundation; Tan Wei Chiong; Loo Kang Wee
Executive Summary:
This document reviews the main themes and important ideas presented in the description of the "Fourier Series (Advanced) JavaScript Simulation Applet HTML5" provided by Open Educational Resources / Open Source Physics @ Singapore. The document highlights the purpose of the simulation, the underlying mathematical concepts of Fourier series coefficients, the operation of the applet, and the suggested experiments for users. The simulation is designed as an educational tool to help users understand the relationship between functions and their Fourier series representations through interactive exploration. The "advanced" version builds upon a basic version by including a wider range of functions for analysis.
Main Themes and Important Ideas:
- Introduction to Fourier Series:
- The document introduces the Fourier series as a representation of a periodic function f(x) with a period of x = 2π.
- The general form of the Fourier series is given as:
- *"f(x) = a0 /2 + Σ (ancos(nx) + bn sin(nx)); n=1,2,3....∞"
- Calculation of Fourier Coefficients:
- The core of the Fourier series lies in determining the Fourier coefficients: a0, an, and bn.
- The document outlines the integral identities used to derive these coefficients:
- *"∫ f(x)cos(mx)dx = ∫ cos(mx) Σ ( a0/2 + Σ ancos(nx) + bn sin(nx))dx" *"∫ f(x)sin(mx)dx = ∫ sin(mx) Σ ( a0/2 + Σ ancos(nx) + bn sin(nx))dx"
- It explains that through integration over one base period and utilizing the orthogonality of sine and cosine functions, most integrals become zero, simplifying the coefficient calculations.
- The resulting formulas for the Fourier coefficients are provided:
- "a0 = 2/T ∫f(t) dt" "an= 2/T ∫ cos(nx) f(t) dt" "bn = 2/T ∫ sin(nx) f(t) dt" where T is the period (in this case, effectively 2π after suppressing constants in earlier steps).
- Purpose of the Simulation:
- The primary goal of the JavaScript simulation is to visually demonstrate the relationship between different types of functions and their integrals, which are fundamental to understanding Fourier coefficients.
- The description explicitly states: "This simulation demonstrates the different types of functions and their integral."
- Operation of the Simulation Applet:
- Users interact with the simulation through a ComboBox that lists various function combinations. Selecting a function displays it in red.
- The simulation calculates the antiderivative of the selected function over the fundamental period and displays it as a blue curve.
- The end value of the antiderivative at x = 2π represents the definite integral over one fundamental period, crucial for coefficient calculation.
- The integration process is intentionally slowed down for better visualization of the impact of parameter and index changes.
- Sliders for parameters a and b allow continuous adjustment of function scaling and phase shifting.
- Sliders for indices m and n (ranging from 1 to 10) enable exploration of different harmonic orders.
- The simulation automatically starts integration upon any change when the Integral checkbox is active.
- Suggested Experiments:
- The document provides a series of guided experiments (E1-E8) to facilitate learning:
- E1-E3: Examining the definite integral of cosx and sinx (and asinx) over one period and reflecting on why the integral is zero for integer n.
- E4: Exploring the superposition of asinx + bcosnx and observing that its definite integral remains zero for integer n.
- E5: Investigating the definite integral of cosx * sinx.
- E6: Analyzing "mixed" functions and confirming that a non-zero definite integral occurs only when the function types and indices are identical.
- E7: Encouraging analytical integration of functions to verify the simulation's findings.
- E8: Prompting users to deduce the underlying characteristics of sine and cosine functions that lead to the observed results.
- "Advanced" Version Features:
- The key difference between this "advanced" version and a "basic" version is the inclusion of more complex functions for user exploration:
- - Sawtooth Cosine - Sawtooth Sine - Rectangular Cosine - Rectangular Sine - Rectangular Pulse Cosine - Rectangular Pulse Sine - Gaussian Pulse Cosine - Gaussian Pulse Sine"
- Educational Context:
- The simulation is part of the resource "Learning and Teaching Mathematics using Simulations – Plus 2000 Examples from Physics," highlighting its intended use in an educational setting, particularly for mathematics and physics.
- Technical Details and Credits:
- The simulation is a JavaScript HTML5 applet, allowing for embedding in web pages via an iframe.
- The author is Dieter Roess (November 2008), with contributions from Tan Wei Chiong and Loo Kang Wee.
- The resource is licensed under a Creative Commons Attribution-Share Alike 4.0 Singapore License for non-commercial use. Commercial use requires a separate license from EasyJavaScriptSimulations Library.
Conclusion:
The "Fourier Series (Advanced) JavaScript Simulation Applet HTML5" is a valuable interactive tool for learning about Fourier series. It allows users to visually explore the integration of various periodic functions and understand how the orthogonality of sine and cosine functions leads to the determination of Fourier coefficients. The "advanced" version expands upon a basic version by offering a richer set of functions for analysis, making it a more comprehensive resource for students and educators in mathematics and physics. The guided experiments encourage active learning and deeper understanding of the underlying mathematical principles.
Fourier Series Study Guide
Key Concepts
- Periodic Function: A function that repeats its values at regular intervals or periods. The period T is the smallest positive value for which f(x + T) = f(x) for all x.
- Fourier Series: A representation of a periodic function as an infinite sum of sine and cosine waves with specific frequencies and amplitudes.
- Fundamental Period: The smallest positive period of a periodic function. In the context of the provided material, the fundamental period is given as x = 2π.
- Harmonics: The sine and cosine components of the Fourier series, with frequencies that are integer multiples of the fundamental frequency. The n-th harmonic corresponds to frequencies n times the fundamental frequency.
- Fourier Coefficients: The constants a0, an, and bn that determine the amplitude and phase of each sine and cosine component in the Fourier series.
- Orthogonality of Sine and Cosine: The property that the integral of the product of certain sine and cosine functions over a period is zero, unless the functions have the same frequency (and are both sine or both cosine). This property is crucial for isolating and calculating the Fourier coefficients.
- Definite Integral: The net signed area between the graph of a function and the x-axis over a specified interval. In this context, the definite integral of the function and its products with sine and cosine over one period are used to find the Fourier coefficients.
- Antiderivative: A function whose derivative is the original function. The simulation visualizes the antiderivative to illustrate the process of integration.
Quiz
- What is the general form of the Fourier series for a periodic function f(x) with period 2π? What do the terms a0, an, and bn represent in this series?
- Explain why the orthogonality of sine and cosine functions is essential for calculating the Fourier coefficients of a periodic function. How does this property simplify the integration process?
- According to the simulation description, what is the significance of the "end value" of the blue curve (antiderivative) at x = 2π? How does this relate to the definite integral?
- Describe how the sliders labeled m/n in the simulation allow users to explore the relationship between different harmonics and the integration process. What do the indices m and n represent?
- Based on the experiments described (E1-E3), what general conclusion can be drawn about the definite integral of cos(nx) and sin(nx) over the interval [0, 2π] when n is a non-zero integer?
- In experiment E4, what does varying the parameters a and b in the function asinx + bcosnx demonstrate about the superposition of sine and cosine waves? What remains consistent about its definite integral?
- Experiment E6 highlights a crucial condition for the definite integral of "mixed" functions like cosx * sinx to be non-zero. What is this condition, and why is it important for Fourier series?
- The "For Teachers" section mentions additional functions available in the "advanced" simulation compared to the "basic" version. List three examples of these additional function types.
- What is the role of the "Integral" checkbox in the simulation? How does activating it help in understanding the calculation of Fourier coefficients?
- Experiment E8 asks to conclude about the characteristics of sine and cosine functions that underlie the observed results. Based on the material, what fundamental properties of these functions are likely the basis for the zero definite integrals in many cases?
Quiz Answer Key
- The Fourier series is given by *f(x) = a0 /2 + Σ (ancos(nx) + bn sin(nx)); n=1,2,3....∞. The term a0/2 is the DC component or average value of the function, an are the coefficients determining the amplitude of the cosine terms, and bn are the coefficients determining the amplitude of the sine terms for each harmonic n.
- The orthogonality of sine and cosine means that when you integrate the product of two different sine functions, two different cosine functions, or a sine and a cosine function over a period, the result is zero. This property allows us to isolate each coefficient (a0, an, bn) by multiplying the Fourier series by the corresponding cosine or sine term and integrating over one period, as all other terms will become zero due to orthogonality.
- The end value of the blue curve at x = 2π represents the definite integral of the selected function over the fundamental period [0, 2π]. This value is directly used in the calculation of the Fourier coefficients, as shown in the provided formulas.
- The m/n sliders allow users to independently adjust the indices of the cosine (m) and sine (n) terms involved in the integration process visualized by the simulation. By varying these indices, users can observe how the integral behaves when the frequencies of the function and the integrating sine/cosine terms are the same or different, illustrating the concept of harmonics.
- The definite integral of cos(nx) and sin(nx) over the interval [0, 2π] is zero for any non-zero integer n. This is because over a complete period, the positive and negative areas under these sinusoidal curves cancel each other out.
- Varying a and b demonstrates that a linear combination of sine and cosine functions with the same fundamental frequency (or integer multiples thereof, when n is varied) results in another sinusoidal function with a possibly different amplitude and phase shift. However, for integer n, its definite integral over [0, 2π] remains zero because it is still a periodic function over this interval with equal positive and negative areas.
- The definite integral of mixed functions like cosx * sinx is non-zero only when both terms are of the same type (both cosine or both sine) and have identical indices (m = n). This is a direct consequence of the orthogonality properties of sine and cosine functions; the integral of the product is zero unless the frequencies are the same and the function types match.
- Three examples of the additional function types in the advanced simulation are Sawtooth Cosine, Rectangular Sine, and Gaussian Pulse Cosine.
- The "Integral" checkbox activates the visualization of the antiderivative of the selected function over the fundamental period. By observing the progression of the blue curve and its end value, users can understand how the definite integral is accumulated and its final value, which is crucial for determining the Fourier coefficients.
- The fundamental properties are the periodicity of sine and cosine functions and the symmetry of their areas above and below the x-axis over a complete period. Unless the integration is performed with a sine or cosine of the exact same frequency, the contributions from different parts of the cycle cancel out, leading to a zero definite integral over a full period (or an integer number of periods).
Essay Format Questions
- Discuss the significance of Fourier series in representing periodic functions. Explain the role of Fourier coefficients and the concept of harmonics in constructing this representation.
- Explain how the orthogonality of sine and cosine functions is mathematically exploited to determine the Fourier coefficients of a periodic function. Why is this property crucial for the uniqueness of the Fourier series representation?
- Describe the functionality of the provided JavaScript simulation in visualizing the concepts of Fourier coefficients and the integration process. How do the interactive elements of the simulation enhance understanding of these mathematical concepts?
- Based on the experimental findings (E1-E8) described in the source material, analyze the conditions under which the definite integral of products of sine and cosine functions over a period is zero or non-zero. Relate these findings to the calculation of Fourier coefficients.
- Consider the difference between the "basic" and "advanced" versions of the Fourier Series simulation. How does the inclusion of additional function types in the advanced version broaden the scope for exploring the applicability and characteristics of Fourier series?
Glossary of Key Terms
- Periodic Function: A function f(x) that satisfies the condition f(x + T) = f(x) for all x, where T is a positive constant called the period. The smallest such positive T is the fundamental period.
- Fourier Series: An infinite series representation of a periodic function f(x) with period 2π (or transformable to this period) in terms of a constant term, cosine terms, and sine terms, where the frequencies of the sine and cosine functions are integer multiples of the fundamental frequency.
- Fundamental Period: The shortest interval over which a periodic function completes one full cycle. In this context, it is given as 2π.
- Harmonics: The individual sine and cosine wave components in a Fourier series. The n-th harmonic has a frequency n times the fundamental frequency.
- Fourier Coefficients (a0, an, bn): The numerical values that determine the amplitude of each term in the Fourier series. They are calculated by integrating the periodic function multiplied by specific cosine or sine functions over one period.
- Orthogonality: A property of a set of functions where the integral of the product of any two distinct functions over a given interval is zero. For sine and cosine functions, this property holds under specific conditions related to their frequencies.
- Definite Integral: The integral of a function over a specific interval, resulting in a numerical value representing the signed area between the function's graph and the x-axis within that interval.
- Antiderivative: A function whose derivative is the original function. Visualizing the antiderivative helps understand the accumulation of area during integration.
Sample Learning Goals
[text]
For Teachers
This Fourier Series simulation is essentially identical to the basic version for all intents and purposes, containing the entirety of the basic version within itself.
However, the difference between this "advanced" version and the "basic" version is that more functions have been added for the user to explore.
The additional functions are as follows:
- Sawtooth Cosine
- Sawtooth Sine
- Rectangular Cosine
- Rectangular Sine
- Rectangular Pulse Cosine
- Rectangular Pulse Sine
- Gaussian Pulse Cosine
- Gaussian Pulse Sine
Research
[text]
Video
[text]
Version:
- http://weelookang.blogspot.sg/2016/02/vector-addition-b-c-model-with.html improved version with joseph chua's inputs
- http://weelookang.blogspot.sg/2014/10/vector-addition-model.html original simulation by lookang
Other Resources
[text]
What is a Fourier series and what is its purpose?
A Fourier series is a way to represent a periodic function as a sum of simple sine and cosine waves with different frequencies and amplitudes. Its purpose is to decompose a complex periodic signal into its fundamental frequency components, making it easier to analyze and understand the signal's behavior.
How are the coefficients of a Fourier series (a0, an, bn) calculated?
The coefficients are calculated using integrals of the periodic function multiplied by cosine and sine functions over one period. The formulas are: a0 = 2/T ∫f(t) dt an = 2/T ∫ cos(nx) f(t) dt bn = 2/T ∫ sin(nx) f(t) dt where T is the period of the function f(t), and the integration is performed over one period.
What is the significance of the indices 'n' and 'm' in the context of Fourier series?
The indices 'n' and 'm' represent the order of the harmonic. The fundamental frequency corresponds to n=1 or m=1. Higher integer values of 'n' and 'm' represent higher frequency components, which are integer multiples of the fundamental frequency (harmonics). These indices determine the specific sine and cosine waves included in the Fourier series representation.
What is demonstrated by the Fourier Series (Advanced) JavaScript Simulation Applet?
The simulation demonstrates how different types of functions can be represented by their Fourier series. It allows users to visualize a function (displayed in red) and its antiderivative (displayed as a blue curve) over one fundamental period. The end value of the antiderivative at x = 2π represents the definite integral, which is crucial for calculating the Fourier coefficients.
How does the simulation help in understanding the calculation of Fourier coefficients?
By visualizing the integration process for different functions and harmonics, the simulation helps users understand why certain integrals become zero and others do not. It shows that the definite integral of cos(nx) and sin(nx) over a period of 2π is zero for integer n, and that for "mixed" functions, the integral is non-zero only when the indices and function types are identical. This directly relates to how the Fourier coefficients are extracted.
What are some of the functions that can be explored using the advanced simulation that are not typically in a basic version?
The advanced version includes additional functions like Sawtooth Cosine, Sawtooth Sine, Rectangular Cosine, Rectangular Sine, Rectangular Pulse Cosine, Rectangular Pulse Sine, Gaussian Pulse Cosine, and Gaussian Pulse Sine. These allow for the exploration of a wider variety of periodic waveforms and their corresponding Fourier series.
What key characteristic of sine and cosine functions leads to the results observed in the simulation experiments?
The orthogonality of sine and cosine functions over a period is a fundamental characteristic. Specifically, the integral of the product of two sine functions with different integer multiples of the fundamental frequency, the integral of the product of two cosine functions with different integer multiples of the fundamental frequency, and the integral of the product of a sine and a cosine function with any integer multiples of the fundamental frequency (over one period) are all zero. This orthogonality is what allows for the independent determination of each Fourier coefficient.
What are some of the adjustable parameters and interactive features available in the simulation?
The simulation includes a ComboBox to select different function combinations. Sliders labeled 'a/b' allow for continuous adjustment of parameters affecting the amplitude and phase shifting of certain functions. Sliders labeled 'm/n' enable the selection of critical harmonic indices as real numbers between 1 and 10. Users can also activate or deactivate the 'Integral' checkbox to start or stop the integration visualization. Additionally, sliders for 'a' and 'b' allow for scaling the ordinate to better visualize the functions.
- Details
- Written by Wei Chiong
- Parent Category: 2 Sequences and series
- Category: 2.1 Sequences and series
- Hits: 4449