Wolfram Alpha:

```Classical Field Theory
----------------------

Massless Wave Equation
----------------------

A field in physics may be envisioned as if space
were filled with interconnected vibrating masses
and springs, and the strength of the field is like
the displacement of a ball from its rest position.
The theory requires "vibrations" in, or more
accurately changes in the strength of, such a field
to propagate as per the appropriate wave equation
for the particular field in question.

Consider an array of masses, m, separated by distance
ε and connected by massless springs each with
spring contant, k.

φ            ^
|            |      o       ki
|    ^       o           o/\/\/o
|    |       |                     o
|    o       v   o
|o   |   o                            o
|    v
|________________________________________ x
<-ε->

Let ε be a small interval.

Let mi = εm and ki = K/ε.  Thus, as ε -> 0 mi -> 0
and ki -> ∞.

Consider oscillations in the vertical direction.
.
KE, T = Σi(1/2)εmφi2

PE, U = (K/2ε)Σi(φi+1 - φi)2

Here it is assumed that the only contribution is
from neighbouring particles.  Note that spring
force is inversely proportional to distance.

Lagrangian, L = T - V
.
=  Σi(1/2)εmφi2 - (K/2ε)Σi(φi+1 - φi)2
.      .
∂L/∂φi = εmφ

The PE term requires a little more calculation:

U = (K/2ε)[(φi+1 - φi)2 + (φi-1 - φi)2]

-∂U/∂φi = -(K/ε)[(φi - φi+1) + (φi - φi-1)]

= (K/ε)[-φi + φi+1 - φi + φi-1]

= (K/ε)[(φi+1 - φi) - (φi - φi-1)]

Apply the E-L equations to get the equations
of motion:
.
d/dt(∂L/∂φi) - ∂L/∂φi = 0
..
εmφi = (K/ε)[(φi+1 - φi) - (φi - φi-1)]
..
φi = (K/mε2)[(φi+1 - φi) - (φi - φi-1)]

In the limit ε -> 0, φi -> φ(x) and the RHS is
nothing more than the double derivative.  Thus,
..
φ = (K/m)∂2φ/∂x2

Write v2 = K/m where v is the velocity along the
spring then,

∂2φ/∂t2 - v2∂2φ/∂x2 = 0

This is the MASSLESS WAVE EQUATION.

Note the similarity between the wave equation
form and the invariant interval.

Lagrangians for Classical Fields
--------------------------------

A physical field can be thought of as the assignment
of a physical quantity at each point of space and time.
A field theory tends to be expressed mathematically
by using Lagrangians.

The Lagrangian for classical systems is a function of
generalized coordinates q and dq/dt.  In this view,
time is an independent variable and q and dq/dt are
dependent variables in phase space.  The action for
such a system is written as:

A = ∫dt L(q,dq/dt)

This formalism was generalized to handle field theory.
In field theory, the dependent variables q and dq/dt
are replaced by the value of a field at that point in
spacetime. Thus, q -> φ and dq/dt -> dφ/dt.

The action in this case is written as:

Aφ = ∫dtd3x ℒ(φ,∂μφ) where ∂μ = ∂/∂xμ.

Where ℒ is the LAGRANGIAN DENSITY.  Consequently,

L = ∫dx3 ℒ

Euler-Lagrange Equations for a Field
------------------------------------

Consider:

φ(x,t) = φ(x,t) + δφ(x,t)

Where,

δφ(x,t) = εf(x,t) and δφμ = ε∂f(x,t)/∂xμ

Note:  We have introduced the notation φμ ≡ ∂μφ

δA = ε∫d4x[(∂ℒ/∂φ)f(x,t) + (∂ℒ/∂φμ)(∂f(x,t)/∂xμ)] = 0

Integrate by parts to get:

δA = ε∫dtd3x[∂ℒ/∂φ - ∂/∂xμ(∂ℒ/∂φμ)]f(x,t) = 0

Therefore, for this to be true for a non-zero
f(x,t), we must have:

∂/∂xμ(∂ℒ/∂φμ) - ∂ℒ/∂φ = 0

This is the EULER-LAGRANGE equation for a field.

In 1 dimension this is:

∂/∂t(∂ℒ/(∂φ/∂t) - ∂/∂x(∂ℒ/(∂φ/∂x) ) - ∂ℒ/∂φ = 0

In general this is written as:

∂μ(∂ℒ/∂(∂μφ)) - ∂ℒ/∂φ = 0

The momenta canonically conjugate to the coordinates
of the field (or simply the canonical momentum) is
defined as:
.
π = ∂ℒ/∂φ

Recall that the Lagrangian for the massless wave
equation is:
.
L =  Σi(1/2)εmφi2 - (K/2ε)Σi(φi+1 - φi)2
.
= ∫(1/2)φ2dx - (K/2)Σiε(φi+1 - φi)(φi+1 - φi)/ε2
.
= ∫(1/2)φ2dx - (K/2)Σiε(∂φ/∂x)2
.
= ∫(1/2)φ2dx - (K/2)∫(∂φ/∂x)2]dx
.
= ∫[(1/2)φ2dx - (K/2)(∂φ/∂x)2]dx

= ∫ℒdx

Where,
.
ℒ = (1/2)φ2 - (K/2)(∂φ/∂x)2

ℒ is a scalar and is, therefore, Lorentz invariant.

Now ℒ may also contain additional terms to the
potential energy.  For example, the system may be in
a gravitational field.  This term can be defined as
follows:

V(φ)  = (μ2/2)φ2

Therefore, ℒ becomes:
.
ℒ = (1/2)[φ2 - v2(∂φ/∂x)2 - μ2φ2]

Or, in shorthand form:

ℒ = (1/2)[-∂μφ∂μφ - μ2φ2]

Where,

∂μ = (∂t,∂x,∂y,∂z)

and,

∂μ = (-∂t,∂x,∂y,∂z)

Apply E-L equations to get:

∂{∂((1/2)(∂φ/∂t)2}/∂t = ∂2φ/∂t2

∂{∂((1/2)(∂φ/∂x)2}/∂x = ∂2φ/∂x2

∂ℒ/∂φ = μ2φ

Therefore,

∂2φ/∂t2 - v2∂2φ/∂x2 + μ2φ = 0
\        \
Field KE  Field PE

Without the μ term this becomes:

∂2φ/∂t2 - v2∂2φ/∂x2 = 0

So, not surprisingly, solutions to the E-L equation
for a simple field is the massless wave equation.

Solutions of this equation are of the form:

φ = f(x + vt) + g(x - vt) waves with right and left
moving parts.  Note that wave shapes are preserved
as they pass through each other.  If the m term is
added then the waves scatter each other.

To appreciate the content of this equation, consider
the connection with quantum mechanics:

p = -ih∂/∂x ∴ ∂2φ/∂x2 = p2/h2

E = (ih)∂/∂t ∴ ∂2φ/∂t2 = -E2/h2

We can write:

(E2 - c2p2 - m2c4)φ = 0

with m2c4/h2 = μ2

This is the Klein-Gordon equation.```