What is the geometric intuition for the basic trigonometric Fourier integrals? What is the geometric intuition for the trigonometric Fourier integrals?
For example, can someone help me understand the geometry of :
$\int_{-\pi}^{\pi}cos^2(x)dx = \pi$ and $\int_{-\pi}^{\pi}sin^2(x)dx = \pi$?
Why should the area under these graphs over any interval of length $2\pi$ to be $\pi$?
Also, I'd like to understand the geometetric intuition of the orthogonality of the set of triginometric functions $\{cos(1x),sin(1x),cos(2x),sin(2x),...\}$  wrt to the inner product $(f,g) = \int_{-\pi}^{\pi}f(x)g(x)dx$
i.e.:
$\int_{-\pi}^{\pi}cos(nx)sin(mx)dx = 0 \text{ for all } m,n$
$\int_{-\pi}^{\pi}cos(nx)cos(mx)dx = 0 \text{ when } m \neq n$
What is the geometric understanding of why the areas under these graphs on any interval of length $2\pi$ is zero?
Thank you!!!
 A: Sine and cosine are fundamentally components of the same thing: a circle. A good way to parametrize the circle is the complex exponential $\exp(i\theta)$, and then they are the real and imaginary parts. Thus, an integral like $\int_{-\pi}^\pi \cos\theta\,\mathrm{d}\theta$ can be interpreted as $\mathrm{Re}\int_{-\pi}^\pi\exp(i\theta)\,\mathrm{d}\theta$. Indeed, if we divide this by $2\pi$, the result is the average $x$-coordinate of a point on the unit circle! This, by symmetry, should be intuitively true: the circle is not biased to the left or the right. Same for $\sin$ as for $\cos$, but with $y$-coordinates.
On way to formalize this intuition of symmetry is that the result should be unaffected by rotations (since multiplying $\int_{-\pi}^\pi\exp(i\theta)\,\mathrm{d}\theta=\oint_{S^1}z\,\mathrm{d}z$ by a phasor, or unit-magnitude complex number, results in an equivalent integral via change-of-variables). But the only point in the plane unaffected by rotations around the origin is the origin itself (i.e. if $z\ne1$ then $zI=I$ implies $I=0$).
The same idea applies to $\exp(in\theta)$ for any integer $n\ne0$: it just goes around the circle multiple times, either clockwise or counter. By symmetry, we expect its integral to be $0$. Thus we expect its components, the integrals of either $\cos(n\theta)$ or $\sin(n\theta)$, to also wind up being $0$. Except, of course, in the even we go around zero times. Then we get $\sin0=0$ or $\cos0=1$.
How do we interpret $f(m\theta)g(n\theta)$ as a "component" of something for $f,g\in\{\cos,\sin\}$? Well, we know from how complex numbers work that if we would get such products in the real / imaginary components of something like $\exp\!\big(i(\alpha\pm\beta)\big)$. If we write these out and then solve for the products, we get the standard product-to-sum identities with $\frac{1}{2}[f((m+n)\theta\big)\pm g\big((m-n)\theta)]$ for $f,g\in\{\cos,\sin\}$. As I pointed out, the resulting integral of either $f$ or $g$ must be zero, except in the case of $\cos0$ in which case it is the constant that appears in front of $\cos0$ (times the length of the interval of integration).
A: For the second part of your question: clearly it's not surprising that $\sin(nx)$ and $\cos(nx)$ are orthogonal under the $L^2$ inner product on functions on $[0,2\pi]$, by symmetry of these functions.
It's less obvious why $\sin(nx)$ and $\sin(mx)$ are orthogonal for $n \neq m$. Perhaps it's not geometric in the way you're hoping for, but here's how I see it: $\sin(nx)$ and $\sin(mx)$ are both eigenfunctions of the self-adjoint operator $\frac{d^2}{dx^2}$ with different eigenvalues, and so must be orthogonal. In other words, the surface $$\left\langle f, \frac{d^2}{dx^2}f\right\rangle = 1$$
is an "ellipsoid" in the infinite-dimensional metric space of square-integrable functions on $[0,2\pi]$, and  $\sin(nx)$ and $\sin(mx)$ are two of its orthogonal "principal axes."
