1540470959-Boundary_Value_Problems_and_Partial_Differential_Equations__Powers

(jair2018) #1
7.3 Wave Equation 411
i
m 01234
0 00 .51 0. 50
1 0 0 .50 0. 5 0
2 0 − 1. 51 − 1. 5 0
3 0 4. 5 − 84. 5 0
4 0 − 23. 533 − 23. 5 0
Table 7 Unstable numerical solution

In Eq. (4) we see that both conditions are met whenρ= t/ xis less than
or equal to 1; in other words, the time step must not exceed the space step.
However, usingρ^2 =1 when acceptable often provides the best accuracy.
We conclude with one more example, illustrating how numerical results can
be obtained easily in some cases that might be puzzling analytically.


Example.
Supposewearetosolvetheproblem


∂^2 u
∂x^2

=∂

(^2) u
∂t^2
−16 cos(πt), 0 <x< 1 , 0 <t, (10)
u( 0 ,t)= 0 , u( 1 ,t)= 0 , 0 <t, (11)
u(x, 0 )= 0 ,
∂u
∂t(x,^0 )=^0 ,^0 <x<^1. (12)
We replace the partial derivatives as before, obtaining
ui+ 1 (m)− 2 ui(m)+ui− 1 (m)
( x)^2


ui(m+ 1 )− 2 ui(m)+ui(m− 1 )
( t)^2 −16 cos(πtm).
When this is solved forui(m+ 1 ),wefind
ui(m+ 1 )=( 2 − 2 ρ^2 )ui(m)+ρ^2 ui+ 1 (m)+ρ^2 ui− 1 (m)
−ui(m− 1 )+ 16 ( t)^2 cos(πm t). (13)
Let us take x= t= 1 /4again,soρ=1 and Eq. (13) simplifies to
ui(m+ 1 )=ui+ 1 (m)+ui− 1 (m)−ui(m− 1 )+cos
(mπ
4


)

. (14)

This is our running equation. The starting equation comes from combining
Eqs. (14) form=0,


ui( 1 )=−ui(− 1 )+ 1
Free download pdf