Advanced Mathematics

Fourier Series

Writing a periodic function as a sum of sines and cosines, with each coefficient found by an integral.

Needs a step first: 18

On [−π,π][-\pi,\pi] the functions 1,cos⁡nx,sin⁡nx1,\cos nx,\sin nx are mutually orthogonal, so any reasonable periodic function can be written f(x)=a02+∑n(ancos⁡nx+bnsin⁡nx)f(x)=\tfrac{a_0}{2}+\sum_n(a_n\cos nx+b_n\sin nx), with bn=1π∫−ππf(x)sin⁡nx dxb_n=\tfrac1\pi\int_{-\pi}^{\pi}f(x)\sin nx\,dx and ana_n likewise. Each coefficient is a projection onto one frequency, exactly like finding coordinates in an orthonormal basis. Even a square wave with sharp corners is built from smooth waves. It is how sound is analysed and how the heat and wave equations are solved.

Where it shows up: The original transformer marks word positions with sines and cosines at many frequencies, and the stationary states of a particle in a box are the functions sin⁡nx\sin nx.

How to hold it: In your head

See each Fourier coefficient as a projection onto one frequency, like a coordinate in an orthonormal basis, and use odd and even symmetry to know which ones vanish.

What knowing it looks like

  • Compute the Fourier coefficients of a simple periodic function, using odd and even symmetry to skip integrals.
  • Explain the coefficients as projections onto orthogonal functions.
  • Evaluate a Fourier series at a chosen point to sum a numerical series.

Test yourself

Find the Fourier series of the square wave with f(x)=−1f(x)=-1 for −π<x<0-\pi<x<0 and f(x)=1f(x)=1 for 0<x<π0<x<\pi, repeated with period 2π2\pi. What does the series give at x=π2x=\tfrac\pi2?
Show the worked answer
ff is odd, so every an=0a_n=0. bn=2π∫0πsin⁡nx dx=2nπ(1−cos⁡nπ)b_n=\tfrac2\pi\int_0^\pi\sin nx\,dx=\tfrac{2}{n\pi}(1-\cos n\pi), which is 4nπ\tfrac{4}{n\pi} for odd nn and 00 for even nn. So f(x)=4π(sin⁡x+13sin⁡3x+15sin⁡5x+⋯)f(x)=\tfrac4\pi\big(\sin x+\tfrac13\sin3x+\tfrac15\sin5x+\cdots\big). At x=π2x=\tfrac\pi2 the sines are 1,−1,1,…1,-1,1,\dots, so 1=4π(1−13+15−⋯)1=\tfrac4\pi\big(1-\tfrac13+\tfrac15-\cdots\big), that is 1−13+15−⋯=π41-\tfrac13+\tfrac15-\cdots=\tfrac\pi4.

Needs a step first: 18

Learn it with an AI

Copy this prompt into any AI assistant. It will take you through step by step at your level and finish with the test above.

Be my maths tutor. I'm learning "Fourier Series" (Undergraduate I tier): Writing a periodic function as a sum of sines and cosines, with each coefficient found by an integral.
I already know: Techniques of Integration, Orthogonality and Projections.
Teach it Socratically: first ask what I already know; then explain the core idea with one concrete example and why it's true; then give me three problems, one at a time, easy to hard. Wait for my answer, check every step, and point out mistakes without giving the answer away.
Finish by testing me with this: Find the Fourier series of the square wave with $f(x)=-1$ for $-\pi<x<0$ and $f(x)=1$ for $0<x<\pi$, repeated with period $2\pi$. What does the series give at $x=\tfrac\pi2$?
Use LaTeX for formulas. When you say where it's used later (machine learning, quantum mechanics), be specific.

On the way to

Recommended