Calculator overview
Inputs and outputs
This summary comes from the calculator's published input and output contract.
Inputs
- Amplitude (required)
-
Unit units Default 1 Range 0.1 to 10
About this input
How far the wave rises above its midline, from 0.1 to 10 units. Drag the top-level handle. Not used for a drawn wave, whose levels you draw directly.
- Smoothing (required)
-
Default No smoothing Allowed No smoothing, Lanczos, Fejer
About this input
How the harmonics are combined: No smoothing adds them as they are; Lanczos and Fejer taper the higher harmonics, which removes most or all of the ringing near a jump at the cost of rounder corners.
- Wave (required)
-
Default Square Allowed Square, Triangle, Sawtooth, Pulse train, Half-wave rectified sine, Drawn wave
About this input
The wave to rebuild from its harmonics: Square, Triangle, Sawtooth, Pulse train, Half-wave rectified sine, or Drawn wave (your own 60-point drawing). Chosen with the chips on the stage.
- Shift (required)
-
Unit sixtieths of a period Default 0 Range 0 to 59
About this input
How far the wave is delayed, in whole sixtieths of a period (0 to 59). Drag the start marker. A delay changes the phases of the harmonics but never their sizes. Not used for a drawn wave.
- Offset (midline) (required)
-
Unit units Default 0 Range -10 to 10
About this input
The level of the wave's midline, from -10 to 10 units. Drag the midline handle. It moves the whole wave up or down and changes only the mean level. Not used for a drawn wave.
- Drawn wave: the level at each of the 60 points of one period (required)
-
Default 60 rows
About this input
Your own wave: the level at each of 60 evenly spaced points of one period, each from -2 to 2 units, joined by straight lines and repeated every period. Drag the points or sweep across the stage to draw. Used only for the drawn wave.
Column Range or allowed values Drawn level -2 to 2 - Challenge number (required)
-
Default 0 Range 0 to 5
About this input
The challenge to try: 0 for none, 1 to 5 for the five challenges. A challenge sets the wave for you and leaves only its own controls free.
- Your prediction: the overshoot
-
When omitted Blank
Unit % of the jump Default Not set Range 0 to 50
About this input
Challenge 1 only: your prediction of how far the sum rises past the top of the square wave just after its jump, as a percentage of the jump (0 to 50). The sum stays hidden until you place it.
- Pulse width (required)
-
Unit sixtieths of a period Default 15 Range 1 to 59
About this input
How long the pulse stays high, in whole sixtieths of a period (1 to 59). Drag the pulse's falling edge. Used only for the pulse train.
- Highest harmonic included (required)
-
Default 5 Range 1 to 30
About this input
The highest harmonic added to the sum, from 1 to 30. Drag the cut-off line along the spectrum bars: every harmonic up to the line is included.
Outputs
- One period: the target wave, the sum of its harmonics and the smoothed sum at 301 times
-
No unit declared
About this output
One period at 301 evenly spaced times: the target wave, the sum of the included harmonics and the smoothed sum. At a jump the target takes the midpoint, where the sum converges.
- Pulse width used
-
Unit sixtieths of a period
About this output
The pulse length the results use, in sixtieths of a period. Empty unless the wave is a pulse train.
- Overshoot with smoothing
-
Unit % of the jump
About this output
The same overshoot for the smoothed sum. Empty without smoothing or without a jump.
- Wave power about its mean
-
Unit square units
About this output
The power of the wave about its mean: the mean of the squared distance from the mean level, in square units.
- Power captured
-
Unit %
About this output
The share of the wave's power about its mean that the included harmonics carry. Empty for a flat drawing, which has no such power.
- Rotating circles: the circle centres and the tip at 61 times
-
No unit declared
About this output
The rotating circles at 61 times over one period: the centre of circles 2 to 5 and the tip. Each circle turns at its harmonic's speed, and the tip traces the sum of the first five harmonics present.
- Rotating circles: the harmonic and radius of each circle
-
No unit declared
About this output
The harmonic and the radius of each of the five rotating circles (the first five harmonics that are included and present).
- Plot lower bound
-
Unit units
About this output
The lower limit of the wave chart, a little below the lowest level drawn.
- Plot upper bound
-
Unit units
About this output
The upper limit of the wave chart, a little above the highest level drawn.
- Overshoot limit (Wilbraham-Gibbs)
-
Unit % of the jump
About this output
The overshoot the sum approaches as more and more harmonics are added: about 8.95% of the jump, from the sine integral at pi.
- Shift used
-
Unit sixtieths of a period
About this output
The delay the results use, in sixtieths of a period. Empty for a drawn wave.
- Zoom window start
-
Unit periods
About this output
Where the zoom window starts, in periods: the position of the jump. Used to draw the zoom band; empty without a jump.
- Zoom window end
-
Unit periods
About this output
Where the zoom window ends, in periods (it wraps past the end of the period when it is smaller than the start). Used to draw the zoom band; empty without a jump.
- Offset used
-
Unit units
About this output
The midline level the results use. Empty for a drawn wave.
- Smoothing used
-
No unit declared
About this output
The smoothing the results use (a challenge may set it).
- RMS error with smoothing
-
Unit units
About this output
The root-mean-square difference between the smoothed sum and the wave over one period, in units. Empty without smoothing.
- Wave used
-
No unit declared
About this output
The wave the results are for (a challenge may set it).
- Amplitude used
-
Unit units
About this output
The amplitude the results use. Empty for a drawn wave.
- RMS error of the sum
-
Unit units
About this output
The root-mean-square difference between the sum of the included harmonics and the wave over one period, in units.
- Guide lines for the log-log RMS error chart, falling with slopes 1/2 and 3/2
-
No unit declared
About this output
Two guide lines for the log-log chart of the RMS error against the number of harmonics, through the error with 30 harmonics: one falling as 1 over the square root of N (a wave with jumps), one as N to the power minus three halves (a wave with corners).
- Challenge result
-
No unit declared
About this output
MET or NOT MET for the selected challenge, or No challenge selected.
- Zoom just after the jump: the target and the sums over one and a half ripples
-
No unit declared
About this output
A close look just after the jump, over one and a half ripples of the highest harmonic: the target and the two sums at 46 evenly spaced times.
- Overshoot after the jump
-
Unit % of the jump
About this output
How far the sum of harmonics rises past the target just after the jump, as a percentage of the jump. For a square wave it stays near 9% however many harmonics you add (the Gibbs phenomenon). Empty for a wave with no jump.
- Challenge score
-
No unit declared
About this output
100 when the selected challenge is met, otherwise 0.
- Challenge feedback
-
No unit declared
About this output
A hint toward the goal, or what the result shows once the challenge is met.
- Power of the included harmonics
-
Unit square units
About this output
The power carried by the included harmonics, in square units; with the power about the mean it gives the share captured.
- Challenge: the value scored
-
No unit declared
About this output
The value the challenge is scored on: your prediction minus the measured overshoot (challenge 1), the power captured (challenges 2 and 4), harmonic 3 as a percentage of harmonic 1 (challenge 3), or the overshoot in use (challenge 5).
- Challenge goal
-
No unit declared
About this output
What the selected challenge asks you to do.
- Model Status
-
No unit declared
About this output
OK when the results can be used; CHECK when the drawn wave is flat and has no harmonics to show; NOT VALID with the reason when an input cannot be used, and then the results are empty.
- Missing harmonics
-
No unit declared
About this output
The harmonics up to the cut-off that the wave does not contain (their size is zero), or none. A square wave has no even harmonics; a pulse loses every harmonic that fits a whole number of cycles into the pulse.
- Formula module versions
-
No unit declared
About this output
The versions of the formula modules behind these results.
- Model version
-
No unit declared
About this output
The version of the model behind these results.
- Mean level
-
Unit units
About this output
The average level of the wave over one period, in units: the constant term of the series.
- The spectrum: amplitude, phase, power captured and RMS error for harmonics 1 to 30
-
No unit declared
About this output
For each harmonic 1 to 30: its size, its phase in degrees, the share of the power captured by the harmonics up to it, and the RMS error left with the harmonics up to it.
- Highest harmonic included (used)
-
No unit declared
About this output
The highest harmonic included in the results (a challenge may set it).
- Jump size
-
Unit units
About this output
The size of the wave's jump in units: positive for a rising jump, negative for a falling one. Empty for a wave with no jump.
- Highest harmonic present
-
No unit declared
About this output
The highest harmonic that is both included and present in the wave (0 for a flat drawing).
LogicCommons is in beta. If a result, label, or reference looks wrong, tell us here; we read every message.
Methodology
Purpose and model boundary
This lab rebuilds one period of a periodic wave from its first N harmonics, N from 1 to 30. The wave is a square, triangle, sawtooth, pulse train or half-wave rectified sine, or a wave you draw through 60 points. The model returns each harmonic's size and phase, the share of the wave's power the included harmonics carry and the RMS error left, by Parseval's identity, the sum at 301 times with optional Lanczos or Fejer smoothing, and the overshoot of the sum just after a jump (the Gibbs phenomenon), measured in a zoom window and set against its limit for many harmonics. A chain of five rotating circles traces the same sum. Five scored challenges go with it.
It is a lab for learning how a finite Fourier series converges: why the corners sharpen and the error falls as harmonics are added, why the sum keeps overshooting a jump by about 9% of the jump however many harmonics it has, why a smooth wave needs few harmonics and a wave with jumps many, and how smoothing trades the overshoot for rounder corners. It is not a tool for analysing measured signals: it uses at most 30 harmonics and 301 samples a period, and its results hold only within its stated ranges.
The model is the calculation authority. The page sends the values you set to the model and draws only what it returns: the target wave and the sums, the spectrum bars and phases, the zoom window and its curves, the rotating circles and their film, the power and error charts and their guide lines all come from the model's own tables. The page computes no coefficient, sum, power, error or overshoot itself.
Inputs and units
One period is 1, so time is in periods. Wave levels are in plain units; the shift and the pulse width are whole sixtieths of a period; the overshoot is a percentage of the jump and the power captured a percentage of the wave's power about its mean.
| Input | Meaning and unit |
|---|---|
| Wave | Square (default), Triangle, Sawtooth, Pulse train, Half-wave rectified sine or Drawn wave. |
| Highest harmonic included | N, a whole number from 1 to 30 (default 5): every harmonic up to N is added to the sum. |
| Amplitude | A, from 0.1 to 10 units (default 1): how far the wave rises above its midline. Not used for a drawn wave. |
| Offset (midline) | c, from -10 to 10 units (default 0): the level of the midline; it changes only the mean. Not used for a drawn wave. |
| Shift | s, a whole number of sixtieths from 0 to 59 (default 0): the wave is delayed by s/60 of a period. Not used for a drawn wave. |
| Pulse width | w, a whole number of sixtieths from 1 to 59 (default 15): how long the pulse stays high. Pulse train only. |
| Drawn wave | The level at each of 60 evenly spaced points of one period, each from -2 to 2 units, joined by straight lines and repeated every period. The default drawing is a square wave with one-sixtieth ramps. Drawn wave only. |
| Smoothing | No smoothing (default), Lanczos or Fejer. |
| Challenge number | 0 for free exploration, or 1 to 5 to load a challenge. |
| Your prediction: the overshoot | Blank (not yet predicted), or 0 to 50 % of the jump: your answer for challenge 1. 0 is a real prediction. |
Where each input is set:
- On the canvas only: the wave and the smoothing (chips on the stage), the highest harmonic (a cut-off line dragged along the spectrum bars), the amplitude (the wave's top-level handle), the offset (the midline handle), the shift (the start marker), the pulse width (the pulse's falling-edge marker), the drawn wave (drag its 60 points or sweep across the stage to draw) and your prediction in challenge 1 (a marker on the overshoot gauge beside the zoom panel, shown only in that challenge). Each handle has a popover for exact entry.
- On the page: the challenge picker. The input panel holds no lab input.
The model checks an input only when the wave in use reads it: the amplitude, offset and shift for the five template waves, the width for the pulse train, the 60 levels for the drawn wave.
Governing relationships
The series. With x the time in periods, the wave is written f(x) = a₀ + Σ [a_k·cos(2πkx) + b_k·sin(2πkx)] for k = 1, 2, ..., and the sum with N harmonics keeps the terms up to k = N. The mean a₀ is the constant term. Each harmonic has the amplitude r_k = √(a_k² + b_k²) and, in the sine-phase form a_k·cos + b_k·sin = r_k·sin(2πkx + φ_k), the phase φ_k = atan2(a_k, b_k) in degrees, from just above -180 to 180. A phase is blank where the amplitude is 0.
The template coefficients, in closed form. For amplitude 1, offset 0 and no shift:
- Square, +1 on the first half of the period and -1 on the second: b_k = 4/(π·k) for odd k, 0 for even k; every a_k is 0.
- Triangle, 0 at the start, +1 at a quarter period and -1 at three quarters: b_k = ±8/(π²·k²) for odd k (+ when k leaves remainder 1 on division by 4), 0 for even k.
- Sawtooth, rising from -1 to +1 and falling at half a period: b_k = 2/(π·k) for odd k and -2/(π·k) for even k.
- Pulse train, 1 for the first D = w/60 of the period and 0 after it: a_k = sin(2π·k·D)/(π·k) and b_k = (1 - cos(2π·k·D))/(π·k). Both are exactly 0 when k·w is a multiple of 60, so a pulse loses every harmonic that fits a whole number of its cycles into the pulse.
- Half-wave rectified sine, the larger of 0 and sin(2πx): b₁ = 1/2, a_k = -2/(π·(k² - 1)) for even k, and every other coefficient 0.
The means are 0 for the square, triangle and sawtooth, D for the pulse and 1/π for the half-wave sine. A shift of s/60 turns each pair (a_k, b_k) through the angle 2π·k·s/60, which changes the phases but never the amplitudes; the amplitude A then scales every coefficient, and the mean becomes c + A·(the template mean). Zero harmonics of a template are exact zeros by construction.
The drawn wave, exactly. The drawing is the piecewise-linear wave through its 60 points y_j at x = j/60. With the slope m_j = 60·(y_(j+1) - y_j) on each piece (the last piece runs back to y₀) and the change of slope Δm_j = m_j - m_(j-1) at each point, integrating twice by parts gives a_k = -Σ Δm_j·cos(2π·k·j/60)/(2π²k²) and b_k = -Σ Δm_j·sin(2π·k·j/60)/(2π²k²). These are the exact coefficients of the drawn shape, with no sampling or aliasing. A harmonic whose amplitude is at most 1×10⁻⁹ times the largest is set to 0 and counts as missing.
Power and error by Parseval's identity. The power of the wave about its mean is A² for the square, A²/3 for the triangle and the sawtooth, A²·(D - D²) for the pulse and A²·(1/4 - 1/π²) for the half-wave sine; for a drawing it is the exact mean square of the straight pieces minus the mean squared. Harmonic k carries the power (a_k² + b_k²)/2. The power captured is the sum of those powers up to N, the share captured is that sum as a percentage of the power about the mean, and the RMS error of the sum is √(power about the mean - power captured). No sampling enters these values.
Smoothing. Each included harmonic is multiplied by a weight: 1 with no smoothing; the Lanczos sigma factor sin(π·k/(N + 1)) / (π·k/(N + 1)); or the Fejer weight 1 - k/(N + 1). The error of the smoothed sum keeps (1 - weight) of each included harmonic and all of every harmonic above N, so its power, and from it the smoothed RMS error, follows from Parseval's identity without sampling.
The sum over the period. The target, the sum and the smoothed sum are evaluated at the 301 times x = i/300. At a jump the target takes the midpoint of the two levels, which is where the series converges.
The jump and the zoom window. The square jumps up by 2A at its start (after the shift), the sawtooth down by 2A at half a period after it, and the pulse up by A at its start. The window starts at the jump and holds 46 points, m/(30·M) periods after it for m = 0 to 45, where M is the highest harmonic present, but at least 4: one and a half ripples of that harmonic. The model evaluates the target and both sums there.
The overshoot. At each zoom point after the jump the error share g = (sum - target)/(the signed jump) is positive when the sum is beyond the target, for a rising or a falling jump, so the sawtooth is measured against its ramp. For a pulse only the points before its falling edge count; the jump point itself never counts. The model takes the largest of these shares and of the peaks of the parabola through each three neighbouring points (a peak counts only when it lies between the outer two of them), floors it at 0 and reports it as a percentage. No single largest sample is picked, so the value moves continuously with the inputs. The smoothed overshoot is the same measure on the smoothed sum. Drawn waves are continuous, so they have no jump and no overshoot.
The limit for many harmonics. As N grows the overshoot of a square-wave sum approaches 100·((2/π)·Si(π) - 1)/2, about 8.949% of the jump, where Si is the sine integral.
The rotating circles. The first five harmonics that are both included and present (amplitude above 0) each become a circle of radius r_k. Circle 1 is centred at (0, a₀); at time x the vector of harmonic k is (b_k·cos 2πkx - a_k·sin 2πkx, a_k·cos 2πkx + b_k·sin 2πkx), and each next circle is centred at the tip of the one before. The height of the last tip is a₀ plus those harmonics at x. The film holds 61 frames, x = 0, 1/60, ..., 1.
Error guide lines. Two lines for the log-log chart of the RMS error against N pass through the error with 30 harmonics: one falling as N^(-1/2), the rate for a wave with jumps, and one as N^(-3/2), the rate for a wave with corners.
Calculation sequence
- The model checks the inputs that apply to the wave in use, in the order of the status list under Errors and warnings, up to the challenge number and your prediction.
- In a challenge, it replaces the inputs the challenge fixes with the challenge's values; your prediction is never replaced.
- It derives the mean, the jump, the power about the mean and, for a drawing, whether the drawing is flat.
- It computes the coefficients of harmonics 1 to 30 (closed form for a template, exact for a drawing), turns them by the shift and scales them, then the amplitudes, phases, powers, cumulative shares, RMS errors and smoothing weights.
- It sums the series at the 301 times and at the 46 zoom points, plain and smoothed, and builds the rotating circles' film.
- It reads the overshoots, the missing harmonics, the highest harmonic present and the guide lines.
- It sets the status and, in a challenge, scores the challenge and withholds what the challenge keeps back.
Outputs and interpretation
- Gibbs overshoot and smoothed overshoot (% of the jump): how far the sum, and the smoothed sum, rise past the target just after the jump. Blank for a wave with no jump; the smoothed value is blank without smoothing.
- Power captured (%): the share of the power about the mean that harmonics up to N carry. Blank for a flat drawing.
- RMS error and smoothed RMS error (units): the root-mean-square difference between the sum, or the smoothed sum, and the wave over one period.
- Missing harmonics: the harmonics up to N that the wave does not contain, or none. A square wave has no even harmonics.
- Jump size (units, negative for a falling jump) and mean level (units).
- Highest harmonic used, power of the wave about its mean and power captured (square units), and the limit of the overshoot for many harmonics (about 8.95% of the jump).
- Settings used: the wave, highest harmonic, amplitude, offset, shift, pulse width and smoothing in effect (a challenge may set them; those a wave does not use are blank).
- Tables: the target and the sums at 301 times; for each harmonic its amplitude, phase, cumulative share of the power and RMS error with harmonics up to it; the zoom window's 46 points; the rotating circles and their 61 frames; the two guide lines.
Reading the canvas: the stage draws the target wave, the sum on top of it and the gap between them; the spectrum shows a bar for each harmonic, faded above the cut-off, with a zero harmonic drawn as a tick. The zoom panel shows the target and the sums just after the jump, and the five circles turn as the player steps through their frames. At Explore the lab offers the square, triangle and sawtooth, the cut-off and the amplitude, with the zoom panel while challenge 1 is selected. Experiment adds the other three waves, the offset, shift, pulse width, drawing and smoothing, the phase bars, the full zoom panel and the smoothed sum. Advanced adds the cumulative power curve, the RMS error against N and the amplitudes against k on log-log axes with the two guide lines.
What to take from the lab: each added harmonic sharpens the corners and lowers the error, but next to a jump the sum keeps overshooting by about 9% of the jump; more harmonics only squeeze the ripple closer to the edge. A triangle is almost all fundamental, while a square wave's power falls off slowly with the harmonic number. A pulse whose width fits a whole number of a harmonic's cycles loses that harmonic. On the log-log chart the error of a wave with jumps falls about as N^(-1/2) and that of a wave with corners as N^(-3/2). Smoothing tapers the high harmonics and removes most of the ringing, at the cost of rounder corners.
Challenges
Selecting a challenge sets the wave for you and leaves only its own controls free. The model scores each one MET (100) or NOT MET (0) and gives a one-line hint while it is not met. Challenges 1 and 2 are offered from Explore, challenges 3 to 5 from Experiment.
- Predict the overshoot (easy). The square wave with amplitude 1 and harmonics up to 29. Predict how far the sum rises above the top of the square wave just after its jump, as a percentage of the jump. Met when your prediction lies within 1.5 points of the measured overshoot. The value scored is your prediction minus the measured overshoot.
- Ninety-five percent (easy). The same square wave, with the highest harmonic free. Met when N is at most 10 and the power captured is at least 95%. The value scored is the power captured.
- Silence harmonic 3 (medium). A pulse train with harmonics up to 10 and the width free: make harmonic 3 disappear from the spectrum. Met when the pulse lasts a whole number of cycles of harmonic 3 exactly. The value scored is harmonic 3 as a percentage of harmonic 1.
- Three harmonics are enough (medium). A drawn wave with harmonics up to 3: draw a wave at least 1 unit from its lowest to its highest point whose first three harmonics hold at least 99% of its power. Met when the drawing is not flat, spans at least 1 unit and the power captured is at least 99%. The value scored is the power captured.
- Tame the ringing (hard). The square wave with the highest harmonic and the smoothing free. Met when N is at most 15, the overshoot in use (plain without smoothing, smoothed otherwise) is below 2% of the jump and its RMS error is at most 0.245. The value scored is the overshoot in use.
Challenge 1 holds back the answer until you predict: while the prediction is blank, the overshoots, the limit for many harmonics, the sums at the 301 times and in the zoom window, the rotating circles' film and the scored value are blank, and the challenge reads NOT MET with the prompt to place your prediction first. The target wave, the jump, the spectrum and the power and error values stay, because they are what you reason from. Once you place any prediction, 0 included, every result appears and the challenge is scored. While challenge 2 is not met, the cumulative power share and the RMS error columns are blank for the harmonics above your N, since they would show where 95% is crossed; the power captured at your own N stays. Challenges 3 to 5 hold nothing back: the spectrum, the power captured and the overshoot and error values are feedback on your own setting. A prediction entered with no challenge, or in challenges 2 to 5, changes nothing.
Validation and status logic
The status reads the first match in the list under Errors and warnings. The NOT VALID checks read the values you entered, and only for the inputs that apply to the wave in use; an input that applies is checked on its entered value even inside a challenge that fixes it. The CHECK item reads the values in effect after a challenge has set its own, and applies inside challenge 4 too, where a flat drawing is NOT MET. A challenge number that is not a whole number from 0 to 5 counts as no challenge selected.
Assumptions and limitations
- At most 30 harmonics; the sums are evaluated at 301 times a period and 46 points in the zoom window.
- Drawings have 60 points joined by straight lines and repeat every period; their spectra are exact for that shape. The shift and the pulse width move in whole sixtieths, so every jump falls on a sample.
- The overshoot is measured on the 46 zoom points by parabolas through neighbouring points. For a square wave it agrees with the exact peak of the sum within 0.05 percentage points. For a pulse narrower than the window only the stretch before its falling edge is measured.
- Drawn waves are continuous, so they report no jump and no overshoot.
- A drawn harmonic below 1×10⁻⁹ of the largest is shown as missing, and a drawing whose power about its mean is at most 1×10⁻⁹ of its total power counts as flat.
- A value within about 1×10⁻⁹ (relative) of a threshold, such as the zero-harmonic band, the flat band, the phase at ±180 degrees or the 1-unit span of challenge 4, may fall either side of it.
Restrictions and non-computing states
Under NOT VALID every result and every table is blank, except the challenge result (No challenge selected, or NOT MET when a challenge is selected), a score of 0, and the goal and not-met hint of a selected challenge.
For a flat drawing (CHECK) every amplitude is 0 and every harmonic up to N is missing; the power captured, the cumulative power shares, the phases, the guide lines and the rotating circles are blank.
In challenge 1, until you predict, and in challenge 2, until it is met, the results listed under Challenges stay blank.
Errors and warnings
The status messages, first match wins:
- NOT VALID: choose the wave from the list
- NOT VALID: the number of harmonics must be a whole number from 1 to 30
- NOT VALID: the amplitude must be from 0.1 to 10 — the five template waves.
- NOT VALID: the offset must be from −10 to 10 — the five template waves.
- NOT VALID: the shift must be a whole number of sixtieths from 0 to 59 — the five template waves.
- NOT VALID: the pulse width must be a whole number of sixtieths from 1 to 59 — pulse train.
- NOT VALID: every drawn point must be a number from −2 to 2 — drawn wave; all 60 points.
- NOT VALID: choose the smoothing from the list
- NOT VALID: the challenge number must be a whole number from 0 to 5, and the overshoot prediction blank or a number from 0 to 50
- CHECK: the drawn wave is flat, so it has no harmonics to show; drag some points up or down — the drawing's power about its mean is at most 1×10⁻⁹ of its total power.
- OK
References
This laboratory is an educational model of rebuilding a periodic wave from its Fourier series, a constant plus a sum of cosine and sine harmonics. The square, triangle, sawtooth, pulse and half-wave rectified sine use their closed-form coefficients; a wave drawn through 60 points and joined by straight lines uses the exact coefficients of that piecewise-linear wave, so no sampling error enters. Parseval's identity gives the power that the first N harmonics capture and the RMS error of the partial sum exactly. The partial sum is drawn at 301 times in one period, and can be smoothed by Lanczos sigma factors or by Fejer means. Near a jump the partial sum overshoots; a zoom window measures the overshoot as a share of the jump and sets it against its limit for many harmonics, about 8.95% of the jump (the Gibbs phenomenon). A chain of five rotating circles shows the first harmonics as rotating vectors.
Sources and further reading
- The Fourier series of a periodic function, its coefficients and Parseval's formula: National Institute of Standards and Technology, NIST Digital Library of Mathematical Functions, Release 1.2.8 of 2026-09-15, section 1.8, Fourier Series. NIST DLMF
- The Gibbs phenomenon, the overshoot of a square wave's partial sums next to a jump, described through the sine integral Si: National Institute of Standards and Technology, NIST Digital Library of Mathematical Functions, Release 1.2.8 of 2026-09-15, section 6.16(i), The Gibbs Phenomenon. NIST DLMF
- Summability of Fourier series, the idea behind smoothing a partial sum with Fejer means: A. Zygmund, Trigonometric Series, 3rd edition, Cambridge University Press, Cambridge Mathematical Library, 2003, chapter III, Summability of Fourier Series. doi:10.1017/CBO9781316036587
No table or text from any of these publications is reproduced, and none of their authors or publishers has reviewed or endorses this laboratory.
This laboratory is for learning. Its results hold only within its stated ranges; it uses at most 30 harmonics and 301 samples a period, and it is not a tool for analysing measured signals.
Found a problem, or have an idea?
Tell us if a result looks wrong, a label is unclear, or something is missing. We read every message.