FINITE DIFFERENCE SCHEMES WHITH EXACT SPECTRUM FOR SOLVING DIFFERENTIAL EQUATIONS WITH BOUNDARY CONDITIONS OF THE FIRST KIND

Similar documents
Linear Algebra Review (Course Notes for Math 308H - Spring 2016)

Linear Algebra: Matrix Eigenvalue Problems

x 3y 2z = 6 1.2) 2x 4y 3z = 8 3x + 6y + 8z = 5 x + 3y 2z + 5t = 4 1.5) 2x + 8y z + 9t = 9 3x + 5y 12z + 17t = 7

2.4 Eigenvalue problems

Exercise Sheet 1.

APPENDIX A. Background Mathematics. A.1 Linear Algebra. Vector algebra. Let x denote the n-dimensional column vector with components x 1 x 2.

PH.D. PRELIMINARY EXAMINATION MATHEMATICS

Linear Algebra, part 2 Eigenvalues, eigenvectors and least squares solutions

Solving First Order PDEs

LECTURE 33: NONHOMOGENEOUS HEAT CONDUCTION PROBLEM

22.2. Applications of Eigenvalues and Eigenvectors. Introduction. Prerequisites. Learning Outcomes

HW #3 Solutions: M552 Spring (c)

MATH 425, HOMEWORK 5, SOLUTIONS

Functional Analysis Review

1 Last time: least-squares problems

Ordinary Differential Equations II

Ma 227 Review for Systems of DEs

The goal of this chapter is to study linear systems of ordinary differential equations: dt,..., dx ) T

Calculus 2502A - Advanced Calculus I Fall : Local minima and maxima

3. Identify and find the general solution of each of the following first order differential equations.

Lecture 1. Finite difference and finite element methods. Partial differential equations (PDEs) Solving the heat equation numerically

Lecture Notes for Math 251: ODE and PDE. Lecture 30: 10.1 Two-Point Boundary Value Problems

Introduction to Sturm-Liouville Theory and the Theory of Generalized Fourier Series

Chapter Two Elements of Linear Algebra

Recall: Dot product on R 2 : u v = (u 1, u 2 ) (v 1, v 2 ) = u 1 v 1 + u 2 v 2, u u = u u 2 2 = u 2. Geometric Meaning:

SINC PACK, and Separation of Variables

Linear Ordinary Differential Equations

Math Ordinary Differential Equations

First order Partial Differential equations

Math 108b: Notes on the Spectral Theorem

Newtonian Mechanics. Chapter Classical space-time

Deterministic Dynamic Programming

Elements of Positive Definite Kernel and Reproducing Kernel Hilbert Space

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

This property turns out to be a general property of eigenvectors of a symmetric A that correspond to distinct eigenvalues as we shall see later.

Partial differential equations (ACM30220)

Kernel Method: Data Analysis with Positive Definite Kernels

Practice Problems For Test 3

1+t 2 (l) y = 2xy 3 (m) x = 2tx + 1 (n) x = 2tx + t (o) y = 1 + y (p) y = ty (q) y =

Properties of Transformations

Separation of Variables in Linear PDE: One-Dimensional Problems

1 Assignment 1: Nonlinear dynamics (due September

Math 322. Spring 2015 Review Problems for Midterm 2

Problem set 3: Solutions Math 207B, Winter Suppose that u(x) is a non-zero solution of the eigenvalue problem. (u ) 2 dx, u 2 dx.

6.1 Matrices. Definition: A Matrix A is a rectangular array of the form. A 11 A 12 A 1n A 21. A 2n. A m1 A m2 A mn A 22.

1. General Vector Spaces

Analysis IV : Assignment 3 Solutions John Toth, Winter ,...). In particular for every fixed m N the sequence (u (n)

Functional Analysis Review

Evolution problems involving the fractional Laplace operator: HUM control and Fourier analysis

Math 5630: Iterative Methods for Systems of Equations Hung Phan, UMass Lowell March 22, 2018

Mathematics Qualifying Exam Study Material

Differential equations

Strauss PDEs 2e: Section Exercise 4 Page 1 of 6

1 Separation of Variables

Review of Linear Algebra

Entrance Exam, Differential Equations April, (Solve exactly 6 out of the 8 problems) y + 2y + y cos(x 2 y) = 0, y(0) = 2, y (0) = 4.

Ordinary Differential Equations (ODEs)

Final Exam May 4, 2016

LEGENDRE POLYNOMIALS AND APPLICATIONS. We construct Legendre polynomials and apply them to solve Dirichlet problems in spherical coordinates.

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018

Practice Problems For Test 3

Ma 221 Final Exam Solutions 5/14/13

MATH 213 Linear Algebra and Ordinary Differential Equations Spring 2015 Study Sheet for Final Exam. Topics

MATH 5640: Fourier Series

FOURIER TRANSFORMS. 1. Fourier series 1.1. The trigonometric system. The sequence of functions

REVIEW OF DIFFERENTIAL CALCULUS

MATH 220 solution to homework 5

Math Linear Algebra II. 1. Inner Products and Norms

17 Source Problems for Heat and Wave IB- VPs

Problem (p.613) Determine all solutions, if any, to the boundary value problem. y + 9y = 0; 0 < x < π, y(0) = 0, y (π) = 6,

Lecture Notes 6: Dynamic Equations Part C: Linear Difference Equation Systems

MATH 391 Test 1 Fall, (1) (12 points each)compute the general solution of each of the following differential equations: = 4x 2y.

SAMPLE FINAL EXAM SOLUTIONS

3. Identify and find the general solution of each of the following first order differential equations.

Math 250B Final Exam Review Session Spring 2015 SOLUTIONS

Lecture Notes on PDEs

systems of linear di erential If the homogeneous linear di erential system is diagonalizable,

MAT 372 K.T.D.D. Final Sınavın Çözümleri N. Course. Question 1 (Canonical Forms). Consider the second order partial differential equation

Applied Differential Equation. November 30, 2012

SPRING 2006 PRELIMINARY EXAMINATION SOLUTIONS

Tutorials in Optimization. Richard Socher

Advanced Eng. Mathematics

THE METHOD OF SEPARATION OF VARIABLES

MATH 205C: STATIONARY PHASE LEMMA

BENG 221 Mathematical Methods in Bioengineering. Fall 2017 Midterm

LINEAR ALGEBRA SUMMARY SHEET.

Essential Ordinary Differential Equations

General Inner Product and The Fourier Series

Solving First Order PDEs

YORK UNIVERSITY. Faculty of Science Department of Mathematics and Statistics MATH M Test #1. July 11, 2013 Solutions

Ordinary Differential Equations (ODEs)

Separation of variables

Eigenvalues and Eigenvectors

Numerical Analysis of Differential Equations Numerical Solution of Parabolic Equations

Partial Differential Equations Separation of Variables. 1 Partial Differential Equations and Operators

ODE classification. February 7, Nasser M. Abbasi. compiled on Wednesday February 07, 2018 at 11:18 PM

Math 443 Differential Geometry Spring Handout 3: Bilinear and Quadratic Forms This handout should be read just before Chapter 4 of the textbook.

Numerical Analysis of Differential Equations Numerical Solution of Elliptic Boundary Value

Honors Linear Algebra, Spring Homework 8 solutions by Yifei Chen

Polytechnic Institute of NYU MA 2132 Final Practice Answers Fall 2012

Transcription:

International Journal of Pure and Applied Mathematics Volume 71 No. 1 011, 159-17 FINITE DIFFERENCE SCHEMES WHITH EXACT SPECTRUM FOR SOVING DIFFERENTIA EQUATIONS WITH BOUNDARY CONDITIONS OF THE FIRST KIND Harijs Kalis 1, Sergejs Rogovs 1, Faculty of Physics and Mathematics University of atvia 8, Zellu Iela, Riga, V 100, ATVIA Abstract: In this paper, we introduce the notion of finite difference schemes with exact spectrum (FDSES). We use these shemes for numerical solving ordinary differential equations (ODEs) and partial differential equations (PDEs) with boundary conditions of the first kind. We compare the results obtained by FDSES with the results obtained by other finite difference schemes (FDS). We prove several exact scheme propositions and theorems. AMS Subject Classification: 65F15, 6510, 65M06, 65M0, 65M, 65M70 Key Words: finite differnces, boundary value problem, initial-boundary value problem, spectral problem 1. Introduction FDS are numerical methods for an approximation of the solution of differential equations, using finite differences to approximate derivatives. Hence one has to deal with difference equations (systems of linear equations). Both analytical and numerical solutions of ODEs can be expressed in Fourier series (infinite and finite respectively). In these series appear eigenvalues of the corresponding spectral problems. If in the finite Fourier series eigenvalues of the corresponding spectral problem (discrete problem) are replaced with eigenvalues from the infinite Fourier series, then we obtain so-called FDSES. Similarly, Received: June 9, 011 c 011 Academic Publications, td. Correspondence author

160 H. Kalis, S. Rogovs FDSES can be obtained by using a similarity transformation in order to represent a three-diagonal matrix (matrix of the corresponding difference equation) in the canonical form, a diagonal matrix form with the matrix eigenvalues on the main diagonal. Solving partial differential equations using the method of lines (MO), an independent space variable x becomes discrete and derivatives with respect to x are replaced with finite differences, but a time variable t remains continuous. Hence we obtain a system of ODEs that approximates the original PDE. A solution of PDE also can expressed in Fourier series and, similarly to ODEs, FDSES can be obtained. In this paper, FDSES will be compared with other classical FDS solving second-order linear ODEs, the heat and wave equations.. Matrix Spectral Problem Since a discrete problem of ODEs can be represented as a system of linear equations, we begin with an investigation of a solution of the system using its spectrum. The system of linear equations can be represented in the following form: Ay = f, (1) where A is an invertible square matrix of size M with real entries, y and f are vectors of size M with real entries. If a full eigenvector set solutions w (k) }, w (k) } of the corresponding spectral problems Aw = µw,a T w = µw, () where A T is transpose of A,are known, then eigenvectors of these systems can be chosen as an biorthonormal basis in Euclidean space R M and the solution of the system (1) can be obtained in the following form: y = α k w (k), (3) where α k R are linear combination coefficients. Assuming that the following series f = β k w (k) (β k R), (4)

FINITE DIFFERENCE SCHEMES WHITH EXACT SPECTRUM... 161 exist and taking into account the orthogonal condition (w (j),w (k) ) = δ j,k, where δ j,k is the Kronecker delta, (w (j),w (k) ) is a scalar product of two vectors, the scalar product of (4) and fixed eigenvector w (k) gives (f,w (k) ) = β k and β k = (f,w (k) ),k = 1,M. Similarly, (w (k),ay) = µ k α k, it means that α k = β k µ k and the solution of the problem (1) is as follows: y = β k µ k w (k). (5) Spectral problem () can be represented in the matrix form AW = WD,A T W = WD, where W and W are matrices with the corresponding eigenvectors w (k) j, w (k) j, k,j = 1,M on columns, D = diag(µ k ), k = 1,M is a diagonal matrix with the eigenvalues µ k on the main diagonal. It implies that the matrix A can be represented in the canonical form A = WDW 1. Taking into account that for an arbitrary matrix function F(A) the equality F(A) = WF(D)W 1 holds, we obtain the solution of the system (1) in the following form: y = A 1 f = WD 1 W 1 f. From the biorthonormal condition it follows that W = W T = E or W 1 = W T, where E is the identity matrix. So y = WD 1 W T. Remark 1. et A be a symmetric matrix (A = A T ), then the eigenvector system w (k) } is an orthonormal system for which the condition (w (j),w (k) ) = δ j,k holds, and y = WD 1 Wf. Further, we shall consider discrete (M-finite) and continuous (M = ) spectrums for the second-order differential ( d dx ) operator with the homogeneous boundary conditions of the first kind in the segment [0,] and its approximation with the second order central difference in the uniform grid ω h = x i = ih,i = 0,N,Nh = } respectively. A discrete problem is in the form () (A = A T ), where A is a matrix of the size M = N 1 1 0... 0 0 A = 1 1 1... 0 0 h........ 0 0 0... 1

16 H. Kalis, S. Rogovs with the eigenvalues µ k = 4 sin ( ) kπh h, k = 1,M and the eigenvectors w (k) (x j ) = ) ) C k sin = C k sin, k,j = 1,M. We determine constants C k from ( kπxj ( kπj N the orthonormal condition (w (k),w (j) ) h h M i=1 w(k) (x i )w (j) (x i ) = δ k,j, hence C k =. Hence the eigenvectors are in the form: w (k) (x) = sin ( kπx ),x ω h,k = 1,M[1]. (6) Each discrete function f(x), x ω h can be expressed as a finite sum of the eigenvectors (6) (discrete Fourier series) similar to (4), f(x) = M β kw (k) (x), where β k = (f,w (k) ). In case when h we obtain the continuous problem X (x) = λx(x) (7) X(0) = X() = 0, with the eigenvalues λ k = ( kπ ),k = 1,,... and the eigenfunctions X k (x) = C k sin ( ) kπx, k = 1,,... We determine constantes Ck from the orthonormal condition (X k (x),x j (x)) 0 X k(x)x j (x)dx = δ k,j, hence C k =. Hence the eigenvectors are in the form: X k (x) = sin ( kπx ),k = 1,,... (8) Each continuous function f(x) (f(0) = f() = 0) can be expressed as a sum of the eigenvectors (8) f(x) = f kx k (x), where f k = (f(x),x k (x)). In case when f(0) 0 or f() 0 the Fourier series convergence can be very slow. 3. FDSES for Solving ODEs The solution of the nonhomogeneous problem u (x) = f(x),x (0,) u(0) = u() = 0, (9) where f(0) = f() = 0, similarly to (3), can be represented as follows u(x) = α k X k (x), (10)

FINITE DIFFERENCE SCHEMES WHITH EXACT SPECTRUM... 163 where α k = f k λ k. Remark. In case when f(x) does not satisfy homogeneuos boundary conditions we can reduce the problem (9) to the two bondary value problems u 1 and f(0) f() (x) = f(x) + x f(0) u 1 (0) = u 1 () = 0 u (x) = f(0) f() x + f(0) u (0) = u () = 0, (11) (1) where the right hand side of the problem (11) satisfy homogeneuos boundary conditions. The solution of the problem (9) is u(x) = u 1 (x) + u (x), where u (x) = a ( 0 6 x 3 x ) b ( 0 x x ), a 0 = f(0) f(), b 0 = f(0). FDS approximation for the problem (9) is in the following form y xx (x) = f(x),x ω h y(0) = y() = 0, (13) where y xxi = 1 h (y(x i+1 ) y(x i ) + y(x i 1 )), or in the matrix form Ay = f. The solution of the problem (13) can be written in the finite series form y(x) = α (k) w (k) (x),x ω h, (14) where α (k) = f(k) µ k, f (k) = (f,w (k) ) h. In case when in the spectral representation A = WDW or in the corresponding series the eigenvalues µ are replaced with λ one obtains FDSES []. Proposition 1. et f(x) = M i=1 A ix i (x), where A i R and X i (x) = w (i) (x),i = 1,M,x ω h are the eigenfunctions of the problem (7), then FDSES for the problem (9) is exact, it means that values of the analytical solution and values of the numerical solution are equal at the grid points. Proof. The analytical solution is in the following form u(x) = A k λ k X k (x),

164 H. Kalis, S. Rogovs where A k = (X k, M i=1 A ix i (x)) and the numerical solution is y(x) = A k λ k w (k) (x), x ω h, where A k = (w (k), M i=1 A iw (i) (x)) h, which proves the proposition. Example 1. The analytical solution of (9), if f(x) = sin(πx), = 1 is u(x) = π sin(πx). The following numerical results are obtained using MATAB: u(fds)=0.003, u(fdses)=1.3878 10 17, by M = 4. Here u = max 1 j M u(x j ) y(x j ). Example. If f(x) = x(x 1), = 1, then the analytical solution of (9) is u(x) = x4 1 + x 6 x 1. The numerical results using MATAB are: u(fds)=0.0008, u(fdses)=1.5936 10 5, by M = 4, u(fds)=.0833 10 4, u(fdses)=1.005 10 6, by M = 9. Now, we shall consider the boundary value problem u (x) bu(x) = f(x) (15) u(0) = u() = 0, where f(0) = f() = 0, b R, b 0. Eigenfunctions and eigenvectors of the corresponding spectral problems for (15) are the same as for (9), but the corresponding eigenvalues are λ k = ( ) kπ b,k = 1,... and µk = 4 h sin ( ) kπh b,k = 1,M respectively. We define FDSES for (15) as it was done for (9). In some cases, in order to refine numerical results with FDS one uses so-called Bahvalov s method, namely, multiplying y xx by the parameter γ. If b > 0, γ = (b 1 /sin(b 1 )), where b 1 = bh/ and if b < 0, γ = (b 1 /sinh(b 1 )), where b 1 = bh/ [3]. Proposition. et f(x) = M i=1 A ix i (x), where A i R and X i (x),i = 1,M are the eigenfunctions of the problem (7), then FDSES for the problem (15) is exact. Example 3. If f(x) = 10sin(3πx), b = 50, = 1, then the analytical solution of (15) is u(x) = 10sin(3πx) 50+9π. The numerical results using MATAB are: u(gds)=0.3706, u(bah. GDS)=0.1003, u(fdses)=5.5511 10 17, by M = 4. Example 4. If f(x) = x(x 1)e x, = 1, then u(x) = 4sin( bx)(e 1 + cos( b)b cos( b)) sin( b)(b 3 + 3b + 3b + 1) 4cos( bx)(b 1) b 3 + 3b + 3b + 1

FINITE DIFFERENCE SCHEMES WHITH EXACT SPECTRUM... 165 ((x x)b + (x 4 + x )b + x + 4 + 3x)e x (b + 1) 3. The numerical results are: u(fds)=0.0019, u(bah. FDS)=0.001, u(fdses)=1.6904 10 4, by b = 100, M = 4, u(fds)=8.4343 10 4, u(bah. FDS)=.147 10 4, u(fdses)=9.617 10 6, by b = 100, M = 9. Now, we shall consider the corresponding spectral problems for the boundary value problem u (x) au (x) = f(x) (16) u(0) = u() = 0, where f(0) = f() = 0, a R. The continuous spectral problem is in the following form: X (x) + ax (x) + λx(x) = 0 (17) X(0) = X() = 0. The eigenfunctions in this case are X k (x) = exp ( ax 1,,... and the eigenvalues are λ k = a 4 + ( ) kπ, k = 1,,... For the corresponding conjugate problem X (x) ax (x) + λx(x) = 0 X(0) = X() = 0, ) ( sin kπx ), k = the eigenfunctions are X k (x) = exp ( ) ( ax sin kπx ), besides the biorthonormal condition (X j (x),x k (x)) 0 X j(x)x k (x)dx = δ j,k holds automatically. λ k,f k = (f(x), The analytical solution of (16) is u(x) = α kx k (x),α k = f k X k (x)). The discrete spectral problem for (16) is γw xx + awẋ + µw = 0,x ω h w(0) = w() = 0, where wẋi = (y i+1 y i 1 )/h, γ = a 1 coth(a 1 ), a 1 = ah/ (Iljin s scheme) [4]. The solution of the discrete spectral problem is w (k) (x) = exp ( ax ) ( sin kπx ), a x ω h,k = 1,M, µ k = 1 h sinh(a 1 ) (cosh(a 1) cos ( ) kπh ),k = 1,M. The solution of the corresponding conjugate problem (take -a instead of a) is w (k) (x) = exp ( ) ( ax sin kπx ). (18)

166 H. Kalis, S. Rogovs The numerical solution of the nonhomogeneous problem γy xx ayẋ = f(x),x ω h y(0) = y() = 0 (19) is y(x) = α (k) w (k) (x),x ω h, (0) j=k where α (k) = f(k) µ k,f (k) = (f,w (k) ) h. We define FDSES for the problem (16) as it was done previously. In the numerical solution (0) we replace the eigenvalues µ with the eigenvalues λ. Proposition 3. et f(x) = M i=1 A ix i (x), where A i R and X i (x),i = 1, M are the eigenfunctions of the problem (17), then FDSES for the problem (16) is exact. Example 5. If f(x) = e 5x sin(3πx), a = 5, = 1, then u(x) = 0e 5x sin(3πx) 15+180π. The numerical results are: u(il. FDS)=0.0038, u(il.fdses) =1.3878 10 18, by M = 4. Example 6. If f(x) = x(x 1), = 1, then u(x) = x (a 1)e at 6a 3 (e a 1) x a x a + a 1 3 6a 3 (e a 1). The numerical results are: a M u(il. FDS) u(il. FDSES) 1 4 7.9795 10 4.690 10 5 1 9.080 10 4 1.4678 10 6 0 4 5.8104 10 4 6.5513 10 4 0 9 1.8847 10 4 3.5775 10 5 50 9 1.4336 10 4 6.3506 50 99.076 10 6 1.6695 10 5 50 199 5.016 10 7 1.339 10 7 Table 1: Maximal errors a + x x3 a 3a If the parameter a grows, also u(il. FDSES) grows and Il. FDSES is better than Il. FDS, if the number of grid points is large. It happens because of boundary layers with a large amplitude by large a values.

FINITE DIFFERENCE SCHEMES WHITH EXACT SPECTRUM... 167 4. MO and FDSES for an Initial-Boundary Value Problem for the Heat Equation An initial-boundary value problem for the heat equation with homogenous boundary conditions of the first kind is as follows: u t = u + f(x,t),x (0,),t 0 x u t=0 = u 0 (x),x [0,] u x=0 = 0,u x= = 0,t 0, (1) where f, u 0 are continuous functions, x is a space coordinate, t is a time coordinate. 4.1. Analytical Solution We are looking for an analytical solution of (1) in the series form u(x,t) = a k (t)x k (x), () where, X k (x) = sin( ) kπx,k = 1,,... are the eigenfunctions of the differential operator ( ), a x k (t) are unknown functions. We insert () into (1) and assume that f(x,t) can be expressed in the series f(x,t) = f k(t)x k (x), where f k (t) = (f,x k ). Taking into account the previous assumptions we obtain the Cauchy problem for second-order linear ODEs: a k (t) + λ k a k (t) = f k (t) (3) a k (0) = (u 0,X k ), where a k (t) = da k(t) dt, λ k = ( ) kπ. The solution of (3) is ak (t) = a k (0)e λkt + t 0 f k(ξ)e λk(t ξ) dξ. 4.. MO and FDS Solving PDEs with the MO, we approximate the differential operator ( x ) with the second order central difference (approximation of the second order) in the uniform grid. Hence, we obtain the M-th order system of ODEs. The system looks as follows:

168 H. Kalis, S. Rogovs dy dt = Λy + f(x,t),x ω h,t 0 y t=0 = u 0 (x),x ω h y x=0 = y x= = 0,t 0, (4) where y = y(x,t), x ω h, t 0, Λy y xx. We are looking for a solution of (4) in the series form y(x,t) = a k (t)w (k) (x),x ω h (5) where w (k) (x) are the eigenvectors of the difference operator ( Λy), a k (t) are unknown functions. Assuming that f(x,t) = M f k(t)w (k) (x),x ω h, where f k (t) = (f,w (k) ) h, we obtain the Cauchy problem for second-order linear ODEs: ȧ k (t) + µ k a k (t) = f k (t) a k (0) = (u 0,w (k) ) h, where µ k = 4 sin ( ) kπh h. The solution of (5) is a k (t) = a k (0)e µ kt + t 0 f k (ξ)e µ k(t ξ) dξ. The MO (4) can be represented in the matrix form: dy dt + AY = F(t),t 0 Y (0) = U 0, (6) where Y (t), F(t), U 0 are M-th order column vectors, A is the diagonal matrix. Taking into account the condition A = W DW and using the transformations Ỹ = WY, F = WF, we obtain the following system: d Ỹ dt + DỸ = F(t),t 0 Ỹ (0) = WY (0) = WU 0. 4.3. FDSES In case when in the diagonal matrix D the eigenvalues µ k are replaced with the eigenvalues λ k, namely, the first M eigenvalues of the differential operator

FINITE DIFFERENCE SCHEMES WHITH EXACT SPECTRUM... 169 ( ), one obtains FDSES. FDSES series representation for (1) is in the x following form: y(x,t) = ã k (t)w (k) (x),x ω h, (7) where ã k (t) = ã k (0)e λ kt + t 0 f k (ξ)e λ k(t ξ) dξ, ã k (0) = (u 0,w (k) ) h, fk (t) = (f,w (k) ) h. Theorem 1. et f(x,t) = M 1 i=1 b i(t)x i (x) and u 0 (x) = M i=1 B ix i (x), where maxm 1,M } M,B i R, b i (t) are integrable functions and X i (x) are the eigenfunctions (8), then the formula (7) is exact. Proof. Since the eigenfunction X i (x), x [0,] and the eigenvectors w (i) (x), x ω h are equal at the grid points, the orthonormal condition implies that M M a k (0) = ( B i X i (x),x k (x)) = B k, k M, ã k (0) = ( B i X i (x), i=1 w (k) (x)) h = B k,k M, and ã k (0) = 0,a k (0) = 0, k > M, i=1 i=1 M 1 f k (t) = ( b i (t)x i (x),x k (x)) = b k (t),k M 1, f k (t) = ( M 1 i=1 b i(t)x i (x),w (k) (x)) h = b k (t),k M 1 and f k (t) = 0, f k (t) = 0, k > M 1. It implies that the functions a k (t) and ã k (t), k = 1,M are equal and a k (t) = 0, k > M. It means that the solutions (analytical and numerical) are equal at the grid points. Example 7. If f(x,t) = e πt sin(πx), u 0 (x) = sin(πx)+ sin(4πx), = 1, then, if M 4, the conditions of the Theorem 1. are satisfied. The exact solution is u(x,t) = (e πt +te πt ) sin(πx)+ 16π 1+e 16π t (16π ) sin(4πx)+ e 16π t sin(4πx). The corresponding numerical results are: u(gds)=0.014, u(gdsps)=8.367 10 17, by M = 4.

170 H. Kalis, S. Rogovs 5. MO and FDSES for an Initial-Boundary Value Problem for the Wave Equation An initial-boundary value problem for the wave equation is as follows: u = u + f(x,t),x (0,),t 0 t x u t=0 = u 0 (x),x [0,] u t t=0 = ũ 0 (x),x [0,] u x=0 = 0,u x= = 0,t 0, (8) where f, u 0, ũ 0 are continuous functions. 5.1. Analytical Solution We are looking for an analytical solution of (8) in the series form (). We determine functions a k (t) from the following Cauchy problem: ä k (t) + λ k a k (t) = f k (t) (9) a k (0) = (u 0,X k ),ȧ k = (ũ 0,X k ), where f k (t) = (f,x k ), λ k = ( ) kπ. The solution of (9) is a k (t) = a k (0)cos( λ k t) + ȧk(0) sin( λ k t) + 1 t λk λk 5.. MO and FDS 0 f k (ξ)sin( λ k (t ξ))dξ. Similarly to 4.., we approximate the differential operator ( ) with the x second order central difference in the uniform grid and obtain the M-th order system of ODEs: d y = Λy + f(x,t),x ω dt h,t 0 y t=0 = u 0 (x), dy dt t=0 = ũ 0 (x),x ω h (30) y x=0 = y x= = 0,t 0, where y = y(x,t), x ω h, t 0. We are looking for a solution of (30) in the series form (5). We determine functions a k (t) from the following, similar to (9), Cauchy problem: ä k (t) + µ k a k (t) = f k (t) a k (0) = (u 0,w (k) ) h,ȧ k = (ũ 0,w (k) (31) ) h,

FINITE DIFFERENCE SCHEMES WHITH EXACT SPECTRUM... 171 where f k (t) = (f,w (k) ) h, µ k = 4 sin ( ) kπh h. The solution of (31) is ak (t) = a k (0)cos( µ k t) + ȧk(0) µk sin( µ k t) + 1 t µk 0 f k(ξ)sin( µ k (t ξ))dξ. The MO (30) can be represented in the matrix form: d Y + AY = F(t),t 0 dt Y (0) = U 0 Ỹ (0) = Ũ0, where Ũ0 is s M-th order column vector. 5.3. FDSES We define FDSES as usual, by replacing the eigenvalues µ k with λ k in the diagonal matrix A. FDSES series representation for (8) is in the following form: y(x,t) = ã k (t)w (k) (x),x ω h, (3) where ã k (t) = ã k (0)cos( λ k t)+ ã k (0) λk sin( λ k t)+ 1 λk t 0 f k (ξ)sin( λ k (t ξ))dξ, ã k (0) = (u 0,w (k) ) h, ã k (0) = (ũ 0,w (k) ) h, f k (t) = (f,w (k) ) h. Theorem. et f(x,t) = M 1 i=1 b i(t)x i (x), u 0 (x) = M i=1 B ix i (x) and ũ 0 (x) = M 3 B i=1 i X i (x), maxm 1,M,M 3 } M, B i, B i R, b i (t) are integrable functions and X i (x) are the eigenfunctions (8), then the formula (3) is exact. Proof. Since the eigenfunction and eigenvectors are equal at the grid points, as in the first proof we have: a k (0) = ã k (0) = B k,k M and a k (0) = 0, ã k (0) = 0, k > M, f k (t) = f k (t) = b k (t),k M 1 and f k (t) = 0, f k (t) = 0, k > M 1, ȧ k (0) = ( M 3 B i=1 i X i (x),x k (x)) = B k,k M, ã k (0) = ( M 3 B i=1 i X i (x), w (k) (x)) h = B k,k M and ȧ k (0) = 0, ã k (0) = 0, k > M 3. It implies that the functions a k (t) and ã k (t), k = 1,M are equal and a k (t) = 0, k > M. It means that the solutions (analytical and numerical) are equal at the grid points. Example 8. If f(x,t) = 0, u 0 (x) = sin(πx), ũ 0 (x) = sin(πx), = 1, then, if M, the conditions of the Theorem. are satisfied. The exact solution is u(x,t) = cos(πt)sin(πx)+ π sin(πt)sin(πx). The corresponding numerical results are: u(gds)=0.0644, u(gdsps)=6.6613 10 16, by M = 4.

17 H. Kalis, S. Rogovs 6. Conclusion Numerical results, obtained using MATAB, show that FDSES is more precise than FDS for solving differential equations, which are in the form u (x) = f(x). For equations, which are in the form u (x) bu(x) = f(x), FDSES is more precise than FDSES or Bahvalov s FDSES. For equations in the form u (x) a u(x) = f(x) FDSES gives more accurate results for small parameter a values. In case when parameter a values are considerably large, FDSES is more precise than FDS only if the number of grid points is large. For PDEs, namely, the heat and wave equations, exact scheme theorems are proved. In this paper, only continuous functions f(x) and differential equations with the boundary conditions of the first kind were considered, however it is possible to develop the theory for equations with boundary conditions of the second and third kind, periodic boundary conditions. Acknowledgments This work is partially supported by the projects 009/03/1DP/1.1.1..0/09/ APIA/VIAA/088 of the European Social Fund and the grant 09.157 of the atvian Council of Science. References [1] A.A. Samarsky, The Theory of Difference Schemes, Nauka, Moscow (1977), In Russian. [] I.P. Gavrilyuk, V.. Makarov, On constructing the best net circuits with exact spectrum, Dopov. Akad. Nauk Ukr. RSR, Ser. A (1975), 1077-1080, In Ukranian. [3] G.M. Kobelkov, N.S. Bahvalov, N.P. Zhidkov, Numerical Methods, Nauka, Moscow (003), In Russian. [4] A.M. Iljin, Difference scheme for solving differential equations with a small parameter values by the highest derivative, Mathematical Notes, 6 (1969), 37-48, In Russian.