Wolfram Alpha:

```One Dimensional Wave Equation
-----------------------------

This equation applies to both longitudinal and
transverse waves.  In the case of transverse waves
this is easy to see.  In the case of longitudinal
waves, particles in the area where the fluid is
compressed or expanded can be shown to move back
and forth in a sine wave over time.  This is also
apparent when studying the simple harmonic motion
of a spring.  Mathematically we can describe waves
in a way that is independent of the medium by
expressing the physical quantity that is "waving"
as a function of position, Q(x,t), and time.  In a
sound wave, Q could be pressure or density or
longitudinal displacement.  In a light wave, Q can
be any of the components of the electromagnetic
field, or any of the components of the EM potential.

Consider a small segment of rope under tension.

T1cosα = T2cosβ = T

T1sinβ - T2sinα = (ρΔx)∂2y/∂t2

Where the RHS is equivalent to ma (ρ = mass per
unit length).

T1sinβ/T1cosβ - T2sinα/T2cosα = (ρΔx)∂2y/∂t2

tanβ - tanα = (ρΔx)∂2y/∂t2

tanα = ∂y/∂x|x   tanα = ∂y/∂x|x+Δx

(1/Δx){∂y/∂x|x - ∂y/∂x|x+Δx} = ∂y/∂x|x+Δx

∂2y/∂x2 = (ρ/T)∂2y/∂t2

∂2y/∂x2 = (1/v2)∂2y/∂t2  v is phase velocity

Alternative proof:

Consider an array of masses, m, separated by a
distance h and connected by masslesss springs each
with a spring constant, k

u(x) refers to the displacement of the mass at x.
The forces exerted on the mass at x + h are:

From Newton's Law:

F = ma = m∂2u(x + h)/∂t2

From Hooke's Law:

For a displacement to the right  spring B is
compressed and spring A is stretched.  Thus,

FB = k[u(x + 2h) - u(x + h)]

FA = -k[u(x + h) - u(x)]

F = FA + FB

= k[u(x + 2h) - u(x + h)] + (-k[u(x + h) - u(x)])

m∂2u(x + h)/∂t2 = k[u(x + 2h) - u(x + h)]

+ (-k[u(x + h) - u(x)])

∂2u(x + h)/∂t2 = (k/m)k[u(x + 2h) - u(x + h)]

- k[u(x + h) - u(x)])

If the array of weights consists of N weights spaced
evenly over the length, then L = Nh, the total mass,
M = Nm, and the total spring constant of the array,
K = k/N.  Then,

k/m = KN/(M/N) = KN2/M = KL2/h2M

and we can write:

∂2u(x + h)/∂t2 = (KL2/M)[k[u(x + 2h) - u(x + h)]

- k[u(x + h) - u(x)])/h2

As N -> ∞,  h -> 0 the quantity, [k[u(x + 2h) - u(x + h)]
- k[u(x + h) - u(x)]/h2, becomes the second derivative
of u(x) w.r.t. x.  Thus,

∂2u(x)/∂t2 = (KL2/M)∂2u(x)/∂x2

Now, [K] = N/m or Kg/s2 ∴ [(KL2/M)] = [v2]

Therefore, we can write:

∂2u(x)/∂t2 = v2∂2u(x)/∂x2

Solutions
---------

Traveling wave:

y = Asin(2π/λ)(x +/- vt)

= Asin(kx - ωt)
l->r            r->l
Standing wave:  y = Asin(kx - ωt) + Asin(kx + ωt)

= 2Asinkxcosωt

the second term is the reflected wave (180° phase
shift).  For a string of length, L, fixed at both
ends:

nλ/2 = L, k = 2π/λ => k = nπ/L

Therefore,

y = 2Asin(nπx/L)cosωt

∂2y/∂x2 = -(2An2π2/L2)sin(nπx/L)cosωt

(ρ/T)∂2y/∂t2 = -(2Aρ/T)sin(nπx/L)cosωt

=> ω = (nπ/L)√(T/ρ)

= vnπ/L

=> f = nv/2L

```