LECTURE 21: THE FINITE DIFFERENCE METHODS III AND THE STURM-LIOUVILLE EIGENVALUE PROBLEMS MINGFENG ZHAO August 11, 2015 Finite difference approximation for the wave equation Consider the wave equation with initial-boundary value conditions: utt = 4uxx + x2 , 0 ≤ x ≤ 1, t ≥ 0, BC : u(0, t) = 2t, ux (1, t) = 3t, t > 0, IC : u(x, 0) = x2 + 1, ut (x, 0) = x3 , 0 ≤ x ≤ 1. Use the central difference in t and the central difference in x, then u(x, t + ∆t) + u(x, t − ∆t) − 2u(x, t) (∆t)2 = utt (x, t) + O((∆t)2 ) u(x + ∆x, t) + u(x − ∆x, t) − 2u(x, t) (∆x)2 = uxx (x, t) + ((∆x)2 ). Then we get u(x, t + ∆t) + u(x, t + ∆t) − 2u(x, t) u(x + ∆x, t) + u(x − ∆x, t) − 2u(x, t) =4· + x2 . (∆t)2 (∆x)2 That is, u(x, t + ∆t) = 2u(x, t) − u(x, t − ∆t) + 4(∆t)2 · [u(x + ∆x, t) + u(x − ∆x, t) − 2u(x, t)] + x2 (∆t)2 + O((∆t)2 , (∆x)2 ). (∆x)2 For any T > 0 and integers M, N ≥ 1, let ∆t = (1) uk+1 = 2ukn − uk−1 + n n T L , ∆x = , tk = k∆t, xn = n∆x and ukn = u(xn , tk ), then M N 4(∆t)2 k [u − 2ukn + ukn−1 ] + x2n (∆t)2 . (∆x)2 n+1 For the initial value condition, we have (2) u0n = x2n + 1. 1 2 MINGFENG ZHAO Use the central finite approximation for ut (x, 0), we have u(x, ∆t) − u(x, −∆t) = ut (x, 0) + O((∆t)2 ). 2∆t That is, we have u(x, ∆t) − u(x, −∆t) = x3 + O((∆t)2 ). 2∆t That is, u(x, −∆t) = u(x, ∆t) − 2x3 ∆t + O((∆t)2 ). So we have 1 3 u−1 n = un − 2xn ∆t. (3) For the boundary value condition, we have uk0 = 2tk . (4) Use the central finite approximation for ux (1, t), we have u(1 + ∆x, t) − u(1 − ∆x, t) = ux (1, t) + O((∆x)2 ). 2∆x That is, u(1 + ∆x, t) − u(1 − ∆x, t) = 3t + O((∆x)2 ). 2∆x Then we get u(1 + ∆x, t) = u(1 − ∆x, t) + 6t∆x + O((∆x)2 ). So we have ukN +1 = ukN −1 + 6tk ∆x. (5) So the finite difference approximation for the problem is the following: • By (2), we get u0n for 0 ≤ n ≤ N . By (5), we get u0N +1 . So we have u0n for 0 ≤ n ≤ N + 1. • By (1) and (3), we get u1n = 2u0n − (u1n − 2x3n ∆t) + 4(∆t)2 0 [u − 2u0n + u0n−1 ] + x2n (∆t)2 . (∆x)2 n+1 So u1n = u0n + x3n ∆t + 2(∆t)2 0 [u − 2u0n + u0n−1 ] + x2n (∆t)2 . (∆x)2 n+1 Hence we can get u1n for 0 ≤ n ≤ N . By (5), we get u1N +1 . So we have u1n for 0 ≤ n ≤ N + 1. LECTURE 21: THE FINITE DIFFERENCE METHODS III AND THE STURM-LIOUVILLE EIGENVALUE PROBLEMS 3 • By (1), we get u2n for 0 ≤ n ≤ N . By (5), we get u2N +1 . So we have u2n for 0 ≤ n ≤ N + 1. • Keep going. The Sturm-Liouville eigenvalue problem A Sturm-Liouville eigenvalue problem has the form: (6) Ly := −[p(x)y 0 ]0 + q(x)y = λr(x)y, α1 y(a) + α2 y 0 (a) = 0, β1 y(b) + β2 y 0 (b) = 0. a < x < b, We say that the Sturm-Liouville eigenvalue problem (6) is regular if p(x) > 0 and r(x) > 0 for a ≤ x ≤ b; we say it’s singular if otherwise. Theorem 1. Any differential equation −P (x)y 00 − Q(x)y 0 + R(x)y = λy is equivalent to a differential equation of the form −[p(x)y 0 ]0 + q(x)y = 0. Proof. Use the method of the integrating factor: Multiply r(x) on the both sides of −P (x)y 00 − Q(x)y 0 + R(x)y = ry, then −r(x)P (x)y 00 − r(x)Q(x)y 0 + r(x)R(x)y = λr(x)y. The above equation is of the form −[p(x)y 0 ]0 + q(x)y = λr(x)y if and only if d [r(x)P (x)] = r(x)Q(x). dx So we get r0 (x)P (x) + r(x)P 0 (x) = r(x)Q(x), that is, r0 (x) = r(x) · r(x) = e R Q(x)−P 0 (x) P (x) dx = Q(x) − P 0 (x) , which implies that P (x) 1 R e P (x) Q(x) P (x) dx . Example 1. Reduce the following boundary value problem to a Sturm-Liouville form: φ00 + xφ0 + λφ = 0, φ(0) = φ(1) = 0. 4 MINGFENG ZHAO Since φ00 + xφ0 + λφ = 0, then −φ00 − xφ0 = λφ. Multiply r(x) on the both sides, then −r(x)φ00 − xr(x)φ0 = λr(x)φ. The above equation is a Sturm-Liouville form, then r0 (x) = xr(x), which implies that r(x) = e x2 2 . So we get h x2 i0 x2 − e 2 φ0 = λe 2 φ, which is a regular Sturm-Liouville eigenvalue problem with p(x) = e x2 2 , q(x) = 0 and r(x) = e x2 2 . Example 2. Reduce the following boundary value problem to a Sturm-Liouville form: −y 00 + x4 y 0 = λy, y(0) = y(1) = 0. Multiply r(x) on the both sides of −y 00 + x4 y 0 = λy, then −r(x)y 00 + x4 r(x)y 0 = λr(x)y. The above equation is a Sturm-Liouville form, then −r0 (x) = x4 r(x), which implies that r(x) = e− x5 5 . So we get h x5 i0 x5 − e− 5 y 0 = λe− 5 y, which is a regular Sturm-Liouville eigenvalue problem with p(x) = e− x5 5 , q(x) = 0 and r(x) = e− x5 5 . Properties of the regular Sturm-Liouville eigenvalue problem Consider the following regular Sturm-Liouville eigenvalue problem: Ly := −[p(x)y 0 ]0 + q(x)y = λr(x)y, α1 y(a) + α2 y 0 (a) = 0, (7) β1 y(b) + β2 y 0 (b) = 0, p(x) > 0, r(x) > 0, a ≤ x ≤ b. a < x < b, Then • Eigenvalues: – All eigenvalues of (7) are real numbers. – There are infinity many of eigenvalues {λn }∞ n=1 with λ1 < λ2 < λ3 < · · · and lim λn = ∞. n→∞ LECTURE 21: THE FINITE DIFFERENCE METHODS III AND THE STURM-LIOUVILLE EIGENVALUE PROBLEMS – λn > 0 for all n ≥ 1 if 5 α1 β1 < 0, > 0 and q(x) > 0 for a < x < b. α2 β2 • Eigenfunctions: – For each eigenvalue λn , there is an eigenfunction φn (x) that is unique up to a multiplicative constant. Z b r(x)|φn (x)|2 dx = 1. – φn (x)’s are real functions and can be normalized so that a – The eigenfunctions corresponding to difference eigenvalues are orthogonal with respect to the weight function r(x), that is, Z b r(x)φn (x)φm (x) dx = 0, for all n 6= m. a – For each n ≥ 1, φn (x) has exactly n − 1 zeros on (a, b). • Expansion Property: For any “nice” function f (x) on [a, b], then f (x) is an “infinite” linear combination of {φn (x)}∞ n=1 , that is, f (x) = ∞ X cn φn (x). n=1 Moreover, we have Rb f (x)r(x)φn (x) dx , cn = Ra b r(x)|φn (x)|2 dx a for all n ≥ 1. Example 3. Consider the following initial-boundary value problem for the heat equation: ut = c2 uxx , 0 < x < L, t > 0, (8) BC : u(0, t) = 0, ux (L, t) + u(L, t), t > 0, IC : u(x, 0) = f (x), 0 ≤ x ≤ L. Let u(x, t) = X(x)T (t) be a non-zero separated solution to the problem: ut = c2 uxx , 0 < x < L, t > 0, (9) BC : u(0, t) = 0, u (L, t) + u(L, t) = 0, t > 0. x Then we get XT 0 = c2 X 00 T , that is, − X 00 T0 = − 2 = λ. X c T It’s easy to see that λx = λt = 0, then λ is a constant. Since u(0, t) = 0 and ux (L, t) + u(L, t) = 0 for t > 0, then X(0) = 0 and X 0 (L) + X(L) = 0, that is, we should consider the following eigenvalue problem: −X 00 = λX, (10) X(0) = 0, X 0 (L) + X(L) = 0. Let X(x) = erx be a solution to −X 00 = λX, then r2 + λ = 0. 6 MINGFENG ZHAO • If λ = 0, then r1 = r2 = 0, that is, the general solution to −X 00 = λX = 0 is X(x) = C1 + C2 x. Since X(0) = 0, then C1 = 0 and X(x) = C2 x. Since X 0 (x) = C2 and X 0 (L) + X(L) = 0, then C2 + C2 L = 0, which implies that C2 = 0. So X(x) = 0. • If λ = µ2 for some µ > 0, then r1,2 = ±iµ, that is, the general solution to −X 00 = λX is X(x) = C1 cos(µx) + C2 sin(µx). Since X(0) = 0, then C1 = 0 and X(x) = C2 sin(µx). Since X 0 (x) = µC2 cos(µx) and X 0 (L) + X(L) = 0, then µC2 cos(µL)+C2 sin(µL) = 0. In order to find a non-zero solution, we need µ cos(µL)+sin(µL) = 0. Since µ > 0, then we must have cos(µL) 6= 0, which implies that µ + tan(µL) = 0. So there is a sequence {µ}∞ n=1 such that 0 < µ1 < µ2 < µ3 < · · · such that µn + tan(µn L) = 0 for all n ≥ 1 and lim µn = ∞. For n→∞ each µn , we have Xn (x) = C sin(µn x). • If λ = −µ2 for some µ > 0, then r1,2 = ±µ, that is, the general solution to −X 00 = λX is X(x) = C1 eµx +C2 e−µx . Since X(0) = 0, then C1 + C2 = 0 and X(x) = C1 [eµx − e−µx ]. Since X 0 (x) = C1 [µeµx + µe−µx ] and X 0 (L) + X(L) = 0, then C1 [µeµL + µe−µL ] + C1 [eµL − e−µL ] = 0. So we get eµL − e−µL = 0. C1 µ + µL e + e−µL Since µ > 0 and L > 0, then we must have C1 = 0. So X(x) = 0. In summary, the eigenvalues of (10) are λn = µ2n and corresponding eigenvalues are Xn (x) = C sin(µn x) with n ≥ 1. Now for any λn , since T 0 + c2 λn T = 0, then T (t) = Ce−c 2 2 un (x, t) = e−c µ2n t µ2n t . So for any n ≥ 1, we find a non-zero solution to (9): sin(µn x). It’s easy to see that (10) is a Sturm-Liouville eigenvalue problem, by the properties of Sturm-Liouville problem, then f (x) = ∞ X fn sin(µn x), n=1 where RL fn = Let u(x, t) = ∞ X 2 fn e−c µ2n t sin(µn x) = n=1 ∞ X f (x) sin(µn x) dx , RL 2 sin (µn x) dx 0 0 for all n ≥ 1. fn un (x, t), then u(x, t) is the solution to (8). n=1 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