Docsity

Lecture Notes on Implicit Method for Wave Equation | MATH 445, Study notes of Mathematics

Toggle sidebar
bg1
MATH 445
Implicit scheme for the wave equation
Consider the one-dimensional wave equation
utt(x, t) = c2uxx(x, t); 0 < x < L, 0< t ≤T;u(0, t) = u(L, t) = 0; u(x, 0) = f(x), ut(x, 0) = g(x).
Denote by ∆t=τthe step size in time, and by ∆x=h, in space; set m2=τ2c2/h2,xi= (i−1)h, i =
1, . . . , M + 1; tj= (j−1)τ, j = 1, . . . , N + 1.Note that L=Mh =xM+1, T =Nτ =tN+1.Write
ui,j for the approximation of u(xi, tj),
We approximate utt(xi, tj) by the central difference at xi:
utt(xi, tj)≈1
τ2(ui,j+1 −2ui,j +ui,j−1)
and uxx(i∆x, j ∆t), by the average of the corresponding central differences at tj+1 and tj−1:
uxx(i∆x, j ∆t)≈1
2µ1
h2(ui+1,j+1 −2ui,j+1 +ui−1,j +1) + 1
h2(ui+1,j−1−2ui,j−1+ui−1,j −1)
The result is
ui,j+1 −2ui,j +ui,j−1=1
2m2³(ui+1,j+1 −2ui,j+1 +ui−1,j +1)+(ui+1,j−1−2ui,j−1+ui−1,j−1)´
or
−m2ui+1,j+1 + 2(1 + m2)ui,j+1 −m2ui−1,j +1 = 4ui,j +m2ui+1,j−1−2(1 + m2)ui,j−1+m2ui−1,j −1.(1)
With zero boundary conditions, you get u1,j =uM+1,j = 0.For i= 2, . . . , M, use the initial
conditions to get ui,1=u(xi,0) = f((i−1)h), ui,2≈ui,1+τg((i−1)h) + τ2
2utt(xi,0); from the
equation, utt(xi,0) = c2uxx (xi,0) = c2f00(xi)≈c2(f(ih)−2f((i−1)h) + f((i−2)h))/h2.
Then, for each j+1 = 3, . . . , N , (1) is a linear system for the unknown vector (u2,j+1, . . . , uM,j +1),
and all you need is to solve this system. The matrix Aof this system is of size (M−1) ×(M−1),
with 2(1+ m2) on the main diagonal, −m2just above and below the main diagonal, and 0 elsewhere.
If you write U(j) for the vector-column (u2,j, . . . , uM−1,j ), then the system to solve is
AU(j+ 1) = 4U(j)−AU(j−1).

Partial preview of the text

Download Lecture Notes on Implicit Method for Wave Equation | MATH 445 and more Study notes Mathematics in PDF only on Docsity!

MATH 445

Implicit scheme for the wave equation

Consider the one-dimensional wave equation

utt(x, t) = c^2 uxx(x, t); 0 < x < L, 0 < t ≤ T ; u(0, t) = u(L, t) = 0; u(x, 0) = f (x), ut(x, 0) = g(x).

Denote by ∆t = τ the step size in time, and by ∆x = h, in space; set m^2 = τ 2 c^2 /h^2 , xi = (i−1)h, i = 1 ,... , M + 1; tj = (j − 1)τ, j = 1,... , N + 1. Note that L = M h = xM +1, T = N τ = tN +1. Write ui,j for the approximation of u(xi, tj ), We approximate utt(xi, tj ) by the central difference at xi:

utt(xi, tj ) ≈

τ 2

(ui,j+1 − 2 ui,j + ui,j− 1 )

and uxx(i∆x, j∆t), by the average of the corresponding central differences at tj+1 and tj− 1 :

uxx(i∆x, j∆t) ≈

h^2

(ui+1,j+1 − 2 ui,j+1 + ui− 1 ,j+1) +

h^2

(ui+1,j− 1 − 2 ui,j− 1 + ui− 1 ,j− 1 )

)

The result is

ui,j+1 − 2 ui,j + ui,j− 1 =

m^2

( (ui+1,j+1 − 2 ui,j+1 + ui− 1 ,j+1) + (ui+1,j− 1 − 2 ui,j− 1 + ui− 1 ,j− 1 )

)

or

−m^2 ui+1,j+1 + 2(1 + m^2 )ui,j+1 − m^2 ui− 1 ,j+1 = 4ui,j + m^2 ui+1,j− 1 − 2(1 + m^2 )ui,j− 1 + m^2 ui− 1 ,j− 1. (1)

With zero boundary conditions, you get u 1 ,j = uM +1,j = 0. For i = 2,... , M, use the initial conditions to get ui, 1 = u(xi, 0) = f ((i − 1)h), ui, 2 ≈ ui, 1 + τ g((i − 1)h) + τ^ 2 2 utt(xi,^ 0); from the equation, utt(xi, 0) = c^2 uxx(xi, 0) = c^2 f ′′(xi) ≈ c^2 (f (ih) − 2 f ((i − 1)h) + f ((i − 2)h))/h^2. Then, for each j+1 = 3,... , N , (1) is a linear system for the unknown vector (u 2 ,j+1,... , uM,j+1), and all you need is to solve this system. The matrix A of this system is of size (M − 1) × (M − 1), with 2(1+m^2 ) on the main diagonal, −m^2 just above and below the main diagonal, and 0 elsewhere. If you write U (j) for the vector-column (u 2 ,j ,... , uM − 1 ,j ), then the system to solve is AU (j + 1) = 4U (j) − AU (j − 1).