Wave Equation Solver

The 1D wave equation, d'Alembert's general solution and standing-wave modes, step by step
Verify that u(x,t) = sin(x - 3t) solves u_tt = 9 u_xx
Solve u_tt = 4 u_xx with u(x,0) = exp(-x^2) and u_t(x,0) = 0
Find the fundamental frequency of a 0.65 m string with T = 90 N and mu = 0.0040 kg/m
Separate variables in u_tt = c^2 u_xx on 0 < x < L with fixed ends

The Wave Equation and What Its Symbols Mean

The one-dimensional wave equation is the partial differential equation obeyed by any small disturbance travelling along a string, a pipe or a transmission line:

2ut2=c22ux2\frac{\partial^2 u}{\partial t^2} = c^2\,\frac{\partial^2 u}{\partial x^2}

Symbols and SI units:

  • u(x,t)u(x,t) — displacement of the medium, metres (m)
  • xx — position along the medium, metres (m)
  • tt — time, seconds (s)
  • cc — propagation speed, metres per second (m/s); for a string c=T/μc = \sqrt{T/\mu} with tension TT in N and linear density μ\mu in kg/m

In words: the vertical acceleration of each point is proportional to the local curvature. A sharply curved piece of string is pulled back hard; a straight piece is not pulled at all.

When it applies: small-amplitude disturbances in a uniform, lossless, non-dispersive medium.

The assumption people forget: it is a linear equation derived for small slopes. Large-amplitude waves, damping and dispersion each add terms and break the clean solutions below.

General Solution and Standing Waves

D'Alembert's general solution on an infinite line is any right-moving shape plus any left-moving shape:

u(x,t)=F(xct)+G(x+ct)u(x,t) = F(x - ct) + G(x + ct)

With initial displacement u(x,0)=φ(x)u(x,0) = \varphi(x) and initial velocity ut(x,0)=ψ(x)u_t(x,0) = \psi(x), this becomes

u(x,t)=12[φ(xct)+φ(x+ct)]+12cxctx+ctψ(s)dsu(x,t) = \tfrac{1}{2}\left[\varphi(x-ct) + \varphi(x+ct)\right] + \frac{1}{2c}\int_{x-ct}^{x+ct}\psi(s)\,ds

Separation of variables handles a finite string of length LL fixed at both ends. Writing u=X(x)T(t)u = X(x)T(t) gives the modes

u(x,t)=n=1sin ⁣(nπxL)[AncosnπctL+BnsinnπctL]u(x,t) = \sum_{n=1}^{\infty}\sin\!\left(\frac{n\pi x}{L}\right)\left[A_n\cos\frac{n\pi ct}{L} + B_n\sin\frac{n\pi ct}{L}\right]

whose frequencies are fn=nc/(2L)f_n = nc/(2L) in hertz — the harmonic series of a musical string.

The assumption people forget: d'Alembert applies to an unbounded domain. Boundaries reflect waves, and the series form is the one to use.

Common Mistakes to Avoid

  • Confusing this PDE with v=fλv = f\lambda — that algebraic relation describes one sinusoidal wave; the PDE governs every possible waveform.
  • Losing the c2c^2 — the constant multiplies the space derivative, and squaring it is what makes the units balance.
  • Writing F(x+ct)F(x + ct) for the right-moving wave — the minus sign travels right, the plus sign travels left.
  • Forgetting the factor 12\tfrac{1}{2} in d'Alembert — the initial shape splits into two half-height pulses.
  • Dropping the chain-rule factor — differentiating F(xct)F(x-ct) twice in tt brings out c2c^2, and omitting it makes the verification fail.
  • Solving a bounded problem with d'Alembert — use the sine series once the ends are fixed.

示例题目

Step 1: ut=3cos(x3t)u_t = -3\cos(x-3t), so utt=9sin(x3t)u_{tt} = -9\sin(x-3t) (each tt-derivative brings out a factor 3-3)
Step 2: ux=cos(x3t)u_x = \cos(x-3t), so uxx=sin(x3t)u_{xx} = -\sin(x-3t)
Step 3: 9uxx=9sin(x3t)=utt9\,u_{xx} = -9\sin(x-3t) = u_{tt}, so the equation is satisfied
Step 4: Comparing with utt=c2uxxu_{tt} = c^2u_{xx} gives c2=9 m2/s2c^2 = 9\ \text{m}^2/\text{s}^2, i.e. c=3 m/sc = 3\ \text{m/s}, moving in the +x+x direction
Answer: It is a solution, travelling right at c=3c = 3 m/s

Step 1: Here c2=4 m2/s2c^2 = 4\ \text{m}^2/\text{s}^2, so c=2 m/sc = 2\ \text{m/s}; the initial velocity is zero, so the integral term vanishes
Step 2: D'Alembert gives u(x,t)=12[e(x2t)2+e(x+2t)2]u(x,t) = \tfrac{1}{2}\left[e^{-(x-2t)^2} + e^{-(x+2t)^2}\right] — the bump splits into two half-height copies
Step 3: At x=0x = 0 m and t=1t = 1 s: x2t=2 mx \mp 2t = \mp 2\ \text{m}
Step 4: u=12[e4+e4]=e4=0.0183 mu = \tfrac{1}{2}\left[e^{-4} + e^{-4}\right] = e^{-4} = 0.0183\ \text{m}
Answer: u(x,t)=12[e(x2t)2+e(x+2t)2]u(x,t) = \tfrac{1}{2}\left[e^{-(x-2t)^2} + e^{-(x+2t)^2}\right], giving u(0,1)0.0183u(0,1) \approx 0.0183 m

Step 1: c=T/μ=(90 N)÷(4.0×103 kg/m)c = \sqrt{T/\mu} = \sqrt{(90\ \text{N}) \div (4.0 \times 10^{-3}\ \text{kg/m})}
Step 2: c=22500 m2/s2=150 m/sc = \sqrt{22\,500\ \text{m}^2/\text{s}^2} = 150\ \text{m/s}
Step 3: The fixed-end modes are fn=nc/(2L)f_n = nc/(2L); the fundamental is n=1n = 1
Step 4: f1=(150 m/s)÷(2×0.65 m)=115 Hzf_1 = (150\ \text{m/s}) \div (2 \times 0.65\ \text{m}) = 115\ \text{Hz}
Answer: f1115f_1 \approx 115 Hz (harmonics at 231231 Hz, 346346 Hz, …)

常见问题

It is the partial differential equation ∂²u/∂t² = c²∂²u/∂x², where u(x,t) is the displacement in metres and c is the propagation speed in m/s. It says each point's acceleration is proportional to the curvature of the medium there.

On an infinite line it is d'Alembert's form u(x,t) = F(x − ct) + G(x + ct): any right-moving shape plus any left-moving shape. The two arbitrary functions are pinned down by the initial displacement and initial velocity.

Separate variables as u = X(x)T(t). Fixed ends force X = sin(nπx/L), giving a sum of standing modes with frequencies f_n = nc/(2L). The coefficients come from the Fourier sine series of the initial conditions.

It is the speed at which disturbances propagate, in m/s, and it is fixed by the medium. For a stretched string c = √(T/μ) with tension in newtons and linear density in kg/m; for light in vacuum it is 2.998 × 10⁸ m/s.

相关求解器

免费试用 AI-Math

任何数学问题都能获得分步解答。拍照上传或输入问题即可。

开始解题