Mathematical Physics - Volume II - Numerical Methods

1.1 Finite difference method

15

Local rounding errors and stability are the same as in the case of the one dimensional diffusion equation, with the only difference being that the explicit method is stable for r ≤ 1 / 4. Under the condition that it is stable, the explicit method has a considerable advantage over the implicit ones, since it directly provides a step-by-step solution. Implicit method, even though unconditionally stable, require the inversion of corresponding matrices in each time step, i.e. the solving of corresponding equation systems, which requires a far greater computing capacity. 1.1.5 Explicit finite difference method We will now perform a thorough analysis in order to show that expression given for explicit finite difference method hold, including error estimation and stability conditions. For this purpose, we will write the expressions for u t and u xx , obtained by deriving function u ( x , t ) into a Taylor series:

u ( x , t + k ) = u ( x , t )+ u t ( x , t ) k + u tt ( x , ˜ t ) k 2 2 ,

(1.19)

series:

u ( x , t + k ) = u ( x , t )+ u t ( x , t ) k + u tt ( x , ˜ t ) k 2 2 ,

(1.20)

i.e.

u n , j + 1 = u n j + u t ( x n , t j ) k + u tt ( x n , ˜ t j ) k 2 2 ,

(1.21)

from which follows that:

u n , j + 1 − u n j k

k 2

u tt ( x n , ˜ t j )

u t ( x n , t j ) =

(1.22)

where u tt ( ˜ x n , ˜ t j ) k 2 = O ( k ) is the local rounding error. Expression for u xx can also be obtained by deriving u ( x , t ) into a Taylor series:

u ( x + h , t ) = u ( x , t )+ u x ( x , t ) h + u xx ( x , t ) h 2 2 + + u xxx ( x , t ) h 3 6 + u xxxx ( ˜ x , t ) h 4 24

(1.23)

where x < ˜ x < x + h ; i.e.

u ( x − h , t ) = u ( x , t ) − u x ( x , t ) h + u xx ( x , t ) h 2 2 −

h 3 6

h 4 24

u xxx ( x , t )

+ u xxxx ( ¯ x , t )

(1.24)

Made with FlippingBook flipbook maker