— Why trigonometric functions form an “orthogonal basis,” and why differential equations can be solved by division (for first-year undergraduates)
The Fourier series is one of the tools that physicists use most often.
First-principles calculations expand wave functions in plane waves (that is, trigonometric functions),
and the heat conduction equation and the wave equation can be solved by writing the solution as a superposition of waves.
In lectures, though, only the formula “the coefficient is this” tends to appear out of nowhere,
and why that formula extracts the coefficients is often left behind.
This document starts from the inner product of vectors.
If you understand the you learned in high school,
you will not stumble anywhere along the way, all the way to Thomas–Fermi screening at the end.
Outline of this document① The components of a vector come out when you take the inner product with the basis vectors.
The other components vanish on their own, “because they are orthogonal.” ② For functions, too, we define an inner product . ③ It then turns out that trigonometric functions with different wavenumbers are orthogonal to one another.
So the coefficients can be extracted by the same trick. ④ Differentiation becomes just multiplication by .
So differential equations can be solved by division. ⑤ A worked example is Thomas–Fermi screening.
1. First, How to Extract the Components of a Vector
Consider the unit vectors in three dimensions. They have the following property:
(1)
This property is called being orthonormal.
“Normal” means that the length is 1, and “orthogonal” means that they are at 90° to one another.
Now, when we write a certain vector as
,
suppose that we want to extract only the first component . What would you do?
You just take the inner product with .
(2)
This is the starting point of everythingThanks to orthogonality, only the component you want survives, and all the others become 0 and vanish.
The whole point of “expanding in a basis” rests on this single fact.
What the Fourier series does is exactly this, not a hair’s breadth different.
The only difference is that “vectors” become “functions” and “inner products” become “integrals.”
Below, we will check this one step at a time.
2. Defining the “Inner Product” of Functions
The inner product of vectors was “multiply the components pairwise and add them all up.”
(3)
What about functions? Divide the interval into N equal parts and line up the values at each point.
— this is
itself an N-dimensional vector.
So the inner product is .
Now we let N → ∞, but if we keep adding like this, the number of terms grows without bound.
So we first multiply by the step width and then take the limit.
This is the Riemann-sum method, and turns into an integral, giving
(4)
This is the inner product of functions (lecture notes (6)).
The length (norm) is defined in exactly the same way as for vectors.
(5)
Functions are vectors
This is the first hurdle, but what it says is simple.
Think of a function as “a vector whose components are the values at each point, infinitely many of them.”
Once you think of it this way, the inner product, the length, and the angle can all be carried over as they are.
The remark in the lecture notes, “The inner product and the norm are similar to those of vectors!”, says exactly this.
By the way, the Schwarz inequality is also just the vector inequality carried over unchanged.
3. Actually Computing the Inner Products of Trigonometric Functions
We take the interval to be .
Let us follow the calculations of lecture notes (1)–(5) one by one.
The only tools we use are the product-to-sum formulas and the half-angle formulas.
(a) The integral of a single wave
(6)
We only used .
Similarly, (when ).
A wave swings equally far up and down, so adding up one full period gives 0 — that is all there is to it.
(b) The product of sin and cos
Using the product-to-sum formula ,
both terms on the right-hand side are of the form in (a), so
(7)
A faster way to see it
is an odd function, and is an even function.
Odd × even = odd, so integrating over an interval symmetric about the origin always gives 0.
This is the “alternative proof” in the lecture notes. You can see it without any calculation.
(c) Products of cos with cos, and of sin with sin
Only here does the story depend on whether .
First, the case . Converting the product into a sum gives
.
Since are both nonzero integers, both terms are 0 by (a).
But when ,
, and therefore
— the result is not 0.
Written with the half-angle formula,
(8)
For as well, it is exactly the same, using . To summarize:
(9)
Compare this with in (1)The form is exactly the same.
The only difference is that the value when the inner product is nonzero is π rather than 1.
In other words, the trigonometric functions turned out to be “an orthogonal basis of length .”
Note that for we have , and
.
This one function alone has length , unlike the others.
This is the reason why only gets the factor 1/2π later.
(Since there is nothing left in , it is not counted as a basis function.)
4. So Trigonometric Functions Form an Orthogonal Basis
Let us look at the example in lecture notes (8) just as it is.
(10)
By (9), these three functions are mutually orthogonal.
⟨·, sin x⟩
⟨·, sin 3x⟩
⟨·, sin 5x⟩
sin x
π
0
0
sin 3x
0
π
0
sin 5x
0
0
π
So if we regard these three functions as axes, then
,
.
This has exactly the same structure as the three-dimensional vector .
This is what Fig. 1.1 of the lecture notes depicted.
If the wavenumbers differ, the functions are orthogonalTrigonometric functions with different wavenumbers point at 90° to one another.
So they do not mix when added together, and you can pull them out one at a time afterward.
The only difference is that there are infinitely many axes —
, , , … and so on without end.
They span an infinite-dimensional orthogonal coordinate system.
5. Extracting the Coefficients — The Same Trick as in (2)
From here on, it is a straight road. Suppose a function of period 2π can be written as
(11)
Suppose this holds. We want to extract only .
Just as in (2), we take the inner product with .
That is, we multiply both sides by and integrate from −π to π.
(12)
The second term is always 0 by (7) (here we take ; differs only in the length of its basis function, so it is written separately just below). The first term, too, is 0 by (9) for every term except the single one with .
Only the component we want has survived. Therefore
(13)
Why is only given a factor 1/2π?
The basis function for is , a “flat function.”
The square of its length is , which is 2π rather than the π of the other basis functions.
The divisor is the square of the length, so only gets the factor 1/2π.
It is not a special rule; it is simply that this one function has a different length.
Incidentally, is precisely the average height of .
Some textbooks write , but the content is the same.
Fig. 1: Where the coefficients get “extracted.”
The upper panel shows f(x) and cos mx (or sin mx), and the lower panel shows their product.
The area of the product (the green minus the red) is exactly π am (π bm if you choose sin, and 2π a0 when m = 0).
Try changing m. For most values of m, the green and red cancel to give 0,
and a value remains only for the m that actually has something in it — this is exactly the calculation in (12).
6. ak and bk Are Weights for Each “Number of Waves”
is a wave that oscillates exactly k times over .
In terms of wavelength, .
k
Number of waves in 2π
Wavelength λ
Structure it is responsible for
0
0 (flat)
—
Average height of f
1
1 wave
2π
The roughest overall shape
2
2 waves
π
Left–right asymmetry, etc.
10
10 waves
π/5
Fine undulations
100
100 waves
π/50
Very fine structure such as corners and jumps
So the “spectrum” tells you the character of a functionA function whose coefficients remain large even for large k has fine structure.
Conversely, for a smooth function the coefficients become small quickly as k increases.
In fact, how fast the coefficients fall off is determined by smoothness.
With a jump, ;
with a corner (the first derivative jumps), ;
and for a function that can be differentiated any number of times, they fall off faster than any power (exponentially, for an analytic function).
On tab ① of the simulator, compare the spectra of the square wave (jump) and the triangle wave (corner).
Next to a jump, the error never goes away — the Gibbs phenomenon
However, the coefficients getting smaller is one thing, and the sum of the waves fitting the function cleanly is another.
For a function with a jump, such as the square wave or the sawtooth wave,
no matter how much you increase N, an overshoot remains right next to the jump.
The width of the overshoot narrows as N grows, yet
its height stays at about 8.95 % of the jump and does not decrease. This is the Gibbs phenomenon.
The partial sums approach at every point except the jump itself (pointwise convergence).
The overshoot nonetheless does not disappear because the way the sums approach it is not uniform from place to place
— that is, because the convergence is not uniform.
On tab ① of the simulator, choose the square wave and, raising N from 10 to 30 to 60,
watch only the region right at the jump. The peak becomes narrower, but its height does not shrink.
The “cutoff energy” in first-principles calculations
In plane-wave basis calculations, the wave function is expressed as a superposition of ,
and the wavenumbers that satisfy are used.
Raising the cutoff means using finer waves.
The wave function changes sharply right next to an atomic nucleus, so fine waves are needed to represent it.
The reason a pseudopotential is a tool that “smooths out the region near the nucleus” is
to make the coefficients fall off faster and reduce the number of waves needed.
Splitting does not lose the “length” — Parseval’s identity
Since we have only split things into orthogonal axes, the length defined in (5) can also be counted on the coefficient side.
— this is Parseval’s identity. In three dimensions, we had
and this is exactly the same thing.
The difference between and is exactly the difference in basis-function length that we saw in (9).
The square of a coefficient can be read as that mode’s “share.”
Tab ① of the simulator shows “Parseval sum” and “‖f‖² (true value)” side by side,
so you can follow, in numbers, the former approaching the latter as you increase N.
7. To Period 2L, and to the Complex Form
When the period is 2L rather than 2π, you only need to substitute (lecture notes (12)).
(14)
Next, using Euler’s formula , we combine cos and sin.
For , set and . For , set . With this choice,
(15)
Why go to complex numbers?
The two separate pieces, cos and sin, are combined into one.
In exchange, k now runs over negative values as well, but the formulas become much easier to read.
And as we will see in the next section, the greatest advantage is that differentiation takes a clean form.
For a real function, , so no information is lost.
8. The Fourier Transform — Making the Period Infinitely Large
Let us take L → ∞ in (15).
The wavenumber used to take the discrete values , but its spacing
approaches 0, so
k becomes a continuous variable, and the sum becomes an integral. Writing only the result,
(16)
The upper one is the Fourier transform, and the lower one is the inverse Fourier transform.
What we are doing is exactly the same as in (13) —
we take the inner product with to
extract the component of wavenumber k, nothing more.
Now for the main point: differentiation becomes multiplication
What happens when we differentiate with respect to x?
(17)
The form does not change; it is merely multiplied by a single number.
So in the world after the Fourier transform,
(18)
The most familiar examples — the heat conduction equation and the wave equation
If we first split the initial shape into waves as ,
then by (17), turns, for each mode, into
, an ordinary number.
Hence the heat conduction equation separates, one wave at a time, into
a plain ordinary differential equation, and it is easily solved to give
.
Because appears in the exponent, the larger k is (the finer the wave), the faster the wave dies out.
This is the reason why the bumps are smoothed out first, while only the rough overall shape decays slowly.
The procedure is the same for the wave equation , and we get
— the equation of simple harmonic motion. If we take the initial velocity to be 0,
,
and this one does not die out but keeps going back and forth forever.
A partial differential equation splits into “separate ordinary differential equations, one for each wave” —
this is what you are looking at on tab ③ of the simulator.
This is the greatest benefit of the Fourier transformA differential equation becomes a plain algebraic equation.
Differentiation turns into “a number you can divide by,” so
the task of “solving” becomes the task of “dividing.”
The procedure always has three steps.
① Fourier-transform, ② divide, ③ inverse-transform back to real space.
In the next section, we will carry these three steps through to the end, once.
9. Thomas–Fermi Screening — The Three Steps Through to the End
(a) What are we considering?
Inside a metal, conduction electrons are packed like a sea.
What happens if we drop a single point charge q into it?
In vacuum, the answer is the Coulomb potential . This is the solution of the Poisson equation
(19)
(in Gaussian units). Inside a metal, however,
the surrounding electrons gather and try to cancel this charge.
This is called screening.
(b) How many electrons gather?
If , the potential energy of an electron near it
is lowered by (the electron’s charge is −e).
That makes the spot “a good deal” energetically, so electrons gather there.
How many gather? In a metal, the Fermi level must be at the same height everywhere
(otherwise electrons would flow).
The bottom of the band has dropped by while the Fermi level does not move,
so that many more electrons are packed in. The number of added electrons is
“the number of seats available per 1 eV” × “the amount of the drop,” that is,
(20)
Here is the density of states (the number of states per unit volume per unit energy).
Since each electron has charge −e, the added charge (the induced charge) is
(21)
Let us check the sign in plain words
Place a positive charge () → electrons gather →
that region becomes negatively charged ().
This is why there is a minus sign on the right-hand side of (21).
The response is in the direction that cancels the charge you placed — this is the substance of screening.
(c) Setting up the equation
The right-hand side of the Poisson equation must include all of the charge.
That means both the point charge we placed and the electrons that have gathered.
(22)
Here
we have set .
The lower equation in (22) is the equation to be solved.
Only one term, , has been added to the Poisson equation —
but because appears on both sides, it cannot be solved as in the vacuum case.
(d) ① Take the Fourier transform
Now it is the Fourier transform’s turn. From (18), .
Also, the Fourier transform of the delta function is
— just 1.
So (22) becomes
(23)
There are no derivatives anywhere. It is just a linear equation.
(e) ② Divide
(24)
That is all there is to itThe task of solving a partial differential equation ended with a single division.
Setting (no screening) gives , which is the Fourier transform of the Coulomb potential .
serves to stop the divergence at k → 0.
“Not reaching far away” in real space corresponds to “not diverging at small k” in k-space.
(f) ③ Take the inverse transform and return to real space
does not depend on the direction of (it is a function of only), so the angular integral can be done first.
Using ,
(25)
Now, using the integral formula ,
(26)
For those who find the integral formula unsettling — let us verify by substituting the answer
That (26) really satisfies (22) can be verified without knowing the formula.
With spherical symmetry we have , so for ,
.
That is, holds for .
And as , → 1, so ,
that is, the behavior at the origin is the same as that of the bare Coulomb potential.
From , the delta function on the right-hand side comes out exactly as well. This completes the proof.
10. Reading the Answer — How Long Is the Screening Length?
(26) is of the form called a Yukawa-type potential.
is the screening length ,
and beyond this distance the potential decays exponentially.
For a free-electron gas, , so
substituting and gives
(27)
Here is the radius per electron, measured in units of the Bohr radius.
The smaller it is, the denser the electrons. To summarize,
.
Metal
rs
kTF [1/aB]
Screening length λ [aB]
The same in Å
Al (aluminum)
2.07
1.086
0.920
0.487
Mg (magnesium)
2.66
0.958
1.043
0.552
Cu (copper)
2.67
0.957
1.045
0.553
Na (sodium)
3.93
0.789
1.268
0.671
K (potassium)
4.86
0.709
1.410
0.746
0.5 Å — move away by as little as one atom, and the charge can no longer be seen
The interatomic distance in a metal is 2–3 Å, so a screening length of 0.5 Å means
that it does not even reach the neighboring atom.
That is why ions inside a metal do not exert long-range Coulomb forces on one another
(all ions are positively charged, so the bare Coulomb force would be repulsive).
The pictures “electrons in a metal can move around freely” and “ions behave like hard spheres”
can be used thanks to this screening.
Note, however, that screening removes only the long-range part; an interaction mediated by the electrons remains at short range.
This is also why the cohesive energy and elasticity of metals have a character quite different from those of ionic crystals.
To be honest — Thomas–Fermi is an approximation
In (21) we assumed that “the electron response is proportional to φ.”
This tacitly assumes that φ varies slowly (a linear-response, long-wavelength approximation).
If one does this more carefully (the Lindhard function),
a subtle kink appears at , and in real space a slowly decaying oscillation remains.
This is the Friedel oscillation, which can actually be seen with an STM.
Even so, the conclusion that “the screening length is less than 1 Å, much shorter than the interatomic distance of 2–3 Å” does not change.
11. Another Application — Force Constants and Phonons
When we compute phonons (lattice vibrations) from first principles, too,
a round trip between the Fourier transform and the inverse Fourier transform is used.
This is exactly the calculation that the Mochizuki Research Group runs routinely.
How strongly the other atoms feel a force when one atom in a crystal is moved slightly is expressed by the
force constants (in practice, the Hessian matrix).
Explicitly, .
The Fourier transform of these is the dynamical matrix, and
Why “go and come back”? — Fourier interpolation
In first-principles calculations, the on a coarse mesh (for example, 4×4×4) are the only points at which
can be computed, because the computational cost is too large.
So ① first take the inverse Fourier transform to get in real space.
Force constants are smaller for more distant atoms, so the region where is large can be ignored.
In other words, a finite number of is enough.
② Now Fourier-transform that at any you like, and you can construct even for a q that is not on the mesh.
The reason the phonon dispersion curves can be drawn as smooth lines is this round trip.
This is called Fourier interpolation.
The same idea appears in many places
• Plane-wave basis: the kinetic energy becomes just the number , so the matrix is diagonal.
• Ewald sum: the long-range Coulomb sum is split into a real-space part and a k-space part so that both converge quickly.
• Solving the Poisson equation: — this division is carried out at every step.
• The convolution theorem: a convolution in real space becomes a plain multiplication in k-space.
12. Summary
The components of a vector can be extracted by the inner product with the basis vectors, because the others are orthogonal and vanish.
If we define an inner product for functions as well, functions become vectors.
Trigonometric functions have inner product 0 when their wavenumbers differ — they form an orthogonal basis.
For identical functions it is π (except that only gives 2π).
Hence can be extracted just by multiplying by and integrating. .
and are the weights of “the waves that fit k times into 2π.” The smoother the function, the faster the coefficients with large k become small.
Making the period infinitely large gives the Fourier transform, where differentiation is just multiplication by .
Therefore differential equations can be solved by division: the three steps ① transform, ② divide, ③ inverse-transform.
A worked example is Thomas–Fermi screening. Inverse-transforming gives . For aluminum, the screening length is 0.49 Å.
Fourier interpolation in phonon calculations, the plane-wave basis, and the Ewald sum all have the same root.