Tham khảo tài liệu 'burden - numerical analysis 5e (pws, 1993) episode 3 part 7', kỹ thuật - công nghệ, cơ khí - chế tạo máy phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Parabolic Partial-Differential Equations 643 This method does have local truncation error of order Off -T- ĩ2 but unfortunately it also has serious stability problems see Exercise 6 . A more rewarding method is derived by averaging the Forward-Difference method at the jth step in t WiJ l - - 2wu _ n ------ a - u k-------------------------------------------------h2- which has local truncation error k d2u ọ rF hO 2 dt and the Backward-Difference method at the j -T- l st Stepan t i j i - i j _ 2WỈ 1 - 1 - 2w WZ_1J 1 ------ a ----------------A------------- 0. k h2 which has local truncation error fc d2u rB - - Zĩffị Aj Offz . 2 ỔÍ If we assume that 02w d2u Aj at at then the averaged difference method - i j CT H u - 2wfJ WÍ 1J 1 - 2-Wij k 2 _ h2 h2 J has local truncation error of order Off2 A A2 provided of course that the usual differentiability conditions are satisfied. This is known as the Crank-Nicolson method and is represented in the matrix form Ấwơ 1 - Bv j for each 0 1 2 where À wư w J w2 . jY h J and the matrices A and B are given by 1 A _À _ 2 --_ ỉ 0 . ị A A ị -0 A 2 0. 0 l Ả 644 CHAPTER 12 Numerical Solutions to Partial-Differential Equations and 1 A 0- -. 0 A 2 0. . 0 A -. 2 0. 0 I 1 - A Since A is a positive definite sưictly diagonally dominant and tridiagonal matrix it is nonsingular. Either the Crout Factorization for Tridiagonal Linear System Algorithm or the SOR Algorithm can be used to obtain wc 1 from w for each j 0 1 incorporates Crout factorization into the Crank-Nicolson technique. As in Algorithm a finite length for the time interval must be specified to determine a stopping procedure. ALGORITHM Crank- ỉicolson To approximate the solution to the parabolic partial-differential equation du J o d2u _ _ -7- x t a2 7-7 x i 0 0 X I 0 t T ộ ỠX subject to the boundary conditions m 0 í u l f 0 0 t T and the initial conditions M. x 0 x 0 X Ỉ INPUT endpoint Ỉ maximum time T constant a integers m 3 N 1. .