Fourier Series
Fourier Semicircle
The semicircle sqrt(1-x^2) on [-1, 1], period 2, with cosine coefficients.
fourier_series(semicircle) plots sqrt(1 - x^2) on [-1, 1] and repeats that arch with period 2. The Fourier coefficients are the cosine terms J_1(n*pi)/n.
The formula is analytical. The curve on the board is the partial sum of those numerical values. The endpoints are cusps of infinite slope, not jumps.
Equation
fourier_series(semicircle)
How a Fourier series is built
A Fourier series analyzer starts from a periodic function and builds the coefficients, rather than asking you to type the series yourself. On an interval of length 2L the constant is a0/2, with an cosine terms and bn sine terms at frequency nπ/L. The complex coefficients are c0 = a0/2, cn = (an − i bn)/2, and c−n = (an + i bn)/2. Even functions on a symmetric interval have bn = 0. Odd functions have a0 = 0 and an = 0.
Exact integrals are kept as symbolic formulas, including the Bessel factor in the semicircle cosine coefficients. When a closed form is not returned, adaptive quadrature supplies the numbers and the steps say so. The graph draws the original periodic function and the partial sum SN together. The N slider recomputes SN in the browser from those coefficients. At a jump the series meets the average of the one-sided limits, and the partial sums overshoot that jump by about nine percent of its height. That Gibbs overshoot moves toward the discontinuity as N grows and does not disappear.
Reading the input
fourier_series(semicircle)— This is a command. The name selects the routine, and the items inside the parentheses are its arguments.
Try a change
- Change N, or move the N slider after Generate Graph. The partial sum gains or loses harmonics while the periodic function stays in place.
- Compare square, sawtooth, triangle, and semicircle. Even waves keep cosine terms. Odd waves keep sine terms. A jump shows the Gibbs overshoot.
Generate Graph draws the periodic function and the partial sum S_N on the same Cartesian board. The N slider updates S_N locally from the coefficient arrays. Jumps are gaps in the original curve, with open circles at the one-sided limits. The series meets the midpoint, and the caption reports the Gibbs overshoot when a jump is present.