Presentation is loading. Please wait.

Presentation is loading. Please wait.

Numerical Analysis Lecture 38.

Similar presentations


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

1 Numerical Analysis Lecture 38

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 METHODS

17 We considered the IVP We also defined and took the weighted average of k1 and k2 and added to yn to get yn+1

18 We obtained Implying

19 We considered two cases,
Case I We choose W2 = 1/3, then W1 = 2/3 and

20 Case II: We considered W2 = ½, then W1 = ½ and Then

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

22 Therefore, the expression for local truncation error is given by

23 The fourth-order R-K method was described as

24 where

25 Example Use the following second order Runge-Kutta method described by

26 where and and find the numerical solution of the initial value problem described as at x = 0.4 and taking h = 0.2.

27 Solution Here We calculate

28 Now, using the given R-K method, we get
Now, taking x1 = 0.2, y1 = 1.24, we calculate

29 Again using the given R-K method, we obtain

30 Example Solve the following differential equation
with the initial condition y(0) = 1, using fourth- order Runge-Kutta method from t = 0 to t = 0.4 taking h = 0.1

31 Solution The fourth-order Runge-Kutta method is described as (1) where

32 In this problem, As a first step, we calculate

33 Now, we compute from Therefore y(0.1) = y1=1.1103 In the second step, we have to find y2 = y(0.2)

34 We compute

35 From Equation (1), we see that
Similarly we calculate,

36 Using equation (1), we compute
Finally, we calculate

37 Using them in equation (1), we get
which is the required result.

38 RUNGE – KUTTA METHOD FOR SOLVING A SYSTEM OF EQUATIONS

39 The fourth-order Runge-Kutta method can be extended to numerically solve the higher-order ordinary differential equations- linear or non-linear

40 For illustration, let us consider a second order ordinary differential equation of the form

41 Using the substitution
this equation can be reduced to two first-order simultaneous differential equations, as given by

42 Now, we can directly write down the Runge-Kutta fourth-order formulae for solving the system.
Let the initial conditions of the above system be given by

43 Then, we define

44 Now, using the initial conditions yn, pn and 4th -order R-K formula, we compute

45 This method can be extended on similar lines to solve system of n first order differential equations.

46 Example Solve the following equation
Using 4th order Runge-Kutta method for x = 0.2, with the initial values y(0) = 1, y’(0)=0

47 Solution Let Then Thus, the given equation reduced to two first-order equations.

48 In the present problem, we are given
x0 = 0, y0 = 1, p0 =yo’ =0 Taking h = 0.2, we compute

49

50

51 Now, y (0.2) = y1 is given by

52 Therefore, the required solution is

53 Numerical Analysis Lecture 38


Download ppt "Numerical Analysis Lecture 38."

Similar presentations


Ads by Google