ImplSchemeWaveEq

ImplSchemeWaveEq - 2 2 u tt ( x i , 0); from the equation,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
MATH 445 Implicit scheme for the wave equation Consider the one-dimensional wave equation u tt ( x,t ) = c 2 u xx ( x,t );0 < x < L, 0 < t T ; u (0 ,t ) = u ( L,t ) = 0; u ( x, 0) = f ( x ) , u t ( 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 , x i = ( i - 1) h,i = 1 ,...,M + 1; t j = ( j - 1) τ, j = 1 ,...,N + 1 . Note that L = Mh = x M +1 ,T = = t N +1 . Write u i,j for the approximation of u ( x i ,t j ), We approximate u tt ( x i ,t j ) by the central difference at x i : u tt ( x i ,t j ) 1 τ 2 ( u i,j +1 - 2 u i,j + u i,j - 1 ) and u xx ( i Δ x,j Δ t ), by the average of the corresponding central differences at t j +1 and t j - 1 : u xx ( i Δ x,j Δ t ) 1 2 ± 1 h 2 ( u i +1 ,j +1 - 2 u i,j +1 + u i - 1 ,j +1 ) + 1 h 2 ( u i +1 ,j - 1 - 2 u i,j - 1 + u i - 1 ,j - 1 ) The result is u i,j +1 - 2 u i,j + u i,j - 1 = 1 2 m 2 ( u i +1 ,j +1 - 2 u i,j +1 + u i - 1 ,j +1 ) + ( u i +1 ,j - 1 - 2 u i,j - 1 + u i - 1 ,j - 1 ) · or - m 2 u i +1 ,j +1 +2(1+ m 2 ) u i,j +1 - m 2 u i - 1 ,j +1 = 4 u i,j + m 2 u i +1 ,j - 1 - 2(1+ m 2 ) u i,j - 1 + m 2 u i - 1 ,j - 1 . (1) With zero boundary conditions, you get u 1 ,j = u M +1 ,j = 0 . For i = 2 ,...,M, use the initial conditions to get u i, 1 = u ( x i , 0) = f (( i - 1) h ), u i, 2 u i, 1 + τg (( i - 1) h ) + τ
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2 2 u tt ( x i , 0); from the equation, u tt ( x i , 0) = c 2 u xx ( x i , 0) = c 2 f 00 ( x i ) ≈ 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 ,...,u M,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 ,...,u M-1 ,j ), then the system to solve is AU ( j + 1) = 4 U ( j )-AU ( j-1) ....
View Full Document

This note was uploaded on 10/06/2009 for the course MATH 445 taught by Professor Friedlander during the Fall '07 term at USC.

Ask a homework question - tutors are online