---
title: "Fourier Series"
description: "Any reasonable periodic function is a sum of sines and cosines. The coefficients are recovered by integrating against each one, which is what lets a system driven by a complicated periodic input be so"
canonical: https://lightmysky.com/learn/mathematics/fourier-series-mt_DJ3iwfj7NK
source: https://lightmysky.com/learn/mathematics/fourier-series-mt_DJ3iwfj7NK.md
retrieved: 2026-11-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Fourier Series

Any reasonable periodic function is a sum of sines and cosines. The coefficients are recovered by integrating against each one, which is what lets a system driven by a complicated periodic input be solved one frequency at a time.

Subject: Mathematics · Area: Differential Equations · Ages 20 to 21
Page: https://lightmysky.com/learn/mathematics/fourier-series-mt_DJ3iwfj7NK

## Ready when they can

- Compute the first Fourier coefficients of a square or sawtooth wave
- Explain how orthogonality of the sines and cosines isolates each coefficient
- Say what the partial sums do near a jump discontinuity

## Lesson: Repeating waves built from pure tones

Any reasonable periodic function is a sum of sines and cosines. You stack them up: a0 over 2 plus a1 cosine x plus b1 sine x plus a2 cosine 2 x plus b2 sine 2 x, on and on. The constant term a0 over 2 is the average of the function over one full period, so a0 is twice that average. To get each an, multiply by cosine n x and integrate over a period, then double and divide by the period length. Do the same trick with sine n x for each bn.

**Example.** Take the square wave that is -1 on (-pi, 0) and +1 on (0, pi), repeating every 2 pi. It is odd, so every an is 0 and only sine terms survive. For b1, multiply by sine x and integrate: b1 = (1 over pi) times the integral from -pi to pi of f(x) sin x dx, which is (2 over pi) times the integral from 0 to pi of sin x dx = (2 over pi) times 2 = 4 over pi. The same steps give bn = 4 over (n pi) for odd n and 0 for even n. A few terms already look like the wave, except near the jumps.

This works because sines and cosines of different frequencies are orthogonal: multiply two different ones and integrate over a full period, and you get zero. That is what isolates one coefficient at a time instead of solving for all of them together. Symmetry reads off whole families for free: odd functions keep sines only, and even functions keep cosines only.

Expect trouble at jump discontinuities. Near a jump the partial sums overshoot and undershoot by about 9 percent of the jump size, however many terms you keep; more terms only squeeze the wiggle closer to the jump. This is the Gibbs phenomenon. At the jump itself the series converges to the midpoint of the two sides: a wave that jumps from 1 to 3 gives 2 there. The split is still useful to engineers, because a system driven by a messy periodic input can be solved one frequency at a time and the answers added.

**Recap.** Multiply by each tone, integrate over a period, and stack the surviving sines and cosines.

## Practice

17 questions on this page, each with its working shown.

## Needs first

- [Damped and Driven Oscillations](https://lightmysky.com/learn/mathematics/damped-and-driven-oscillations-mt_Y8K1njb1PH)

## Optional connections

- [Infinite Series and the Geometric Series](https://lightmysky.com/learn/mathematics/infinite-series-and-the-geometric-series-mt_EPE-ERFFQt)
- [Inner Products, Length and Orthogonality](https://lightmysky.com/learn/mathematics/inner-products-length-and-orthogonality-mt_X0HPRGto4W)

## Opens up

- [Fourier Analysis and the Wave Packet](https://lightmysky.com/learn/science/fourier-analysis-and-the-wave-packet-mt_1ZaojWUZEw)
- [The Fourier Transform on the Line](https://lightmysky.com/learn/mathematics/the-fourier-transform-on-the-line-mt_BMrt5FPe3U)
- [Series Solutions About an Ordinary Point](https://lightmysky.com/learn/mathematics/series-solutions-about-an-ordinary-point-mt_E6NiSd7MED)
- [Sturm-Liouville Problems and Eigenfunction Expansions](https://lightmysky.com/learn/mathematics/sturm-liouville-problems-and-eigenfunction-expansions-mt_oqadAPaSsW)
- [Hilbert Spaces and Orthogonal Projection in Infinite Dimensions](https://lightmysky.com/learn/mathematics/hilbert-spaces-and-orthogonal-projection-in-infinite-dimensions-mt_xmKq8SAgvy)
- [Separation of Variables and the Heat Equation](https://lightmysky.com/learn/mathematics/separation-of-variables-and-the-heat-equation-mt_XnPDL0X1TL)
