Mathematical Physics - Volume II - Numerical Methods

16 Chapter 1. Finite difference method and Finite element method

where x − h < ¯ x < x . By adding the above, we obtain: u n + 1 , j + u n − 1 , j = 2 u n , j + h 2 u xx ( x n , t j )+ h 4 24

[ u xxxx ( ˜ x , t )+ u xxxx ( ¯ x , t )]

from which follows that:

h 2 12

u n + 1 , j − 2 u n j + u n − 1 , j h 2

u xx ( x n , t j ) =

u xxxx ( ˆ x , t ) =

+

(1.25)

δ 2

x u n j h 2

+ O ( h 2 )

=

where ¯ x < ˆ x < ˜ x . In this way it was also shown that the local rounding error is O ( k + h 2 ) . It can now be shown that the local rounding error is O ( k 2 + h 2 ) , if k = h 2 / 6 a 2 , where a is the diffusion coefficient. For this purpose, we write the following: ( u t − a 2 u xx ) n j = u n , j + 1 − u n j k − a 2 δ 2 x u n j h 2 − k 2 u tt ( x n , ¯ t j )+ a 2 h 2 12 u xxxx ( ¯ x n , t j ) (1.26) where t j < ¯ t j < t j + 1 and x n − 1 < ¯ x n < x n + 1 . Solution error is: T n j = k 2 u tt ( x n , ¯ t j ) − a 2 h 2 12 u xxxx ( ¯ x n , t j ) = O ( k + h 2 ) (1.27) if u tt and u xxxx are limited. By applying the expression for Taylor series and the condition that ( u t − a 2 u xx ) n j = 0, we obtain: u n , j + 1 − u n j k − a 2 δ 2 x u n j h 2 = k 2 u tt − a 2 h 2 12 u xxxx n j + O ( k 2 )+ O ( h 4 ) (1.28) since u t = a 2 u xx , u tt = a 2 u xxt = a 2 ( u t ) xx = a 2 ( a 2 u xx ) xx = a 4 u xxxx , which shows that the expression h k 2 u tt − a 2 h 2 12 u xxxx i n j can be written as: k 2 a 4 − a 2 h 2 12 u xxxx ( x n , t j ) , (1.29) which is equal to 0 for k = h 2 / 6 a 2 . We will now apply the matrix criteria of stability in order to show that the explicit method is stable if and only if r ≤ 1 / 2. As an example, we will use the boundary problem given by: u t = a 2 u xx 0 < x < 1 , t > 0 ,

(1.30)

u ( x , 0 ) = f ( x ) 0 < x < 1 , u ( 0 , t ) = u ( 1 , t ) = 0 t > 0 .

Made with FlippingBook flipbook maker