LECTURE 14: SOLVING THE WAVE EQUATIONS MINGFENG ZHAO July 29, 2015 Solving the heat equation with source and inhomogeneous boundary condition Example 1. Solve the following problem: (1) ut = uxx + u + et x, 0 < x < π, t > 0, BC : u(0, t) = 0, u(π, t) = πt, IC : t > 0, u(x, 0) = 1. Let w(x, t) = tx, then w(0, t) = 0 and w(π, t) = πt. Let v(x, t) = u(x, t) − w(x, t), then 0 = ut − uxx − u − et x = vt + wt − vxx − wxx − v − w − et x = vt + x − vxx − 0 − v − xt − et x = vt − vxx − v + (1 − t − et )x v(0, t) v(π, t) = u(0, t) − w(0, t) = 0−0 = 0 = u(π, t) − w(π, t) = πt − πt v(x, 0) = 0 = u(x, 0) − w(x, 0) = 1−0 1 2 MINGFENG ZHAO = 1. So v satisfies: (2) vt = vxx + v − (1 − t − et )x, BC : v(0, t) = v(π, 0) = 0, IC : 0 < x < π, t > 0, t > 0, v(x, 0) = 1. In order to solve (2): (3) • First, we are looking for the eigenvalues and eigenfunctions of the following homogeneous PDE: vt = vxx + v, 0 < x < π, t > 0, BC : v(0, t) = v(π, 0) = 0, t > 0. Let v(x, t) = X(x)T (t) be a separated solution to (3), then X(x)T 0 (t) = X 00 (x)T (t) + X(x)T (t), that is, X 00 (x)T (t) = X(x)[T 0 (t) − T (t)], which implies that − (4) T 0 (t) − T (t) X 00 (x) =− =: λ. X(x) T (t) Since λx (x, t) = λt (x, t) = 0, then λ is a constant. Since v(0, t) = v(π, t) = 0, then X(x) satisfies X 00 + λX = 0, X(0) = X(π) = 0. So we know the eigenvalues are λ = n2 , and corresponding eigenfunctions are X(x) = C sin(nx), with n ∈ N. • Secondly, let’s find the eigenfunction expansions of (1 − t − et )x and 1 with respect to the eigenfunctions {sin(nx)}∞ n=1 . In fact, let −(1 − t − et )x = ∞ X an (t) sin(nx), and n=1 1= ∞ X n=1 Then for all n ≥ 1, we have an (t) = = bn = = 2 π Z π (1 − t − et )x sin(nx) dx 0 (−1)n 2(1 − t − et ) · n Z 2 π 1 · sin(nx) dx π 0 2 1 − (−1)n · . π n bn sin(nx). LECTURE 14: SOLVING THE WAVE EQUATIONS Now let v(x, t) = ∞ X 3 vn (t) sin(nx) be the solution to (2), then n=1 0 = vt − vxx − v + (1 − t − et )x = ∞ X vn0 (t) sin(nx) + n=1 = ∞ X n2 vn (t) sin(nx) − n=1 ∞ X vn (t) sin(nx) − n=1 ∞ X an (t) sin(nx) n=1 ∞ X 0 vn (t) + (n2 − 1)vn (t) − an (t) sin(nx) n=1 = 0 ∞ X (−1)n sin(nx) vn0 (t) + (n2 − 1)vn (t) − 2(1 − t − et ) · n n=1 = v(x, 0) − 1 = ∞ X vn (0) sin(nx) − n=1 = ∞ X ∞ X bn sin(nx) n=1 [vn (0) − bn ] sin(nx) n=1 ∞ X 2 1 − (−1)n sin(nx). vn (0) − · = π n n=1 So for any n ≥ 1, we have (−1)n = 0, vn0 (t) + (n2 − 1)vn (t) − 2(1 − t − et ) · n n vn (0) = 2 · 1 − (−1) . π n (5) By using integrating factors or variation of parameters, we know that the solution to (5) is: 2 t t − 2t + 2e − 2, vn (t) = if n = 1, n+1 2 2n(−1)n 2(−1)n+1 t 2 1 − (−1)n 2(−1)n 2 2n(−1)n −(n2 −1)t 2(−1) t + + + e + · + − − e , if n ≥ 2. n(n2 − 1) n2 − 1 (n2 − 1)2 n3 π n n3 n2 − 1 (n2 − 1)2 Therefore, the solution to (1) is: u(x, t) = w(x, t) + v(x, t) ∞ X 2(−1)n+1 2 2n(−1)n 2(−1)n+1 t + 2 + e 2 − 1) − 1 (n − 1) n3 n=1 2 1 − (−1)n 2(−1)n 2 2n(−1)n −(n2 −1)t + · + − − e sin(nx). π n n3 n2 − 1 (n2 − 1)2 = πt + (t2 − 2t + 2et − 2) sin(x) + n(n2 t+ n2 4 MINGFENG ZHAO Solving the wave equation The wave equation is: utt = c2 uxx . (6) Theorem 1. Any solution to (6) must be the form of: u(x, t) = F (x + ct) + G(x − ct), for some functions F and G on one variable. Proof. Since utt = c2 uxx , then 0 = utt − c uxx (7) 2 ∂ ∂ ∂2 ∂ ∂ 2 ∂ −c +c = −c u= u. ∂t2 ∂x2 ∂t ∂x ∂t ∂x 2 ∂ ∂ Approach I: Let v = +c u = ut + cux , then to solve (6), it’s equivalent to solve the following system: ∂t ∂x vt − cvx = 0, and ut + cux = v. By using the method of characteristic curves, we know that v(x, t) = v(x + ct, 0) =: f (x + ct) Z t u(x, t) = v(x − ct + cτ, τ ) dτ + u(x − ct, 0) 0 Z t v(x − ct + cτ, τ ) dτ + g(x − ct) =: 0 Z t f (x − ct + cτ + cτ ) dτ + g(x − ct) = 0 Z t f (x − ct + 2cτ ) dτ + g(x − ct) = 0 Z = = x+ct dy + g(x − ct) Let x − ct + 2cτ = y 2c x−ct Z x+ct Z x−ct 1 1 f (y) dy − f (y) dy + g(x − ct) 2c 0 2c 0 f (y) · =: F (x + ct) + G(x − ct), LECTURE 14: SOLVING THE WAVE EQUATIONS where 1 F (x) = 2c Z x 1 and G(x) = − 2c f (y) dy, 0 Z x f (y) dy + g(x). 0 Approach II: We are looking for the characteristic coordinates ξ and η such that 00 ∂ ∂ ∂ = −c , ∂ξ ∂t ∂x and ∂ ∂ ∂ 00 = +c . ∂η ∂t ∂x In fact, let ξ = x − ct, and η = x + ct. By using the chain rule, we have ∂ ∂x = = ∂ ∂t = = ∂ ∂ ∂ ∂ · + · ∂ξ ∂x ∂η ∂x ∂ ∂ + ∂ξ ∂η ∂ ∂ ∂ ∂ · + · ∂ξ ∂t ∂η ∂t ∂ ∂ −c +c . ∂ξ ∂η So we get ∂ 1 ∂ ∂ =− −c , ∂ξ 2c ∂t ∂x and 1 ∂ ∂ ∂ = +c . ∂η 2c ∂t ∂x So we get 2 ∂ ∂ ∂ ∂ ∂2 ∂2 2 ∂ − c − c + c . = = −4c2 2 2 ∂t ∂x ∂t ∂x ∂t ∂x ∂ξ∂η Hence we have −4c2 ∂2u = 0. ∂ξ∂η That is, uξη = 0. Let v = uη , then vξ = uξη = 0, which implies that uη = v = f (η). So we get Z u= η f (τ ) dτ + G(ξ) = F (η) + G(ξ). 0 Therefore, we get u(x, y) = F (x + ct) + G(x − ct). 5 6 MINGFENG ZHAO Example 2. Let a 6= b be constants and φ(x, t) be any function, find the general solution of utt − (a + b)utx + abuxx = φ(x, t). Since utt − (a + b)utx + abuxx = φ(x, t), then 2 ∂ ∂2 ∂ ∂2 ∂ ∂ ∂ − (a + b) (8) + ab 2 u = −a −b u. φ(x, t) = utt − (a + b)utx + abuxx = ∂t2 ∂t∂x ∂x ∂t ∂x ∂t ∂x We are looking for the characteristic coordinates ξ and η such that 00 ∂ ∂ ∂ = −a , ∂ξ ∂t ∂x and ∂ ∂ ∂ 00 = −b . ∂η ∂t ∂x In fact, let ξ = x + bt, and η = x + at. By using the chain rule, we have ∂ ∂x = = ∂ ∂t = = ∂ ∂ ∂ ∂ · + · ∂ξ ∂x ∂η ∂x ∂ ∂ + ∂ξ ∂η ∂ ∂ ∂ ∂ · + · ∂ξ ∂t ∂η ∂t ∂ ∂ +a . b ∂ξ ∂η So we get ∂ 1 ∂ ∂ = −a , ∂ξ b − a ∂t ∂x and 1 ∂ ∂ ∂ = −b . ∂η a − b ∂t ∂x So we get 2 ∂2 ∂2 ∂ ∂ ∂ ∂ ∂2 2 ∂ − (a + b) + ab = − a − b = −(a − b) . ∂t2 ∂t∂x ∂x2 ∂t ∂x ∂t ∂x ∂ξ∂η That is, uξη 1 1 =− φ(x, t) = − φ (a − b)2 (a − b)2 aη − bξ ξ − η , a−b a−b Let v = uη , then vξ = uξη = φ̃(η, ξ), which implies that Z ξ uη = v = φ̃(η, y) dz + f (η). 0 So we get Z u = η v(z, ξ) dz + G(ξ) 0 = φ̃(ξ, η). LECTURE 14: SOLVING THE WAVE EQUATIONS Z η "Z ξ φ̃(z, y) dy + f (z) = η Z ξ Z η f (z) dz + G(ξ) φ̃(z, y) dydz + = 0 0 0 η Z dz + G(ξ) 0 0 Z 7 # Z ξ φ̃(y, z) dydz + F (η) + G(ξ). = 0 0 Z x+bt Therefore, we get 1 u(x, y) = − (a − b)2 x+at Z φ 0 0 az − by y − z , a−b a−b dydz + F (x + at) + G(x + bt). Solving the wave equation on the real line with the initial value problem Consider the wave equation on the real line, then we are going to solve the following initial value problem: utt = c2 uxx , −∞ < x < ∞, t > 0, (9) IC : u(x, 0) = φ(x), u (x, 0) = ψ(x), −∞ < x < ∞. t By Theorem 1, then there exist some functions F and G of one variable such that u(x, t) = F (x + ct) + G(x − ct). Since u(x, 0) = φ(x), then F (x) + G(x) = φ(x). Since ut (x, t) = cF 0 (x + ct) − cG0 (x − ct) and ut (x, 0) = ψ(x), then cF 0 (x) − cG0 (x) = ψ(x). So we have (10) F (x) + G(x) (11) F 0 (x) − G0 (x) = φ(x) = 1 ψ(x). c Take the derivative of (10), we get F 0 (x) + G0 (x) = φ0 (x), by (11), then F 0 (x) = 1 0 1 φ (x) + ψ(x), 2 2c and G0 (x) = 1 0 1 φ (x) − ψ(x). 2 2c So we get 1 1 F (x) = φ(x) + 2 2c Z x ψ(s) ds + C1 , 0 1 1 and G(x) = φ(x) − 2 2c Z x ψ(s) ds + C2 . 0 By (10), then φ(x) = F (x) + G(x) Z x Z x 1 1 1 1 = φ(x) + ψ(s) ds + C1 + φ(x) − ψ(s) ds + C2 2 2c 0 2 2c 0 8 MINGFENG ZHAO = φ(x) + C1 + C2 . So we get C1 + C2 = 0, which implies that u(x, t) = = = = F (x + ct) + G(x − ct) Z x+ct 1 1 ψ(s) ds + C1 + φ(x + ct) + 2 2c 0 Z x+ct φ(x + ct) + φ(x − ct) 1 ψ(s) + 2 2c x−ct Z x+ct φ(x + ct) + φ(x − ct) 1 ψ(s) + 2 2c x−ct 1 1 φ(x − ct) − 2 2c Z x−ct ψ(s) ds + C2 0 ds + C1 + C2 ds, which is called the D’Alembert’s solution to the wave equation on (−∞, ∞). Department of Mathematics, The University of British Columbia, Room 121, 1984 Mathematics Road, Vancouver, B.C. Canada V6T 1Z2 E-mail address: mingfeng@math.ubc.ca