DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science

Similar documents
DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science

Lecture 5: Single Step Methods

DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science

Do not turn over until you are told to do so by the Invigilator.

Solutions Preliminary Examination in Numerical Analysis January, 2017

Do not turn over until you are told to do so by the Invigilator.

Numerical Methods - Initial Value Problems for ODEs

Ordinary Differential Equations

Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error. 2- Fixed point

Ordinary Differential Equations II

Ordinary Differential Equations II

Numerical Methods for Ordinary Differential Equations

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester

Ordinary Differential Equations I

Ordinary Differential Equations

8.1 Introduction. Consider the initial value problem (IVP):

AN OVERVIEW. Numerical Methods for ODE Initial Value Problems. 1. One-step methods (Taylor series, Runge-Kutta)

Ordinary Differential Equations I

Differential Equations

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

Numerical Differential Equations: IVP

Mathematics for chemical engineers. Numerical solution of ordinary differential equations

Ordinary differential equations - Initial value problems

The Definition and Numerical Method of Final Value Problem and Arbitrary Value Problem Shixiong Wang 1*, Jianhua He 1, Chen Wang 2, Xitong Li 1

Numerical Methods. Scientists. Engineers

Fourth Order RK-Method

BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination December, 2015 BCS-054 : COMPUTER ORIENTED NUMERICAL TECHNIQUES

Constructing Approximations to Functions

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 2. Predictor-Corrector Methods

= D ( )( ) derivative

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

THE TRAPEZOIDAL QUADRATURE RULE

Numerical differentiation

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations

Introduction to the Numerical Solution of IVP for ODE

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

4 Stability analysis of finite-difference methods for ODEs

Consistency and Convergence

Scientific Computing: An Introductory Survey

Hence a root lies between 1 and 2. Since f a is negative and f(x 0 ) is positive The root lies between a and x 0 i.e. 1 and 1.

Second Order ODEs. CSCC51H- Numerical Approx, Int and ODEs p.130/177

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 1. Runge-Kutta Methods

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9

SBAME CALCULUS OF FINITE DIFFERENCES AND NUMERICAL ANLAYSIS-I Units : I-V

Unit I (Testing of Hypothesis)

Chapter 11 ORDINARY DIFFERENTIAL EQUATIONS

Exact and Approximate Numbers:

Numerical Methods for Differential Equations

NUMERICAL SOLUTION OF ODE IVPs. Overview

2tdt 1 y = t2 + C y = which implies C = 1 and the solution is y = 1

MecE 390 Final examination, Winter 2014

Numerical solution of ODEs

Ordinary Differential Equations

Ordinary Differential Equations: Initial Value problems (IVP)

Introduction to multiscale modeling and simulation. Explicit methods for ODEs : forward Euler. y n+1 = y n + tf(y n ) dy dt = f(y), y(0) = y 0

Ordinary Differential Equations

MTH603 FAQ + Short Questions Answers.

Lecture 10: Finite Differences for ODEs & Nonlinear Equations

M.SC. PHYSICS - II YEAR

Numerical Methods for Differential Equations

5.2 - Euler s Method

CHAPTER 5: Linear Multistep Methods

Ordinary Differential Equations I

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004

NUMERICAL METHODS FOR ENGINEERING APPLICATION

BOUNDARY VALUE PROBLEMS

Computation Fluid Dynamics

Math 128A Spring 2003 Week 12 Solutions

Linear Multistep Methods

TS Method Summary. T k (x,y j 1 ) f(x j 1,y j 1 )+ 2 f (x j 1,y j 1 ) + k 1

. For each initial condition y(0) = y 0, there exists a. unique solution. In fact, given any point (x, y), there is a unique curve through this point,

USHA RAMA COLLEGE OF ENGINEERING & TECHNOLOGY

THE UNIVERSITY OF NEW SOUTH WALES SCHOOL OF PHYSICS PHYS2020 COMPUTATIONAL PHYSICS FINAL EXAM SESSION I Answer all questions

CS 257: Numerical Methods

SRI RAMAKRISHNA INSTITUTE OF TECHNOLOGY, COIMBATORE- 10 DEPARTMENT OF SCIENCE AND HUMANITIES B.E - EEE & CIVIL UNIT I

The iteration formula for to find the root of the equation

Round-off Error Analysis of Explicit One-Step Numerical Integration Methods

1 Ordinary Differential Equations

Subbalakshmi Lakshmipathy College of Science. Department of Mathematics

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)

Numerical and Statistical Methods

ASSIGNMENT BOOKLET. Numerical Analysis (MTE-10) (Valid from 1 st July, 2011 to 31 st March, 2012)

1 Ordinary differential equations

NUMERICAL METHODS. x n+1 = 2x n x 2 n. In particular: which of them gives faster convergence, and why? [Work to four decimal places.

Numerical and Statistical Methods

Numerical Analysis Preliminary Exam 10.00am 1.00pm, January 19, 2018

UNIT II SOLUTION OF NON-LINEAR AND SIMULTANEOUS LINEAR EQUATION

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9

Richarson Extrapolation for Runge-Kutta Methods

FORTRAN 77 Lesson 7. Reese Haywood Ayan Paul

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad MECHANICAL ENGINEERING TUTORIAL QUESTION BANK

Differential Equations

Euler s Method, cont d

APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS

Numerical Methods for the Solution of Differential Equations

Solutions of Equations in One Variable. Newton s Method

Previous Year Questions & Detailed Solutions

Transcription:

DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science ANSWERS OF THE TEST NUMERICAL METHODS FOR DIFFERENTIAL EQUATIONS (WI097 TU) Thursday January 014, 18:0-1:0 1. (a) The amplification factor can be derived as follows. Consider the test equation y = λy. Application of the trapezoidal rule to this equation gives: w +1 = w + h (λw + λw +1 ) (1) Rearranging of w +1 and w in (1) yields (1 h ) λ w +1 = (1 + h ) λ w. It now follows that and thus w +1 = 1 + h λ 1 h λw, Q(hλ) = 1 + h λ 1 h λ. (b) The definition of the local truncation error is τ +1 = y +1 Q(hλ)y. h The exact solution of the test equation is given by y +1 = e hλ y. Combination of these results shows that the local truncation error of the test equation is determined by the difference between the exponential function and the amplification factor Q(hλ) τ +1 = ehλ Q(hλ) y. () h The difference between the exponential function and amplification factor can be computed as follows. The Taylor series of e hλ with known point 0 is: e hλ = 1 + λh + (λh) + O(h ). () 1

1 The Taylor series of with known point 0 is: 1 h λ With (4) it follows that 1+ h λ is equal to 1 h λ 1 1 h λ = 1 + 1 hλ + 1 4 h λ + O(h ). (4) 1 + h λ 1 h λ = 1 + hλ + 1 (hλ) + O(h ). (5) In order to determine e hλ Q(hλ), we subtract (5) from (). Now it follows that e hλ Q(hλ) = O(h ). () The local truncation error can be found by substituting () into (), which leads to τ +1 = O(h ). (c) The trapezoidal rule is stable if 1 + hλ 1. 1 h λ Using the complex valued λ = µ + iν it appears that the condition is equal to: 1 + h (µ + iν) 1 1 h (µ + iν) This is equivalent with (1 + h µ) + ( h ν) (1 h µ) + ( h ν) 1 Since µ 0 it easily follows that (1 + h µ) + ( h ν) (1 h µ) + ( h ν) which implies that and the method is stable. 1 + hλ 1. 1 h λ

(d) Application of the trapezoidal rule to y = (1 + t)y + t, with y(0) = 1, and step size h = 1 gives: w 1 = w 0 + h [ w 0 + 0 w 1 + 1 ]. Using the initial value w 0 = y(0) = 1 and step size h = 1 gives: w 1 = 1 + 1 4 [ 1 w 1 + 1 ]. This leads to 1 1 w 1 = 7 8, so w 1 = 7 1. (e) For the comparison we use the following items: accuracy, stability, and amount of work. Below we make the comparison: Accuracy: since the error of Euler Forward is O(h) and that of the trapezoidal rule is O(h ), the error is smaller for the trapezoidal rule. Stability: since the value of (1+t) is always negative the trapezoidal rule is stable for all step sizes, whereas for Euler Forward the step size should satisfy the inequality h. 1+t Amount of work: since the differential equation is linear the amount of work for the implicit trapezoidal rule is comparable to the work of the explicit Euler Forward method. From the above comparisons we conclude that for this problem the trapezoidal rule is preferred.. a Consider y(x) = x, then y (x) = 1 and y (x) = 0. Hence y (x) + y (x) + y (x) = 0 + 1 + x = x + 1, (7) and hence y(x) = x satisfies the differential equation. Since y(x) = x gives y(0) = 0 and y(1) = 1, we see that y(x) = x also satisfies the boundary conditions. Hence y(x) = x is a solution to the boundary value problem. b On the gridnodes x = h, we approximate all derivatives by difference formulae, and compute truncation errors by expanding Taylor Series around x, to obtain for the first order derivative: dy (k+1) (x ) y(k+1) +1 y(k+1) = h dy (k+1) (x ) y (k+1) +h dy(k+1) (x )+ h d y (k+1) h (x )+ h (x )+O(h 4 ) (8) + y(k+1) h dy(k+1) (x )+ h d y (k+1) (x ) h (x )+O(h 4 ) h = O(h ).

For the second order derivative, we get d y (k+1) (x ) y(k+1) +1 y(k+1) +y (k+1) h = d y (k+1) (x ) y(k+1) +h dy(k+1) (x )+ h d y (k+1) (x )+ h h (x )+O(h 4 ) y (k+1) (9) y(k+1) Herewith, we get h dy(k+1) (x )+ h d y (k+1) (x ) h (x )+O(h 4 ) h = O(h ). d y (k+1) (x i ) + dy(k+1) (x ) + y (k) (x )y (k+1) (x ) ( y(k+1) +1 y(k+1) +y (k+1) h + y(k+1) +1 y(k+1) h + y (k) y (k+1) ) = O(h ), (10) and using the above given difference formulae, we get a local truncation error of O(h ). Regarding the discretization at point x = h, we have w(k+1) +1 w (k+1) h + w (k+1) for {1,..., n}. Here w (k) +1 w (k+1) +w (k) w (k+1) = f(x ) = x h +1 = (h) +1. (11) + w(k+1) represents the approximation under neglecting the truncation error. Substitution of the boundary conditions, w 0 = 0, w n+1 = 1, gives and = 1 : w(k+1) w (k+1) 1 h = n : w(k+1) n h + w (k+1) n 1 y (k) + w(k+1) h w(k+1) n 1 h + w(k+1) 1 w (k) 1 = f(x 1 ) = h + 1, (1) +w(k) n w n (k+1) = (1 h) +1+ 1 h 1 h. (1) c We consider h = 1, which means that n = (note that (n + 1)h) = 1), and that, using the iteration procedure given in the assignment, we get the following system 18w (k+1) 1 9w (k+1) + w(k+1) + w (k+1) 1 w (k) 1 = 1 + 1 = 10, 9 9 (14) 18w (k+1) 9w (k+1) 1 w(k+1) 1 + w (k+1) w (k) = 4 + 1 + 9 = 11. 9 18 Substituting w (0) 1 = w (0) = 0, gives 18w (1) 1 7.5w (1) = 10 9, 10.5w (1) 1 + 18w (1) = 11 18. (15) Solution of this system gives w (1) 1 0.5508 and w (1) 0.70404. 4

d Newton Raphson s Method is an iterative method to find y R such that f(y) = 0. One constructs a sequence of successive approximations {y (k) }. Given the k th estimate, then y (k+1) is obtained through linearizing around y (k) and by finding y (k+1) by determining the point where the linearization (tangent) equals zero. Linearization of f(y) around y (k) gives (upon neglecting the error) f(y) f(y (k) ) + f (y (k) )(y y (k) ) =: L(y; y (k) ), (1) for any y provided the second derivative of f(y) is bounded and where L(y; y (k) ) denotes the tangent (linearization) of f(y) at point (y k, f(y (k) )). Then the next point is found upon setting L(y (k+1) ; y (k) ) = 0: f(y (k) ) + f (y (k) )(y (k+1) y (k) ) = 0. (17) The above equation is solved for y (k+1), and gives y (k+1) = y (k) f(y(k) ) f (y (k) ), (18) which is the famous Newton Raphson formula for root finding. Remark 1 One can also give a graphical derivation, or alternatively using a derivation from first principles using L(y; y (k) ) = a 0 + a 1 y, where a 0 and a 1 need to be determined using L(y (k) ; y k ) = f(y (k) ), L (y (k) ; y (k) ) = f (y (k) ) and L(y (k+1), y (k) ) = 0. e First, we rewrite the system into the form by setting f 1 (w 1, w ) = 0, f (w 1, w ) = 0, f 1 (w 1, w ) := 18w 1 9w + (w 1 ), f (w 1, w ) := 9w 1 + 18w + (w ) 9. We denote the Jacobi matrix by J(w 1, w ). At the first step we compute (19) (0) w (1) = w (0) J(w (0) ) 1 F (w (0) ), (1) where w = [w 1 w ] T. Note that ( ) J(w (0) 18 + w (0) 1 9 ) = 9 18 + w (0). () Using w (0) 1 = w (0) = 0 we obtain: J(w (0) ) = 5 ( ) 18 9. () 9 18

This implies that Furthermore so w (1) = J(w (0) ) 1 = ( ) 0 0 F (w (0) ) = ( ) 1 18 9. (4) 18 81 9 18 ( ) 0, (5) 9 ( ) ( ) 1 18 9 0 18 81 9 18 9 = ( 1 ). ()