Numerical Methods for Ordinary Differential Equations

Size: px
Start display at page:

Download "Numerical Methods for Ordinary Differential Equations"

Transcription

1 Numerical Methods for Ordinary Differential Equations Answers of the exercises C Vuik, S van Veldhuizen and S van Loenhout 08 Delft University of Technology Faculty Electrical Engineering, Mathematics and Computer Science Delft Institute of Applied Mathematics

2 Copyright 08 by Delft Institute of Applied Mathematics, Delft, The Netherlands No part of this work may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission from Delft Institute of Applied Mathematics, Delft University of Technology, The Netherlands

3 Contents Introduction Solutions Interpolation 4 Solutions 4 3 Numerical differentiation 8 3 Solutions 8 4 Nonlinear equations 4 Solutions 5 Numerical integration 6 5 Solutions 6 6 Numerical time integration of initial-value problems 0 6 Solutions 0 7 The finite-difference method for boundary-value problems 33 7 Solutions 33 8 The instationary heat equation 39 8 Solutions 39 i

4 Chapter Introduction Solutions We notice that the n th order Taylor polynomial about the point x = c from an (n+) times differentiable function is given by P n (x) = f(c)+(x c)f (c)+ (x c)! f (c)+ + (x c)n f (n) (c) n! The upper bound for the error in x = d is P n (d) f(d) = R n (d), in which for a ξ between x en c R n (x) = (x c)n+ f (n+) (ξ), (n+)! The second order Taylor polynomial of f(x) = x 3 about the point x = is then given by P (x) = f()+(x )f ()+ (x ) f () =! = +3(x )+3(x ) It now follows that P (05) = 05 The upperbound for the error in x = 05 is given by R (05) = (05 )3 3! f (ξ) = (05 )3 6 = 05 3! The actual error easily can be calculated with P (05) f(05) Note that for this problem the actual error is equal to the upper bound of the error

5 First, note that f (i) (x) = e x for all i N So the n th order Taylor polynomial of f(x) = e x about the point x = 0 is given by P n (x) = +x+ x + + n! xn The error R n (x) for x [0,05 must be smaller than 0 6 So we need an n such that R n (x) 0 6 for x [0,05, in which for a ξ between 0 and x R n (x) = (x)n+ (n+)! eξ, To make sure that R n (x) is smaller than 0 6 on the entire interval, we need to find a n such that (05) n+ (n+)! e () Conclude this yourself Trying some values of n, for example n = 5,6,7, gives that n = 7 is the smallest value which satisfies condition () 3 We use the polynomial P (x) = x to approximate f(x) = cosx It appears that if we take the third order Taylor polynomial about the point x = 0, this is equal to P (x) The first, second and third derivative of f(x) are given by f(x) = cosx f (x) = sinx f (x) = cosx f (x) = sinx The third order Taylor polynomial of f(x) = cosx about the point x = 0 is given by P 3 (x) = cos0 xsin0+ x = x = P (x) cos0 x3 3! sin0 An upperbound for the error is R 4 (x) = 4! x4 f (iv) (ξ) = 4! x4 cosξ, for a ξ between 0 and x We need to find an upperbound of R 4 (x) Notice that cosξ and x 4 ( ) 4 for x [, So an upperbound for R 4(x) is ( ) 4 = !

6 4 It is given that x = 3 so we know that fl(x) = , because we need to calculate with a precision of three digits In the same way it follows from y = 5 7 that fl(y) = To give an example we will calculate fl(fl(x)+fl(y)) and x+y and also the rounding error fl(x)+fl(y) = ( ) 0 0 = So fl(fl(x)+fl(y)) is equal to ; because we need to calculate with a precision of three digits The rounding error, also called the absolute error, is given by (x+y) fl(fl(x)+fl(y)) = = The other calculations with the floating point numbers can be done in the same way The answers are given in the table below fl(x y) x y absolute error * / An example program is: mu=; while +mu> mu=mu/; end The end value of µ is then the machine precision of your system 3

7 Chapter Interpolation Solutions (a) Theorem gives the following equation and we need to prove that f(x) L (x) = (x x 0)(x x )f (ξ) () f(x) L (x) 8 (x x 0 ) max ξ (a,b) f (ξ) () We use the fact that (x x 0)(x x ) has a maximum in x = x 0+x and we do following steps f(x) L (x) = (x x 0)(x x )f (ξ) (x 0 +x x 0 )( x 0 +x x ) max ξ (a,b) f (ξ) = 8 (x x 0 ) max ξ (a,b) f (ξ) (b) The difference between the exact polynomial L and the perturbed linear interpolation polynomial ˆL is bounded by ( ) L (x) ˆL x x + x x 0 (x) ε x x 0 using the proof of Theorem 3 For x [x 0,x we can easily see that ( ) ( ) L (x) ˆL x x + x x 0 x x+x x 0 (x) ε = ε = ε x x 0 x x 0 because x x > 0 and x x 0 > 0 For x x we obtain the following ( ) L (x) ˆL x x + x x 0 (x) ε = x x 0 4 ( x x +x x 0 x x 0 ) ε

8 ( ) ( (x x 0 )+(x x ) = ε = + x x ) ε x x 0 x x 0 because x x < 0 and x x 0 > 0 In x = 3, our function f(x) = x has value f(3) = 3 = We are going to approximate f(3) with the second degree Lagrange polynomial, using nodes x 0 =,x = 5 en x = 4 The second degree Lagrange polynomial of f(x) is given by L (x) = f(x k )L k (x) = = L 0(x)+ 5 L (x)+ 4 L (x) The approximation of f(3) is equal to L (3), which is given by L (3) = L 0(3)+ 5 L (3)+ 4 L (3) k=0 Following the theorem of Lagrange, we can calcute L i (x), i = 0,, in x = 3: So L (3) is equal to L 0 (3) = (3 x )(3 x ) (x 0 x )(x 0 x ) = (3 5)(3 4) ( 5)( 4) = 05, L (3) = (3 x 0)(3 x ) (x x 0 )(x x ) = (3 )(3 4) (5 )(5 4) = 4 3, and L (3) = (3 x 0)(3 x ) (x x 0 )(x x ) = (3 )(3 5) (4 )(4 5) = 6 L (3) = ( 05) = (i) The cubic spline s of the function f(x) = x is an interpolation spline of degree 3 with nodes x 0 = 0,x = en x = With the definition of the natural spline of degree 3 it follows that s is a third degree polynomial on each subinterval [0, and [,, in which there is a special condition in x = for the connection We would like to determine s( ) Note that it is sufficient to determine the spline s 0(x) In Section 5 is shown that we need to solve the following equation for b ( f f (h 0 +h )b = 3 f ) f 0 h h 0 (3) You can also see in this section that b 0 = b = 0 With the knowledge that h i = x i+ x i and f i = f(x i ) we obtain ( (+)b = 3 0 ), 5

9 and so we know that b = 0 With formula a 0 = 3h 0 (b b 0 ) we obtain a 0 = 0 With the next formula we got that c 0 = c 0 = f f 0 b 0 +b h 0 h 0 3 The value of d 0 is given by d j = f j which is 0 for d 0 The spline s 0 (x) on the interval [0, is then given by s 0 (x) = a 0 (x x 0 ) 3 +b 0 (x x 0 ) +c 0 (x x 0 )+d 0 = x We conclude that de spline s in x = is exact, namely s( ) = (ii) In this case the function f is given by f(x) = x So we need to solve the following equation ( f f (h 0 +h )b = 3 f ) f 0 h h 0 After substituting the known values, we obtain 4b = 6, so b = 5 We know that b 0 = b = 0 and also that The coefficient c 0 is equal to a 0 = 3h 0 (b b 0 ) = 3 (5 0) = c 0 = f f 0 b 0 +b h 0 h 0 3 = We also know that d 0 = f 0 = 0 The spline s 0 (x) on the interval [0, is then given by Substituting the value of x gives s 0 (x) = x3 + x s 0 ( ) = 5 6 We conclude that the cubical spline is not exact for the function f(x) = x ; f( ) = 4 4 (a) The Lagrange polynomial is given by L 3 (x) = 0 (x )(x )(x 3) (0 )(0 )(0 3) + (x 0)(x )(x 3) ( 0)( )( 3) +05 (x 0)(x )(x 3) ( 0)( )( 3) + (x 0)(x )(x ) (3 0)(3 )(3 ) 6

10 This can be simplified to L 3 (x) = x3 4 x + 3 x In order to find the speed we take the derivative L 3 (x) = 4 x x+ 3 and to determine the accelaration we differentiate again L 3(x) = x The acceleration is zero at x =, but this corresponds to a minimum acceleration The maximum acceleration is achieved at x = 3 and is the corresponding speed is 7 km/min (b) Following the procedure in the book, we find the following spline: s (x) = 8 5 x 30 x3, 0 x ; s (x) = (x ) 0 (x ) + 6 (x )3, x ; s 3 (x) = + 5 (x )+ 5 (x ) 4 30 (x )3, x 3 For the velocity we get v (x) = x, 0 x ; v (x) = (x )+ (x ), x ; v 3 (x) = (x ) 5 (x ), x 3 The maximum speed is achieved at the end point and is 7 5 km/h km/min, which is 68 7

11 Chapter 3 Numerical differentiation 3 Solutions First we notice that f C 3 [x h,x + h means that f is three times continuous differentiable on[x h, x+h So the first, second and third derivative of f are continuous on [x h,x+h We need to prove : f (x) Q(h) = O(h ), in which Q(h) is given by Q(h) = f(x+h) f(x h) h The Taylor expansion from f(x+h) about x with truncation error O(h 3 ) is f(x+h) = f(x)+hf (x)+ h f (x)+o(h 3 ) (3) We have the following expansion for f(x h) about x with truncation error O(h 3 ): Subtracting (3) from (3) gives us which is the same as f(x h) = f(x) hf (x)+ h f (x)+o(h 3 ) (3) f(x+h) f(x h) = hf (x)+o(h 3 ), (33) f(x+h) f(x h) h The order of the truncation error is now given by = f (x)+o(h ) f (x) Q(h) = f (x) f(x+h) f(x h) h = = f (x) f (x) O(h ) = O(h ) 8

12 The position of the ship during start up is given by S(t) = 05at The velocity is approximated by a backward difference with step size h, so S b S(t) S(t h) (t) h To determine the truncation error we expand S(t h) about point t with a Taylor polynomial of order ; S(t h) = S(t) hs b h (t)+ S (ξ), (34) with ξ (t h,t) Given the fact that S (t) = a, we can re-order (34) to So the truncation error is ah S b S(t) S(t h) (t) = h ah We can determine the measurement error in the speed as follows; we already now that the measurement error is less than 0 meters So the approximated speed with measurement errors is given by; S b S(t)±0 S(t h)±0 (x) h This means that the measurement error in the approximated speed is bounded by 0 h The total error in the approximated speed is the sum of the truncation error and the measurement error With a = 0004 the total error (te) is given by te(h) = 000h+ 0 h The error in the calculated velocity is minimal in the minimum of the function te For positive step size h, the minimum is equal to h = 00 This can be obtained by setting te (h) = equal to zero The total error in the speed is then equal to h te(00) = 04m/s 3 (a) An upper bound for the truncation error is h f(4) (ξ) h because f (4) (ξ) = sinξ An upper bound for the rounding error is 4ǫ h So an upper bound for the total error E tot is given by E tot h + 4ǫ h To minimize this upper bound, we need to calculte when the derivative is equal to zero h 6 8ǫ h 3 = 0 h opt = (48ǫ)

13 h Q (h) sin() Q (h) e e e-09 e e-07 e e-05 e e (b) The table below gives Q (h) and the error for different values of h The experiments show that the optimal value of h is about 0 4 This value is close to the value determined in part (a) 4 The central difference formula Q(h), approaches the unknown value M, in this case f (), in which the error has the form M Q(h) = c p h p Given that the error in the central difference approximation is of order two, it follows that p = f(x) = sinx, h = 0 and f (x) is approximated by a central difference, so f () Q(0) = sin() sin(09) 0 = Conclude for yourself that the error, cos sin() sin(09) 0, is equal to For h = 0 we obtain that Q(0) = With the formula c p = Q(h) Q(h) (h) (( )p ), we found that with p = and h = 0 that c p = 009 Now it follows that M Q(h) = c p h p = This is a good estimate of the error by Richardson s extreapolation 5 We look for a Q(h) such that f (x) Q(h) = O(h k ), with k maximal, with f(x), f(x+h) and f(x+h) given When the error is minimal, the k is maximal Notice that Q(h) is given by Q(h) = α 0 h f(x)+ α h f(x+h)+ α f(x+h) (35) h 0

14 Taylor expansion of f(x), f(x+h) and f(x+h) about x gives f(x) = f(x), (36) f(x+h) = f(x)+hf (x)+ h f (x)+o(h 3 ), (37) f(x+h) = f(x)+hf (x)+ 4h f (x)+o(h 3 ) (38) The values of α 0, α and α can be obtained by substituting (36), (37) and (38) into (35) Note that the coefficient in front of f(x) and f (x) must be equal to zero and that the coefficient in front of f (x) must be equal to one This gives the following 3 3 system α f(x) : 0 h + α α h + h = 0, f (x) : α + α =, (39) f h (x) : α + hα = 0 Solving (39) yields Such that α 0 = 3 α = α = Q(h) = 3f(x)+4f(x+h) f(x+h) h The truncation error to approximate f (x) is given by O(h ), because f (x) Q(h) = f (x) f (x)+o(h )

15 Chapter 4 Nonlinear equations 4 Solutions Wewant todeterminep 3 ontheinterval [,5 Firstweneedtocheck iff(a) = f( ) and f(b) = f(5) have opposite signs With f(x) = 3(x+)(x )(x ) we find that So they have opposite signs f(a) = f( ) = f(b) = f(5) = To start, we take a 0 = a and b 0 = b and the new approximation for the zero is computed by p 0 = (a 0 +b 0 ) = 05 The stopping criterion is not satisfied, because f(p 0 ) = 0 0 So we construct a new interval [a n+,b n+ f(p 0 )f(a 0 ) < 0 so we choose a = a 0 and b = p 0 This leads to p = 5 and f(p ) = 95 Now we have that f(p )f(a ) > 0 so we choose a = p and b = b This gives the value p = and f(p ) = 879 So f(p )f(a ) < 0, so we choose a 3 = a and b 3 = p such that p 3 = 099 We can determine p 3 in the same way for interval [ 5,5 (i) We start with the following fixed-point method: p n = 0p n + p n (4) Define the function g as 0x+ x g(x) = Recursion (4) can now be written as p n = g(p n ) The fixed point is the value of p for which: g(p) = p This leads othe following equation p = 0p+ p

16 Which is equivalent to Rewriting leads to p 3 = and so p = 0p+ p p = 3 The fixed point is p = 3 The convergence speed is given by g (p) Conclude yourself that g (x) = 0 x 3, and so g (p) = If p 0 is equal to then with p = g(p 0 ) we find p = With p = g(p ) we have 0p 0 + p 0 = 0+ = 4 = 954 In the same way we have p = p (ii) For the next fixed-point method, we define g(x) as g(x) = x x3 3x, so p n = g(p n ) Conclude yourself that the fixed point p = g(p) is obtained by solving p 3 = 0 where we assume that 3p 0 Again we find p = 3, note that our assumption is satisfied The convergence speed is given by g (p) The first derivative of g(x) is g (x) = 3 4 x 3 So we found g (p) = 3 4 = 0 With Theorem 44 we can see that the second method converges faster With p 0 = we get the following values of p i, i =,,3 p = 76667, p = 530 and p 3 =

17 3 (a) The linear interpolation polynomial l(x) is given by See also Chapter l(x) = f(p 0 )+ x p 0 p p 0 (f(p ) f(p 0 )) (b) The new point p is the point where l(p ) = 0 With (a) we have to solve p from Solving this gives f(p 0 )+ p p 0 p p 0 (f(p ) f(p 0 )) = 0 p = p 0 + (p p 0 )f(p 0 ) f(p 0 ) f(p ) A general method for computing p n from p n and p n can be obtained in the same way Then we have the following equation p n = p n + (p n p n )f(p n ) f(p n ) f(p n ) (c) With the formula from (b) it follows that p = + So we have the following expression for p 3 : f() f() f() = 4 3 p 3 = + (4 3 )f() f() f( 4 3 ) = 7 5 = 4 4 We determine an approximation of the zero of f(x) = x cosx on the interval [ 0, π using the Newton-Raphson method With start approximation p 0 = 0 we can generate the sequence {p n } N n=0, with N such that the error is smaller than 0 4, using p n = p n f(p n ) f (p n ) We take the following stop criteria: Stop if the fourth decimal does not change in two following iterations Newton-Raphson has a quadratic convergence so this means that the error is smaller than 0000 Every iteration p n should be determined with four decimals Starting with p 0 = 0 we obtain that p = 0+ 0 cos0 = cos0 = +sin0 p is given by p = + cos +sin Notice that we approximate the solution of the equation x = cosx 4

18 In the same way we obtained p 3 = 0739 p 4 = 0739 p 3 and p 4 are identical in four decimals which means that the error is smaller than The system that needs to be solved is { x y 3 = 0 x+y + = 0 In vector notation, this is equal to F(x) = 0 with x = [x,y T The Jacobian matrix of F(x) is ( ) x J(x) = y With starting vector x (0) = [, T the first iteration is given by x () = x (0) J(x (0) ) F(x (0) ) = ( ) ( ) ( ) 3 = = ( ) )( ) ( = ( ) = In the same way we found x () = ( ) ( 6 3 We used the following formula for calculating the inverse of a matrix If ( ) a b A =, c d and ad bc 0, then A is invertible and A is given by ( ) A d b = ad bc c a This is also known as Kramer s rule for matrices ) 5

19 Chapter 5 Numerical integration 5 Solutions We want to compute the following integral b a f(x)dx, with a =, b = and f(x) = (0x) We assume that the relative rounding error in the function values is less than ε: f(x) ˆf(x) f(x) ε, Now we can determine the following upperbound for the relative rounding: b a f(x)dx b ˆf(x)dx a b Kε, a f(x)dx in which K is called the condition number of the integral The condition number is defined by b a K = f(x) dx b a f(x)dx See page 59 of the textbook (a) The relative rounding error is Kε To calculate the condition number we need to determine the following two integrals: ( (0x) ) dx and The first integral gives us (0x) dx ( (0x) ) dx = 000 6

20 We need to split the second integral into two parts So we obtain (0x) dx = (0x) 3 000dx + 00 (0x) dx = 500 The relative rounding error is equal to ε = 5 05 ε (b) The relative rounding error in the function values is less than (or equal to) ε, so the absolute rounding error is equal to f(x) ˆf(x) f(x) ε With f(x) = (0x) it follows that the absolute rounding error of the integral when we choose ε = is given by ε(0x) 3 dx = 0 ε(0x) 3 dx = 0 5, The truncation error of the Midpoint rule is given by b a 4 h M, in which M is the maximum of f (x), x [, The second derivative of f is f (x) = 6000x So the maximal truncation error is equal to 500h We have a good assumption for the intergral if the rounding error and the truncation error are in balance We have to notice that both errors can t be avoided (in our case) and so we have a good estimation if the errors are equal So the step size h must fulfil 500h = 0 5, so h 0 4 In this exercise we determine or estimate the integral 05 x4 dx with the following methods: (i) Exact (ii) Trapezoidal (iii) Composite Trapezoidal When 05 x4 dx is calculated exact, we obtain 05 x 4 dx = ( ) 5 x5 = 05 5 ( (05)5 ) =

21 With the Trapezoidal rule we receive 05 x 4 dx 05 ( (05) 4 4) = An estimate of the error can be determined with Theorem 533 of the book The estimate of the error with f (x) = x is given by ( 05) 3 ( ) max x [x R,x L f (x) = (05) 3 = 05 The real error is = 0079 Thesameintegral iscalculated withthecompositetrapezoidal rule 3 We have h = 05, so x 0 = 05, x = 075 en x =, the integral is approximated by ( x 4 dx 05 (05)4 +(075) 4 + ) 4 = The error is estimated by Richardson s method So we must also approximate the integral with the composite Trapezoidal rule with h = 05 This approximation is 0983 From the error estimation follows that α =, so c p = Q(h) Q(h) h ( ) = 090 See Chapter 3 It follows that the estimate of the error is equal to M N(h) = c p (h) p = 008 The real error is 008, so the estimate with Richardson is very good 3 For the Trapezoidal rule we use intervals with the same lengths, so h = 05 and x 0 =, x = 5 and x = 5 Using the composite Trapezoidal rule, we obtain 5 ( x 7 dx 05 ()7 +(5) 7 + ) (5)7 = 345 Trapezoidal rule: xr x L f(x)dx xr xl (f(x L)+f(x R)) Theorem 533 For m = max x [xl,x R f (x) holds xr xr xl f(x)dx (f(x L)+f(x R)) x L m(xr xl)3 3 Composite Trapezoidal: I T = h n ( (f(x k )+f(x k )) = h f(xl)+f(xl +h)+ +f(xr h)+ ) f(xr), k= in which h = x R x L and x n k = x L +kh For the error follows: xr f(x)dx I T M(xR xl)h where,again, M = max x [xl,x x L R f (x) 8

22 The error for this rule is calculated with f (x) = 4x 5, (5 ) 3 ( ) max x [x R,x L f (x) = (05) = 33 Using Simpson s rule 4 gives us 5 ( x 7 dx (5)7 + 3 (5)7 + 3 (375)7 + ) 6 (5)7 = The error is calculated with Theorem 534 of the book 5 The estimate of the error with f (4) = 840x 3 is given by (5 ) ( ) max x [x R,x L f(4) (x) = (05) = 003 If we compare our results with Table 53 of the book, we can see that the Simpson s rule is better than the -point Gauss quadrature rule 4 Simpson s rule n ( f(x k )+4f ( xk +x ) ) k +f(x k ) I S = h 6 k= ( = h 6 f(a)+ 3 f(a+ h)+ 3 f(a+h)+ 3 f(a+ 3 h)+ + 3 f(b h)+ 6 f(b) 5 Theorem 534 For m 4 = max x [xl,x R f (4) (x) holds xr xr xl f(x)dx (f(x L)+4f(x M)+f(x R)) x L m4(xr xl)5 ) 9

23 Chapter 6 Numerical time integration of initial-value problems 6 Solutions The Modified Euler method approximates the solution to an initial-value problem y = f(t,y) in the following way: Suppose that the numerical approximation w n of y(t n ) is known Then we can compute the following predictor and corrector: predictor : w n+ = w n + tf(t n,w n ), corrector : w n+ = w n + t (f(t n,w n )+f(t n+,w n+ )) The initial-value problem in this exercise is given by { y = +(t y), t 3 y() = The solution is given by y(t) = t+ t With a time step t = 05 we need to determine the following values of w for t 3: w 0 = y(), w = y(5) and w = y(3) From the initial condition we obtain that w 0 = y() = So the error in this point is equal to zero 0

24 The approximation of y(t) at the time t = 5 follows with the Modified Euler Method, w = w 0 + tf(t 0,w 0 ) = = +05 ( +( ) ) = = +05 =, w = w 0 + t (f(t 0,w 0 )+f(t,w )) = = +05 ( +(+(5 ) ) ) = = = 85 The solution y(t) gives the value 8333 in t = 5 So the error in the numerical approximation is 0008 In the second step of the Modified Euler Method we obtain w = 5488, w = 486 The solution in t = 3 gives y(3) = 5 So the error in the numerical approximation is 0084 A summary of the results is shown in the table below i time t y(t) w i error The local truncation error τ n+ of the Midpoint method is defined by τ n+ = y n+ z n+ in which t ( ( z n+ = y n + t f t n + t,y n + t )) f(t n,y n ) Taylor expansion of y n+ about y n gives Using this in τ n+ gives y n+ = y n + ty n + t y n +O( t3 ) τ n+ = y n + t y n f(t n + t,y n + t f(t n,y n ))+O( t ) (6) Thesecond step istoexpandf(t n + t,y n+ t f(t n,y n )) inataylor series about(t n,y n ) This gives f(t n + t,y n + t f(t n,y n )) = f(t n,y n )+ t f t(t n,y n )+ t f y(t n,y n )y n +O( t )

25 We will use that y = f(t,y) The second derivative in time of y is then given by y = f t +f y y So and y n = f(t n,y n ) (6) y n = (f t +f y y ) n = f t (t n,y n )+f y (t n,y n )y n (63) Using the Taylor series of f(t n + t,y n + t f(t n,y n )) in (6) gives us τ n+ = y n + t y n f(t n,y n ) t f t(t n,y n ) t f y(t n,y n )y n +O( t ) (64) To show that the Midpoint rule is of order two, it is sufficient to see that y n + t y n f(t n,y n ) t f t(t n,y n ) t f y(t n,y n )y n = 0 (65) With (6) and (63) we see that (65) holds The conclusion is that the Midpoint rule is of order two 3 (i) The Trapezoidal method to solve an initial-value problem is given by w n+ = w n + t (f(t n,w n )+f(t n+,w n+ )) (66) Note that the Trapezoidal method is an implicit method to approximate the solution of the initial-value problem y = f(t,y) The amplification factor Q(λ t) is determined in the following way; consider the test equation y = λy Using the Trapeziodal method on this test equation gives a Q(λ t) such that w n+ = Q(λ t)w n Using (66) on the test equation y = λy gives: w n+ = w n + t(λw n +λw n+ ) (67) Restructuring of w n+ and w n in (67) gives ( ) λ t w n+ = (+ ) λ t w n So and thus w n+ = + λ t λ tw n, Q(λ t) = + λ t λ t

26 (ii) In paragraph 64 in the book on page 74 we find that the truncation error is given by τ n+ = y n+ Q(λ t)y n t The exact solution of the test equation is y n+ = y n e λ t When we combine these results we can obtain that the truncation error of the test equation is determined by the difference of the exponential function and the amplification factor Q(λ t): τ n+ = eλ t Q(λ t) y n (68) t We determine the difference between the exponential function and the amplification factor in the following way: () Taylor expansion of e λ t () Taylor expansion of λ t multiplied by + λ t (3) Subtract: () () The Taylor expansion of e λ t around 0 is: e λ t = +λ t+ (λ t) +O(h 3 ) (69) The Taylor expansion of around 0 is: λ t λ t = + λ t+ 4 λ t +O( t 3 ) (60) With (60) we obtain that + λ t is equal to λ t + λ t λ t = +λ t+ (λ t) +O( t 3 ) (6) To determine e λ t Q(λ t), we need to substract (6) of (69) e λ t Q(λ t) = O( t 3 ) (6) The truncation error is now given by using (6) in (68) We obtain that τ n+ = O( t ) (iii) In paragraph 64 on page 7 it is shown that a numerical method is stable if and only if Q(λ t) 3

27 The amplification factor of the Trapezoidal method is Q(λ t) = + λ t λ t We need to show that if λ 0 then it follows that Q(λ t) for all step sizes t > 0 From Q(λ t) we know that the following inequalty must hold + λ t λ t Multiplying this inequality with λ t gives + λ t + λ t λ t (63) Note that ( λ t) 0, so the sign in the inequality remains the same To show stability for all t we have to check that (63) holds for all t We start with the left-hand inequality (63), + λ t + λ t This inequality holds for all t > 0 if λ 0 We receive the same result for the right-hand inequality (63), + λ t λ t This inequality holds for every t > 0 The conclusion is that the method is stable for all t > 0 if λ 0 4 We consider the nonlinear initial-value problem y = f(t,y) with f(t,y) = +(t y) To investigate the stability of Modified Euler at the point (t =,y = ) we need the following results: The amplification factor of Modified Euler Linearisation of f(t, y) The amplification factor of Modified Euler is See paragraph 64 from the book Q(λ t) = +λ t+ λ ( t) The linearisation of f(t,y) about the point (t,y) = (,) is f(t,y) f(,)+(t ) f (,)+(y ) f t y (,) = = +(t ) (y ) = y +t = y +g(t) The initial-value problem after linearisation is given by y = y +g(t) 4

28 For stability it is sufficient to consider y = y Note that this is the test equation with λ = Modified Euler is stable if Q(λ t) with λ = So the method is stable if for the step size t the following holds t+ t The left-hand inequality t+ t holds if t 0 The right-hand inequality t+ t if So the stability condition is given by t 0 t 5 (a) The method in this exercise is defined by w n+ = w n +β tf(t n,w n ) (64) w n+ = w n+ +( β) tf(t n +β t, w n+ ) (65) We follow the steps as in determining the local truncation error in the Modified Euler method in paragraph 64 in the book We start with replacing the numerical approximation w n by the exact value y n, so z n+ = y n +β tf(t n,y n ) (66) z n+ = z n+ +( β) tf(t n +β t, z n+ ) (67) We start with the Taylor expansion of f(t n +β t, z n+ ) about the point (t n,y n ): f(t n +β t, z n+ ) = f(t n,y n )+β t(f t ) n +( z n+ y(t n ))(f y ) n + β t (f tt ) n + + ( z n+ y(t n )) (f yy ) n +β t( z n+ y(t n ))(f ty ) n (68) With equation (66) we obtain that (68) is equal to f(t n +β t, z n+ ) = f(t n,y n )+β t(f t +ff y )+O( t ) (69) Subsituting (69) in (65) gives us z n+ = y n +β tf(t n,y n )+( β) tf(t n,y n )+( β)β t (f t +ff y ) n +O( t 3 ) = = y n + tf(t n,y n )+( β)β t (f t +ff y ) n +O( t 3 ) The Taylor expansion of y n+ is given by y n+ = y n + ty n + t y n +O( t 3 ) 5

29 Using the fact that y = f(t,y) we can obtain that y n+ z n+ is equal to ( ) y n+ z n+ = t β( β) t y n +O( t 3 ) = O( t ) The last equality follows from the fact that β( β) is not equal to zero for every β Now it s easy to see that the local truncation error τ n+ is given by y n+ z n+ t = O( t) (b) The amplification factor is determined by using the method on the test equation y = λy With f(t n,w n ) equal to λw n in (64) and (65) we can obtain: Substituting w n+ in (60) gives us w n+ = w n +βλ tw n w n+ = w n+ +( β)λ t w n+ (60) w n+ = w n +βλ tw n +( β)λ t(w n +βλ tw n ) = = ( +βλ t+( β)λ t+β( β)(λ t) ) w n = = ( +λ t+β( β)(λ t) ) w n = = Q(λ t)w n The amplification error is Q(λ t) = +λ t+β( β)(λ t) (c) The nonlinear differential equation y = f(y) with f(y) = y 4y need to be linearized about y = We obtain that the linearisation of f(y) about y = is given by f(y) f( )+(y )f ( ) = y + So the linearized differential equation is equal to y = y + For stability it is sufficient to check the equation y = y This is the test equation with λ = The test equation is stable if the following holds: Q(λ t) voor λ = en β = Using the value of Q(λ t) gives that for step size t the inequality must satisfy t+ t The right inequality holds if t The left inequality also satisfies this condition (and we can t find a more strict condition) The conclusion is that the method is stable in this point if t 6 The vector notation for the Forward Euler method is given by w n+ = w n + tf(t n,w n ) 6

30 In our case we have the value t =, and f(w n ) = [ w n = [ w (n) w (n) 4w (n) w (n) +e tn 3w (n) +w (n) With the initial values we know the vector w 0 : [ 0 w 0 = So the first step of Forward Euler is w = w 0 + tf(w 0 ) = [ 0 = +0 [ 03 = [ 3 7 We use Paragraph 68 of the book In this exercise we have a second order initial value problem We first consider a simplified initial-value problem for a linear differential equation So we rewrite our differential equation to a system of two first order differential equations: { y = y y = y +y +te t t with initial values { y (0) = 0 y (0) = 0 Using Euler Forward with t = 0 gives us [ [ [ y () y (0) y () = y (0) +0 = [ 0 0 The numerical solution is zero after one time step = y (0) y (0) +y (0) +0 e 0 0 The solution of this problem is 6 t3 e t te t +e t t At t = 0, the solution has the value y(0) = The error is thus equal to the value of the solution 8 Stable integration of a system of differential equations, written as y = Ay, is only possible if all eigenvalues of the matrix A have a real part smaller or equal to zero = 7

31 In this excersie we consider a mathematical pendulum The angle as a function of t satisfies: φ + g φ = 0 (6) L This second order differential equation can also be written as a system of two first order differential equations So (6) is equivalent to { φ = φ φ = g L φ (6) If we define vector ψ as then (6) can be written as ψ = [ φ φ ψ = Sψ met S = The eigenvalues of S are calculated by setting, S λi = 0 equal to zero The eigenvalues are the roots of λ + g L = 0 [ 0 g L 0 It follows that λ, = ±i stable g L The real part of both eigenvalues is zero, so the system is 9 We consider the system { y = 95y +995y y = 97y 997y, with initial values { y (0) = y (0) = We define the following vector on time t = n t [ w (n) w n+ = w (n) Euler Forward is given by and Euler Backward by with f(w n ) = w n+ = w n + tf(w n ), w n+ = w n + tf(w n+ ), [ 95w (n) +995w (n) 97w (n) 997w (n) 8

32 [ (a) Choose step size t = 0, with w 0 = w is given by we obtain that for Euler Forward w = w 0 + tf(w 0 ) [ = +0 [ 640 = 6368 [ ( ) ( ) = Euler Backward gives us the following linear system that needs to be solved: [ w () [ [ [ w () w () = w () (63) Reordering in (63) gives [ w () w () = [ [ I = [ [ = [ 83 = 490 [ Notice that the inverse matrix can be determined with Kramer s rule The solution in t = 0 is given by [ [ y (0) 887 = y (0) 49 (b) Note that system can be written as { y = 95y +995y y = 97y 997y, y = in which the vector y is definied as [ y = [ y y y = Ay, As we can see in Paragraph 683, Euler Forward is stable if the following condition holds for all eigenvalues: +λ i t <, i =,, (64) with t the step size We start with determining the eigenvalues of A So the eigenvalues are determined by setting 95 λ λ = 0 9

33 So the following equation should be solved λ +80λ = 0 (λ+)(λ + 800) = 0 λ = of λ = 800 To satisfy (64) it is sufficient to sattisfy this for λ = 800 Note yourself that with λ = we also automatically fullfill (64) So we look for all t such that We obtain that t < t < (c) We need to do the same calculations as in (a) For Euler Forward we have w = w 0 + tf(w 0 ) [ = [ 64 = [ ( ) ( ) = For Euler Backwards we solve the system [ w () [ [ w () = Note that the solution can be determined by [ w () [ w () = The solution on t = 0000 is given by [ y (0000) y (0000) = [ 6 39 [ [ w () w () = [ 60 4 (65) With this step size, both methods give good results However, Euler Backward is more expensive in calculation time Conclusion: With a stiff system, Euler Backward gives a good answer for all step sizes t, while Euler Forward only gives good results with (very small) step sizes, that has to satisfy the stability condition 0 The solution of the differential equation y = y t + in t = 0 is approximated in this exercise by Euler Forward and Runge Kutta 4 (RK4) We have already seen the Euler Forward in previous excersises The RK4 method is explained in Paragraph 65 and is definied as follows w n+ = w n + 6 [k +k +k 3 +k 4, (66) 30

34 in which the predictors k,,k 4 are given by k = tf(t n,w n ) (67) k = tf(t n + t,w n + k ) (68) k 3 = tf(t n + t,w n + k ) (69) k 4 = tf(t n + t,w n +k 3 ) (630) (i) In the first part we will approximate y(0) with the Euler Forward method with step size h = 005 This means that we need to use four steps of the system w n+ = w n + t(w n t n +) With initial value y(0) = w 0 =, we obtain the following w i s: w = w 0 + t(w 0 0 +) = = +005 = 05375, w = w +005(w 005 +) = w 3 = w +005(w ) = w 4 = w (w ) = The approximation of y(0) is given by w 4 = (ii)in this part we are going to approximate y(0) with the RK4 method, explained by (66) t/m (630), with step size t = 0 Note that in (67) t/m (630) f(t n,w n ) = w n t n + We start with calculating the four predictors, in which y(0) = w 0 = So So for w we obtain: k = tf(t 0,w 0 ) = = t(w 0 t 0 +) = = 0( 0 +) = 05 k = 0(w 0 + k 005 +) = 0575 k 3 = 0(w 0 + k 005 +) = k 4 = 0(w 0 +k 3 0 +) = w = w [k +k +k 3 +k 4 = = = With RK4, the approximaton of y(0) is given by w =

35 The solution of the differential equation is y(t) = et +t +t+ At t = 0 is the solution thus given by y(0) = Conclusion: We obtain that the approximations of both methods are good and that the work we need to do is almost the same While the error in the approximation of RK4 is equal to 0 7 and of Euler Forward is equal to 0 3, we prefer RK4 To determine the order of the error, we use the formula given in Paragraph 66 of the book: Error estimate if p is unknown: wn/ t w4 t N/4 wn t w t N/ = p In which wn/ t and w t N denote the approximation for y(t) = y(nδt) using N/ time steps of length t and usingntime steps of length t, respectively Inthe firstcolumn we obtain = 458, so the order of Method is For the second column we obtain so the order of Method is = 0797, 3

36 Chapter 7 The finite-difference method for boundary-value problems 7 Solutions The condition number κ(a) of a symmetric matrix A is the quotient of the largest and smallest absolute eigenvalue of A as in Paragraph 73 of the book The matrix A is de symmetric matrix A = [ The eigenvalues of A can be easily calculated by λ λ = λ 4λ+3 = (λ 3)(λ ) (7) Setting (7) equal to zero gives us the eigenvalues λ max = 3 and λ min = It follows that k(a ) = 3 The matrix A is the symmetric matrix [ A = The eigenvalues of A are λ max = 99 and λ min = Thus the condition number of A is equal to k(a ) = 99 The solution of the system A w = f with f = [99,99 T is easy to see, namely x = [, T We take f = [,0 T as an error in the right-hand side In Paragraph 73 we obtain the following approximation for the relative error: w κ(a ) f f The norm of the vector is w = [, T is w = + = 33 w (7)

37 In the same way we obtain f = 99 en f = Substituting in (7) gives us w 0707 We will now determine w and then we will compare w with the estimated upper bound If the right-hand side f has error f = [,0 T, then we can determine w with A (w+ w) = (f + f), (73) because w is known Reorder known and unknown in (73) gives A w = (f + f) A w Wit Gauss elimination it follows that w is equal to [ 0505 w = The norm of w is w = (0505) + ( 04975) So x is indeed smaller than 0707, as predicted The boundary-value probem can be rewritten as { y (x)+y(x) = x,x [0,, y(0) = y() = 0 (a) The interval [0, can be divided into n + equidistant subintervals with length x = n+ The nodes are given by x j = j x for j = 0,,,n + The numerical approximation of y j = y(x j ) is denoted by w j, which is computed using the differential equation in x j : y j +y j = x j voor j n (74) The finite-difference method approximates the second derivative in (74) by a central-difference formula to obtain When j =, equation (75) is given by w j w j +w j+ x +w j = j x (75) w 0 w +w x +w = x, (76) 34

38 in which w 0 = 0 because of the boundary condition y(0) = 0 For j = we have the following equation w w x +w = x (77) (75) stays the same for all < j < n For j = n we obtain w n w n x +w n = n x (78) We can solve this system of equations with m equations and m unknown values The system consists of linear equations, so we can rewrite it in the form Aw = f With we obtain and A = x + x x w = x + f = x w w n x 4 x, (n ) x n x x x + x x + x (b) Note that A is symmetric This means that all eigenvalues of A are real values To determine the largest and smallest eigenvalues of A we use Gershgorin s theorem Theorem 7 (Gershgorin circle theorem) The eigenvalues of a general n n matrix A are located in the complex plane in the union of circles where z C z a ii n a ij, Using Gershgorin on row k of A, for < k < n, gives that the eigenvalues are in the union of circles z x x 35 j i j=

39 For rows and n of A z x x So all eigenvalues of A lie in the union of circles z x x and (79) z x x, (70) in the complex plane We note that the smallest (real) eigenvalue is equal to λ min = and the biggest λ max = + 4 x (c) Since A is symmetric, the condition number of A is definied as In Paragraph 73 it is shown that Together with we obtain 3 The differential equation κ(a) = λ max λ min w w κ(a) f f f f 0 4, w w κ(a) f f + 4 x 0 4 = y (x) = sinx x [0,π, integrated two times gives the general solution Using the boundary conditions y(0) = y(π) = 0 gives ( + ) x 0 4 y(x) = sinx+c x+c (7) y(0) = c = 0 y(π) = sinπ+c π +c = 0, which gives us c = c = 0 The solution of the boundary-value problem is thus y(x) = sinx 36

40 The numerical solution is determined by taking N = and approximating the second derrivative with central differences With N =, we divide the area in 3 equivalent intervals The numerical approximation consists of the following points y(0) w 0 = 0 becauseoftheboundaryvalue, y( π 3 ) w y( π 3 ) w y(π) w 3 = 0 becauseoftheboundaryvalue So we need to solve the system { w w = sin( π 3 ) x w +w = sin( π 3 ) x, in which x = π 3 With Gauss elimination the solution is given by u = u = The global error, y j w j is equal to for j =, 4 We obtain the boundary-value problem y (x)+y(x) = 0,x [0, y(0) = 0 y () = 0, The grid points are given by x j = jh with x = 7 equation in the point x j is given by for j = 0,,,4 The differential Discretization of the equation above gives in which w j y(x j ) y (x j )+y(x j ) = 0 w j +w j w j+ x +w j = 0, j 3 (7) For j = in (7) we obtain with the boundary value w 0 = w w x +w = x The boundary condition y () = 0 is discretizated by: This results for j = 3 in (7) in y () = 0 w 4 w 3 x = 0 w +w 3 x +w 3 = 0 37

41 If we define the vector of unknowns by w = and taking the right-hand equal to the zero vector, the disretization of this boundary problem is given by Aw = f, with A = + x 0 x + x 0 + x The matrix A is thus symmetric, which means that all eigenvalues are real Using Gershgorin s circle theorem gives us the fact that the eigenvalues are in the union of circles C = 3 i= C i, with ( ) C : z x + x ( ) C : z x + x en ( ) C 3 : z x + x All eigenvalues lie in the union of C and C 3 All (real) eigenvalues in the circles are greater than, so positive We conclude that A has only positive real eigenvalues w w w 3, 38

42 Chapter 8 The instationary heat equation 8 Solutions 39

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

Do not turn over until you are told to do so by the Invigilator. UNIVERSITY OF EAST ANGLIA School of Mathematics Main Series UG Examination 216 17 INTRODUCTION TO NUMERICAL ANALYSIS MTHE612B Time allowed: 3 Hours Attempt QUESTIONS 1 and 2, and THREE other questions.

More information

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

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by 1. QUESTION (a) Given a nth degree Taylor polynomial P n (x) of a function f(x), expanded about x = x 0, write down the Lagrange formula for the truncation error, carefully defining all its elements. How

More information

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

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK KINGS COLLEGE OF ENGINEERING MA5-NUMERICAL METHODS DEPARTMENT OF MATHEMATICS ACADEMIC YEAR 00-0 / EVEN SEMESTER QUESTION BANK SUBJECT NAME: NUMERICAL METHODS YEAR/SEM: II / IV UNIT - I SOLUTION OF EQUATIONS

More information

Numerical Methods for Differential Equations

Numerical Methods for Differential Equations Numerical Methods for Differential Equations Chapter 2: Runge Kutta and Linear Multistep methods Gustaf Söderlind and Carmen Arévalo Numerical Analysis, Lund University Textbooks: A First Course in the

More information

Introductory Numerical Analysis

Introductory Numerical Analysis Introductory Numerical Analysis Lecture Notes December 16, 017 Contents 1 Introduction to 1 11 Floating Point Numbers 1 1 Computational Errors 13 Algorithm 3 14 Calculus Review 3 Root Finding 5 1 Bisection

More information

1 Solutions to selected problems

1 Solutions to selected problems Solutions to selected problems Section., #a,c,d. a. p x = n for i = n : 0 p x = xp x + i end b. z = x, y = x for i = : n y = y + x i z = zy end c. y = (t x ), p t = a for i = : n y = y(t x i ) p t = p

More information

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

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004 Department of Applied Mathematics and Theoretical Physics AMA 204 Numerical analysis Exam Winter 2004 The best six answers will be credited All questions carry equal marks Answer all parts of each question

More information

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

DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science ANSWERS OF THE TEST NUMERICAL METHODS FOR DIFFERENTIAL EQUATIONS ( WI3097 TU AESB0 ) Thursday April 6

More information

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

DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Matematics and Computer Science. ANSWERS OF THE TEST NUMERICAL METHODS FOR DIFFERENTIAL EQUATIONS (WI3097 TU) Tuesday January 9 008, 9:00-:00

More information

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam Jim Lambers MAT 460/560 Fall Semester 2009-10 Practice Final Exam 1. Let f(x) = sin 2x + cos 2x. (a) Write down the 2nd Taylor polynomial P 2 (x) of f(x) centered around x 0 = 0. (b) Write down the corresponding

More information

M.SC. PHYSICS - II YEAR

M.SC. PHYSICS - II YEAR MANONMANIAM SUNDARANAR UNIVERSITY DIRECTORATE OF DISTANCE & CONTINUING EDUCATION TIRUNELVELI 627012, TAMIL NADU M.SC. PHYSICS - II YEAR DKP26 - NUMERICAL METHODS (From the academic year 2016-17) Most Student

More information

Exam in TMA4215 December 7th 2012

Exam in TMA4215 December 7th 2012 Norwegian University of Science and Technology Department of Mathematical Sciences Page of 9 Contact during the exam: Elena Celledoni, tlf. 7359354, cell phone 48238584 Exam in TMA425 December 7th 22 Allowed

More information

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form Qualifying exam for numerical analysis (Spring 2017) Show your work for full credit. If you are unable to solve some part, attempt the subsequent parts. 1. Consider the following finite difference: f (0)

More information

Virtual University of Pakistan

Virtual University of Pakistan Virtual University of Pakistan File Version v.0.0 Prepared For: Final Term Note: Use Table Of Content to view the Topics, In PDF(Portable Document Format) format, you can check Bookmarks menu Disclaimer:

More information

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

Do not turn over until you are told to do so by the Invigilator. UNIVERSITY OF EAST ANGLIA School of Mathematics Main Series UG Examination 216 17 INTRODUCTION TO NUMERICAL ANALYSIS MTHE712B Time allowed: 3 Hours Attempt QUESTIONS 1 and 2, and THREE other questions.

More information

CS 257: Numerical Methods

CS 257: Numerical Methods CS 57: Numerical Methods Final Exam Study Guide Version 1.00 Created by Charles Feng http://www.fenguin.net CS 57: Numerical Methods Final Exam Study Guide 1 Contents 1 Introductory Matter 3 1.1 Calculus

More information

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

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn Review Taylor Series and Error Analysis Roots of Equations Linear Algebraic Equations Optimization Numerical Differentiation and Integration Ordinary Differential Equations Partial Differential Equations

More information

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

Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error. 2- Fixed point Numerical Analysis Solution of Algebraic Equation (non-linear equation) 1- Trial and Error In this method we assume initial value of x, and substitute in the equation. Then modify x and continue till we

More information

Lecture 5: Single Step Methods

Lecture 5: Single Step Methods Lecture 5: Single Step Methods J.K. Ryan@tudelft.nl WI3097TU Delft Institute of Applied Mathematics Delft University of Technology 1 October 2012 () Single Step Methods 1 October 2012 1 / 44 Outline 1

More information

5. Hand in the entire exam booklet and your computer score sheet.

5. Hand in the entire exam booklet and your computer score sheet. WINTER 2016 MATH*2130 Final Exam Last name: (PRINT) First name: Student #: Instructor: M. R. Garvie 19 April, 2016 INSTRUCTIONS: 1. This is a closed book examination, but a calculator is allowed. The test

More information

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

DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science 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

More information

Additional exercises with Numerieke Analyse

Additional exercises with Numerieke Analyse Additional exercises with Numerieke Analyse March 10, 017 1. (a) Given different points x 0, x 1, x [a, b] and scalars y 0, y 1, y, z 1, show that there exists at most one polynomial p P 3 with p(x i )

More information

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel LECTURE NOTES on ELEMENTARY NUMERICAL METHODS Eusebius Doedel TABLE OF CONTENTS Vector and Matrix Norms 1 Banach Lemma 20 The Numerical Solution of Linear Systems 25 Gauss Elimination 25 Operation Count

More information

Previous Year Questions & Detailed Solutions

Previous Year Questions & Detailed Solutions Previous Year Questions & Detailed Solutions. The rate of convergence in the Gauss-Seidal method is as fast as in Gauss Jacobi smethod ) thrice ) half-times ) twice 4) three by two times. In application

More information

Numerical Differential Equations: IVP

Numerical Differential Equations: IVP Chapter 11 Numerical Differential Equations: IVP **** 4/16/13 EC (Incomplete) 11.1 Initial Value Problem for Ordinary Differential Equations We consider the problem of numerically solving a differential

More information

Fourth Order RK-Method

Fourth Order RK-Method Fourth Order RK-Method The most commonly used method is Runge-Kutta fourth order method. The fourth order RK-method is y i+1 = y i + 1 6 (k 1 + 2k 2 + 2k 3 + k 4 ), Ordinary Differential Equations (ODE)

More information

Numerical Methods in Physics and Astrophysics

Numerical Methods in Physics and Astrophysics Kostas Kokkotas 2 October 17, 2017 2 http://www.tat.physik.uni-tuebingen.de/ kokkotas Kostas Kokkotas 3 TOPICS 1. Solving nonlinear equations 2. Solving linear systems of equations 3. Interpolation, approximation

More information

Lecture 10: Finite Differences for ODEs & Nonlinear Equations

Lecture 10: Finite Differences for ODEs & Nonlinear Equations Lecture 10: Finite Differences for ODEs & Nonlinear Equations J.K. Ryan@tudelft.nl WI3097TU Delft Institute of Applied Mathematics Delft University of Technology 21 November 2012 () Finite Differences

More information

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

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9 TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1 Chapter 01.01 Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9 Chapter 01.02 Measuring errors 11 True error 11 Relative

More information

Lösning: Tenta Numerical Analysis för D, L. FMN011,

Lösning: Tenta Numerical Analysis för D, L. FMN011, Lösning: Tenta Numerical Analysis för D, L. FMN011, 090527 This exam starts at 8:00 and ends at 12:00. To get a passing grade for the course you need 35 points in this exam and an accumulated total (this

More information

Notes on floating point number, numerical computations and pitfalls

Notes on floating point number, numerical computations and pitfalls Notes on floating point number, numerical computations and pitfalls November 6, 212 1 Floating point numbers An n-digit floating point number in base β has the form x = ±(.d 1 d 2 d n ) β β e where.d 1

More information

Ordinary Differential Equations

Ordinary Differential Equations Ordinary Differential Equations Introduction: first order ODE We are given a function f(t,y) which describes a direction field in the (t,y) plane an initial point (t 0,y 0 ) We want to find a function

More information

Numerical Methods in Physics and Astrophysics

Numerical Methods in Physics and Astrophysics Kostas Kokkotas 2 October 20, 2014 2 http://www.tat.physik.uni-tuebingen.de/ kokkotas Kostas Kokkotas 3 TOPICS 1. Solving nonlinear equations 2. Solving linear systems of equations 3. Interpolation, approximation

More information

Introduction to Numerical Analysis

Introduction to Numerical Analysis Introduction to Numerical Analysis S. Baskar and S. Sivaji Ganesh Department of Mathematics Indian Institute of Technology Bombay Powai, Mumbai 400 076. Introduction to Numerical Analysis Lecture Notes

More information

Examination paper for TMA4215 Numerical Mathematics

Examination paper for TMA4215 Numerical Mathematics Department of Mathematical Sciences Examination paper for TMA425 Numerical Mathematics Academic contact during examination: Trond Kvamsdal Phone: 93058702 Examination date: 6th of December 207 Examination

More information

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

More information

Consistency and Convergence

Consistency and Convergence Jim Lambers MAT 77 Fall Semester 010-11 Lecture 0 Notes These notes correspond to Sections 1.3, 1.4 and 1.5 in the text. Consistency and Convergence We have learned that the numerical solution obtained

More information

1. Method 1: bisection. The bisection methods starts from two points a 0 and b 0 such that

1. Method 1: bisection. The bisection methods starts from two points a 0 and b 0 such that Chapter 4 Nonlinear equations 4.1 Root finding Consider the problem of solving any nonlinear relation g(x) = h(x) in the real variable x. We rephrase this problem as one of finding the zero (root) of a

More information

AIMS Exercise Set # 1

AIMS Exercise Set # 1 AIMS Exercise Set #. Determine the form of the single precision floating point arithmetic used in the computers at AIMS. What is the largest number that can be accurately represented? What is the smallest

More information

1 Solutions to selected problems

1 Solutions to selected problems Solutions to selected problems Section., #a,c,d. a. p x = n for i = n : 0 p x = xp x + i end b. z = x, y = x for i = : n y = y + x i z = zy end c. y = (t x ), p t = a for i = : n y = y(t x i ) p t = p

More information

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations ECE257 Numerical Methods and Scientific Computing Ordinary Differential Equations Today s s class: Stiffness Multistep Methods Stiff Equations Stiffness occurs in a problem where two or more independent

More information

Numerical Methods. King Saud University

Numerical Methods. King Saud University Numerical Methods King Saud University Aims In this lecture, we will... find the approximate solutions of derivative (first- and second-order) and antiderivative (definite integral only). Numerical Differentiation

More information

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)

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 Methods - PROBLEMS. The Taylor series, about the origin, for log( + x) is x x2 2 + x3 3 x4 4 + Find an upper bound on the magnitude of the truncation error on the interval x.5 when log( + x)

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 5 Chapter 21 Numerical Differentiation PowerPoints organized by Dr. Michael R. Gustafson II, Duke University 1 All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

More information

SOLUTION OF EQUATION AND EIGENVALUE PROBLEMS PART A( 2 MARKS)

SOLUTION OF EQUATION AND EIGENVALUE PROBLEMS PART A( 2 MARKS) CHENDU COLLEGE OF ENGINEERING AND TECHNOLOGY (Approved by AICTE New Delhi, Affiliated to Anna University Chennai. Zamin Endathur Village, Madurntakam Taluk, Kancheepuram Dist.-603311.) MA6459 - NUMERICAL

More information

Preliminary Examination, Numerical Analysis, August 2016

Preliminary Examination, Numerical Analysis, August 2016 Preliminary Examination, Numerical Analysis, August 2016 Instructions: This exam is closed books and notes. The time allowed is three hours and you need to work on any three out of questions 1-4 and any

More information

Applied Numerical Analysis (AE2220-I) R. Klees and R.P. Dwight

Applied Numerical Analysis (AE2220-I) R. Klees and R.P. Dwight Applied Numerical Analysis (AE0-I) R. Klees and R.P. Dwight February 018 Contents 1 Preliminaries: Motivation, Computer arithmetic, Taylor series 1 1.1 Numerical Analysis Motivation..........................

More information

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 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 METHODS 1. Rearranging the equation x 3 =.5 gives the iterative formula x n+1 = g(x n ), where g(x) = (2x 2 ) 1. (a) Starting with x = 1, compute the x n up to n = 6, and describe what is happening.

More information

Midterm Review. Igor Yanovsky (Math 151A TA)

Midterm Review. Igor Yanovsky (Math 151A TA) Midterm Review Igor Yanovsky (Math 5A TA) Root-Finding Methods Rootfinding methods are designed to find a zero of a function f, that is, to find a value of x such that f(x) =0 Bisection Method To apply

More information

Numerical and Statistical Methods

Numerical and Statistical Methods F.Y. B.Sc.(IT) : Sem. II Numerical and Statistical Methods Time : ½ Hrs.] Prelim Question Paper Solution [Marks : 75 Q. Attempt any THREE of the following : [5] Q.(a) What is a mathematical model? With

More information

Numerical and Statistical Methods

Numerical and Statistical Methods F.Y. B.Sc.(IT) : Sem. II Numerical and Statistical Methods Time : ½ Hrs.] Prelim Question Paper Solution [Marks : 75 Q. Attempt any THREE of the following : [5] Q.(a) What is a mathematical model? With

More information

Solutions Preliminary Examination in Numerical Analysis January, 2017

Solutions Preliminary Examination in Numerical Analysis January, 2017 Solutions Preliminary Examination in Numerical Analysis January, 07 Root Finding The roots are -,0, a) First consider x 0 > Let x n+ = + ε and x n = + δ with δ > 0 The iteration gives 0 < ε δ < 3, which

More information

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

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester HIGHER ORDER METHODS School of Mathematics Semester 1 2008 OUTLINE 1 REVIEW 2 HIGHER ORDER METHODS 3 MULTISTEP METHODS 4 SUMMARY OUTLINE 1 REVIEW 2 HIGHER ORDER METHODS 3 MULTISTEP METHODS 4 SUMMARY OUTLINE

More information

Homework and Computer Problems for Math*2130 (W17).

Homework and Computer Problems for Math*2130 (W17). Homework and Computer Problems for Math*2130 (W17). MARCUS R. GARVIE 1 December 21, 2016 1 Department of Mathematics & Statistics, University of Guelph NOTES: These questions are a bare minimum. You should

More information

EXAMPLE OF ONE-STEP METHOD

EXAMPLE OF ONE-STEP METHOD EXAMPLE OF ONE-STEP METHOD Consider solving y = y cos x, y(0) = 1 Imagine writing a Taylor series for the solution Y (x), say initially about x = 0. Then Y (h) = Y (0) + hy (0) + h2 2 Y (0) + h3 6 Y (0)

More information

Ordinary Differential Equations

Ordinary Differential Equations CHAPTER 8 Ordinary Differential Equations 8.1. Introduction My section 8.1 will cover the material in sections 8.1 and 8.2 in the book. Read the book sections on your own. I don t like the order of things

More information

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

2tdt 1 y = t2 + C y = which implies C = 1 and the solution is y = 1 Lectures - Week 11 General First Order ODEs & Numerical Methods for IVPs In general, nonlinear problems are much more difficult to solve than linear ones. Unfortunately many phenomena exhibit nonlinear

More information

Lecture 4: Numerical solution of ordinary differential equations

Lecture 4: Numerical solution of ordinary differential equations Lecture 4: Numerical solution of ordinary differential equations Department of Mathematics, ETH Zürich General explicit one-step method: Consistency; Stability; Convergence. High-order methods: Taylor

More information

Chapter 4: Interpolation and Approximation. October 28, 2005

Chapter 4: Interpolation and Approximation. October 28, 2005 Chapter 4: Interpolation and Approximation October 28, 2005 Outline 1 2.4 Linear Interpolation 2 4.1 Lagrange Interpolation 3 4.2 Newton Interpolation and Divided Differences 4 4.3 Interpolation Error

More information

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

BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination December, 2015 BCS-054 : COMPUTER ORIENTED NUMERICAL TECHNIQUES No. of Printed Pages : 5 BCS-054 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination December, 2015 058b9 BCS-054 : COMPUTER ORIENTED NUMERICAL TECHNIQUES Time : 3 hours Maximum Marks

More information

Numerical Methods. Scientists. Engineers

Numerical Methods. Scientists. Engineers Third Edition Numerical Methods for Scientists and Engineers K. Sankara Rao Numerical Methods for Scientists and Engineers Numerical Methods for Scientists and Engineers Third Edition K. SANKARA RAO Formerly,

More information

Ordinary Differential Equations II

Ordinary Differential Equations II Ordinary Differential Equations II CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Ordinary Differential Equations II 1 / 33 Almost Done! Last

More information

Ordinary Differential Equations II

Ordinary Differential Equations II Ordinary Differential Equations II CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Ordinary Differential Equations II 1 / 29 Almost Done! No

More information

Name of the Student: Unit I (Solution of Equations and Eigenvalue Problems)

Name of the Student: Unit I (Solution of Equations and Eigenvalue Problems) Engineering Mathematics 8 SUBJECT NAME : Numerical Methods SUBJECT CODE : MA6459 MATERIAL NAME : University Questions REGULATION : R3 UPDATED ON : November 7 (Upto N/D 7 Q.P) (Scan the above Q.R code for

More information

HIGHER ORDER METHODS. There are two principal means to derive higher order methods. b j f(x n j,y n j )

HIGHER ORDER METHODS. There are two principal means to derive higher order methods. b j f(x n j,y n j ) HIGHER ORDER METHODS There are two principal means to derive higher order methods y n+1 = p j=0 a j y n j + h p j= 1 b j f(x n j,y n j ) (a) Method of Undetermined Coefficients (b) Numerical Integration

More information

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

Numerical Analysis Preliminary Exam 10.00am 1.00pm, January 19, 2018 Numerical Analysis Preliminary Exam 0.00am.00pm, January 9, 208 Instructions. You have three hours to complete this exam. Submit solutions to four (and no more) of the following six problems. Please start

More information

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

8.1 Introduction. Consider the initial value problem (IVP): 8.1 Introduction Consider the initial value problem (IVP): y dy dt = f(t, y), y(t 0)=y 0, t 0 t T. Geometrically: solutions are a one parameter family of curves y = y(t) in(t, y)-plane. Assume solution

More information

x n+1 = x n f(x n) f (x n ), n 0.

x n+1 = x n f(x n) f (x n ), n 0. 1. Nonlinear Equations Given scalar equation, f(x) = 0, (a) Describe I) Newtons Method, II) Secant Method for approximating the solution. (b) State sufficient conditions for Newton and Secant to converge.

More information

Lecture Notes on Introduction to Numerical Computation 1

Lecture Notes on Introduction to Numerical Computation 1 Lecture Notes on Introduction to Numerical Computation 1 Wen Shen Fall 2012 1 These notes are provided to students as a supplement to the textbook. They contain mainly examples that we cover in class.

More information

Principles of Scientific Computing Local Analysis

Principles of Scientific Computing Local Analysis Principles of Scientific Computing Local Analysis David Bindel and Jonathan Goodman last revised January 2009, printed February 25, 2009 1 Among the most common computational tasks are differentiation,

More information

SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS BISECTION METHOD

SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS BISECTION METHOD BISECTION METHOD If a function f(x) is continuous between a and b, and f(a) and f(b) are of opposite signs, then there exists at least one root between a and b. It is shown graphically as, Let f a be negative

More information

Mathematics for Engineers. Numerical mathematics

Mathematics for Engineers. Numerical mathematics Mathematics for Engineers Numerical mathematics Integers Determine the largest representable integer with the intmax command. intmax ans = int32 2147483647 2147483647+1 ans = 2.1475e+09 Remark The set

More information

Integration of Ordinary Differential Equations

Integration of Ordinary Differential Equations Integration of Ordinary Differential Equations Com S 477/577 Nov 7, 00 1 Introduction The solution of differential equations is an important problem that arises in a host of areas. Many differential equations

More information

Chap. 20: Initial-Value Problems

Chap. 20: Initial-Value Problems Chap. 20: Initial-Value Problems Ordinary Differential Equations Goal: to solve differential equations of the form: dy dt f t, y The methods in this chapter are all one-step methods and have the general

More information

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

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

More information

CHAPTER 5: Linear Multistep Methods

CHAPTER 5: Linear Multistep Methods CHAPTER 5: Linear Multistep Methods Multistep: use information from many steps Higher order possible with fewer function evaluations than with RK. Convenient error estimates. Changing stepsize or order

More information

Unit I (Testing of Hypothesis)

Unit I (Testing of Hypothesis) SUBJECT NAME : Statistics and Numerical Methods SUBJECT CODE : MA645 MATERIAL NAME : Part A questions REGULATION : R03 UPDATED ON : November 07 (Upto N/D 07 Q.P) Unit I (Testing of Hypothesis). State level

More information

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ).

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ). 1 Interpolation: The method of constructing new data points within the range of a finite set of known data points That is if (x i, y i ), i = 1, N are known, with y i the dependent variable and x i [x

More information

On interval predictor-corrector methods

On interval predictor-corrector methods DOI 10.1007/s11075-016-0220-x ORIGINAL PAPER On interval predictor-corrector methods Andrzej Marcinia 1,2 Malgorzata A. Janowsa 3 Tomasz Hoffmann 4 Received: 26 March 2016 / Accepted: 3 October 2016 The

More information

Mathematics for chemical engineers. Numerical solution of ordinary differential equations

Mathematics for chemical engineers. Numerical solution of ordinary differential equations Mathematics for chemical engineers Drahoslava Janovská Numerical solution of ordinary differential equations Initial value problem Winter Semester 2015-2016 Outline 1 Introduction 2 One step methods Euler

More information

Integration, differentiation, and root finding. Phys 420/580 Lecture 7

Integration, differentiation, and root finding. Phys 420/580 Lecture 7 Integration, differentiation, and root finding Phys 420/580 Lecture 7 Numerical integration Compute an approximation to the definite integral I = b Find area under the curve in the interval Trapezoid Rule:

More information

MTH603 FAQ + Short Questions Answers.

MTH603 FAQ + Short Questions Answers. Absolute Error : Accuracy : The absolute error is used to denote the actual value of a quantity less it s rounded value if x and x* are respectively the rounded and actual values of a quantity, then absolute

More information

Taylor Series and Numerical Approximations

Taylor Series and Numerical Approximations Taylor Series and Numerical Approximations Hilary Weller h.weller@reading.ac.uk August 7, 05 An introduction to the concept of a Taylor series and how these are used in numerical analysis to find numerical

More information

Preface. 2 Linear Equations and Eigenvalue Problem 22

Preface. 2 Linear Equations and Eigenvalue Problem 22 Contents Preface xv 1 Errors in Computation 1 1.1 Introduction 1 1.2 Floating Point Representation of Number 1 1.3 Binary Numbers 2 1.3.1 Binary number representation in computer 3 1.4 Significant Digits

More information

Numerical solutions of nonlinear systems of equations

Numerical solutions of nonlinear systems of equations Numerical solutions of nonlinear systems of equations Tsung-Ming Huang Department of Mathematics National Taiwan Normal University, Taiwan E-mail: min@math.ntnu.edu.tw August 28, 2011 Outline 1 Fixed points

More information

COURSE Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method

COURSE Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method COURSE 7 3. Numerical integration of functions (continuation) 3.3. The Romberg s iterative generation method The presence of derivatives in the remainder difficulties in applicability to practical problems

More information

Ordinary differential equations - Initial value problems

Ordinary differential equations - Initial value problems Education has produced a vast population able to read but unable to distinguish what is worth reading. G.M. TREVELYAN Chapter 6 Ordinary differential equations - Initial value problems In this chapter

More information

NUMERICAL SOLUTION OF ODE IVPs. Overview

NUMERICAL SOLUTION OF ODE IVPs. Overview NUMERICAL SOLUTION OF ODE IVPs 1 Quick review of direction fields Overview 2 A reminder about and 3 Important test: Is the ODE initial value problem? 4 Fundamental concepts: Euler s Method 5 Fundamental

More information

Numerical Analysis Exam with Solutions

Numerical Analysis Exam with Solutions Numerical Analysis Exam with Solutions Richard T. Bumby Fall 000 June 13, 001 You are expected to have books, notes and calculators available, but computers of telephones are not to be used during the

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 9 Initial Value Problems for Ordinary Differential Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign

More information

Numerical Analysis: Interpolation Part 1

Numerical Analysis: Interpolation Part 1 Numerical Analysis: Interpolation Part 1 Computer Science, Ben-Gurion University (slides based mostly on Prof. Ben-Shahar s notes) 2018/2019, Fall Semester BGU CS Interpolation (ver. 1.00) AY 2018/2019,

More information

Numerical Methods for Differential Equations

Numerical Methods for Differential Equations Numerical Methods for Differential Equations Chapter 2: Runge Kutta and Multistep Methods Gustaf Söderlind Numerical Analysis, Lund University Contents V4.16 1. Runge Kutta methods 2. Embedded RK methods

More information

Numerical methods. Examples with solution

Numerical methods. Examples with solution Numerical methods Examples with solution CONTENTS Contents. Nonlinear Equations 3 The bisection method............................ 4 Newton s method.............................. 8. Linear Systems LU-factorization..............................

More information

NUMERICAL METHODS FOR ENGINEERING APPLICATION

NUMERICAL METHODS FOR ENGINEERING APPLICATION NUMERICAL METHODS FOR ENGINEERING APPLICATION Second Edition JOEL H. FERZIGER A Wiley-Interscience Publication JOHN WILEY & SONS, INC. New York / Chichester / Weinheim / Brisbane / Singapore / Toronto

More information

Lecture 28 The Main Sources of Error

Lecture 28 The Main Sources of Error Lecture 28 The Main Sources of Error Truncation Error Truncation error is defined as the error caused directly by an approximation method For instance, all numerical integration methods are approximations

More information

MA 8019: Numerical Analysis I Solution of Nonlinear Equations

MA 8019: Numerical Analysis I Solution of Nonlinear Equations MA 8019: Numerical Analysis I Solution of Nonlinear Equations Suh-Yuh Yang ( 楊肅煜 ) Department of Mathematics, National Central University Jhongli District, Taoyuan City 32001, Taiwan syyang@math.ncu.edu.tw

More information

Differential Equations

Differential Equations Differential Equations Definitions Finite Differences Taylor Series based Methods: Euler Method Runge-Kutta Methods Improved Euler, Midpoint methods Runge Kutta (2nd, 4th order) methods Predictor-Corrector

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 6 Chapter 20 Initial-Value Problems PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

More information

Ordinary Differential Equations

Ordinary Differential Equations Chapter 13 Ordinary Differential Equations We motivated the problem of interpolation in Chapter 11 by transitioning from analzying to finding functions. That is, in problems like interpolation and regression,

More information

Mathematical Methods for Numerical Analysis and Optimization

Mathematical Methods for Numerical Analysis and Optimization Biyani's Think Tank Concept based notes Mathematical Methods for Numerical Analysis and Optimization (MCA) Varsha Gupta Poonam Fatehpuria M.Sc. (Maths) Lecturer Deptt. of Information Technology Biyani

More information