Presentation is loading. Please wait.

Presentation is loading. Please wait.

Numerical Analysis Lecture 37.

Similar presentations


Presentation on theme: "Numerical Analysis Lecture 37."— Presentation transcript:

1 Numerical Analysis Lecture 37

2 Chapter 7 Ordinary Differential Equations

3 Introduction Taylor Series Euler Method Runge-Kutta Method Predictor Corrector Method

4 TAYLOR’S SERIES METHOD

5 We considered an initial value problem described by

6 We expanded y (t ) by Taylor’s series about the point t = t0 and obtain

7 Noting that f is an implicit function of y, we have

8 Similarly

9 EULER METHOD

10 Consider the differential equation of first order with the initial condition y(t0) = y0.

11 The value of y corresponding to t = t1

12 Similarly

13 Then, we obtained the solution in the form of a recurrence relation

14 MODIFIED EULER’S METHOD

15 The recurrence relation
is the modified Euler’s method.

16 RUNGE – KUTTA METHOD

17 These are computationally, most efficient methods in terms of accuracy
These are computationally, most efficient methods in terms of accuracy. They were developed by two German mathematicians, Runge and Kutta.

18 They are distinguished by their orders in the sense that they agree with Taylor’s series solution up to terms of hr, where r is the order of the method. These methods do not demand prior computation of higher derivatives of y(t) as in TSM.

19 Fourth-order Runge-Kutta methods are widely used for finding the numerical solutions of linear or non-linear ordinary differential equations, the development of which is complicated algebraically.

20 Therefore, we convey the basic idea of these methods by developing the second-order Runge-Kutta method which we shall refer hereafter as R-K method.

21 Please recall that the modified Euler’s method: which can be viewed as
(average of slopes) This, in fact, is the basic idea of R-K method.

22 Here, we find the slopes not only at tnbut also at several other interior points, and take the weighted average of these slopes and add to yn to get yn+1. Now, we shall derive the second order R-K method in the following slides.

23 Consider the IVP We also define and take the weighted average of k1 and k2 and add to yn to get yn+1

24 We seek a formula of the form
Where are constants to be determined so that the above equation agree with the Taylor’s series expansion as high an order as possible

25 Thus, using Taylor’s series expansion, we have

26 Rewriting the derivatives of y in terms of f of the above equation, we get
Here, all derivatives are evaluated at (tn, yn).

27 Next, we shall rewrite the given equation after inserting the expressions or k1 and k2 as

28 Now using Taylor’s series expansion of two variables, we obtain

29 Here again, all derivatives are computed at (tn, yn)
Here again, all derivatives are computed at (tn, yn). On inserting the expression for k1, the above equation becomes

30 On rearranging in the increasing powers of h, we get

31 Now, equating coefficients of h and h2 in the two equations, we obtain
Implying

32 Thus, we have three equations in four unknowns and so, we can chose one value arbitrarily. Solving we get where W2 is arbitrary and various values can be assigned to it

33 Case I We now consider two cases, which are popular
If we choose W2 = 1/3, then W1 = 2/3 and

34 Case II: If we consider W2 = ½, then W1 = ½ and Then

35 In fact, we can recognize that this equation is the modified Euler’s method and is therefore a special case of a 2nd order Runge-Kutta method. These equations are known as 2nd order R –K Methods, since they agree with Taylor’s series solution up to the term h2.

36 Defining the local truncation error, TE, as the difference between the exact solution y(tn+1) at t = tn+1 and the numerical solution yn+1, obtained using the second order R – K method, we have

37 Now, substituting into the above equation, we get

38 Finally, we obtain The expression can further be simplified to

39 Therefore, the expression for local truncation error is given by
Please verify that the magnitude of the TE in case I is less than that of case II

40 Following similar procedure, Runge-Kutta formulae of any order can be obtained. However, their derivations becomes exceedingly lengthy and complicated.

41 Amongst them, the most popular and commonly used in practice is the R-K method of fourth-order, which agrees with the Taylor series method up to terms of O (h4).

42 This well-known fourth-order R-K method is described in the following steps.

43 where

44 Please note that the second-order Runge-Kutta method described above requires the evaluation of the function twice for each complete step of integration.

45 Similarly, fourth-order Runge-Kutta method requires the evaluation of the function four times. The discussion on optimal order R-K method is very interesting, but will be discussed some other time.

46 Numerical Analysis Lecture 37


Download ppt "Numerical Analysis Lecture 37."

Similar presentations


Ads by Google