Skip to content
All apps

Sine Orthogonality

About this app

Two integer-frequency sines, the integral ∫sin(nx)·sin(mx)dx filled live — KaTeX shows 0 (orthogonal) or π (identical n=m), the heart of Fourier coefficients.

The key identity

For integers n, m ≥ 1, ∫₀^2π sin(nx)·sin(mx) dx = 0 if n ≠ m and = π if n = m. The functions sin(nx) are therefore orthogonal on [0, 2π], just like perpendicular vectors whose dot product is zero; the integral plays the role of the dot product. This property is the foundation of Fourier analysis: multiply a function by sin(kx) and integrate over one period, and every other frequency drops out, leaving the coefficient bₖ times π.

What the app shows

Two sliders choose the frequencies n and m from 1 to 15. The app plots the product sin(nx)·sin(mx) on [0, 2π] and fills the area: parts above the x-axis count as positive, parts below as negative. The values panel shows the numerically computed integral and the theoretical value. When both frequencies are equal, a note says the integral equals π. The formula panel shows the identity.

Try it yourself

Start with n = 2 and m = 3 and watch positive and negative pieces balance each other. Then set n = m: the product is sin²(nx), never below the axis, and the integral jumps to π. Try large neighbouring frequencies such as 10 and 11: the product forms a beat pattern, yet the integral is still exactly zero.

Frequently asked questions

Why is the integral of sin(nx)·sin(mx) from 0 to 2π zero?
Using sin a·sin b = ½[cos(a − b) − cos(a + b)], the product becomes a difference of two cosines with integer frequencies n − m and n + m. For n ≠ m each runs through whole periods on [0, 2π], so its integral is zero. For n = m, cos(0) = 1 and ½·2π = π remains.
What does it mean for functions to be orthogonal?
Two functions are orthogonal if the integral of their product over an interval is zero. The integral takes the role of the vector dot product. Sines and cosines with different integer frequencies are orthogonal on [0, 2π] in this sense.
Why is orthogonality needed in Fourier analysis?
It lets you compute each Fourier coefficient on its own. Multiply the function by sin(kx) or cos(kx) and integrate over one period; every other term of the series gives zero. This yields, for example, bₖ = (1/π)·∫₀^2π f(x)·sin(kx) dx.
Which frequencies can I set in the app?
Both n and m can be set from 1 to 15. The app computes the integral live and shows the theoretical value 0 or π next to it.

Subject: Fourier analysis

More from Fourier analysis

A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps