460 likes | 657 Views
Numerical Analysis. Lecture 37. Chapter 7 Ordinary Differential Equations. Introduction Taylor Series Euler Method Runge-Kutta Method Predictor Corrector Method. TAYLOR’S SERIES METHOD. We considered an initial value problem described by.
E N D
NumericalAnalysis Lecture 37
IntroductionTaylor SeriesEuler MethodRunge-Kutta MethodPredictor Corrector Method
TAYLOR’S SERIES • METHOD
We expanded y (t ) by Taylor’s series about the point t = t0 and obtain
Consider the differential equation of first order with the initial condition y(t0) = y0.
Then, we obtained the solution in the form of a recurrence relation
The recurrence relation is the modified Euler’s method.
These are computationally, most efficient methods in terms of accuracy. They were developed by two German mathematicians, Runge and Kutta.
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.
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.
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.
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.
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.
Consider the IVP We also define and take the weighted average of k1 and k2 and add to yn to get yn+1
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
Rewriting the derivatives of y in terms of f of the above equation, we get Here, all derivatives are evaluated at (tn, yn).
Next, we shall rewrite the given equation after inserting the expressions or k1 and k2 as
Now using Taylor’s series expansion of two variables, we obtain
Here again, all derivatives are computed at (tn, yn). On inserting the expression for k1, the above equation becomes
Now, equating coefficients of h and h2 in the two equations, we obtain Implying
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
We now consider two cases, which are popular Case I If we choose W2 = 1/3, then W1 = 2/3 and
Case II: If we consider W2 = ½, then W1 = ½ and Then
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.
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
Now, substituting into the above equation, we get
Finally, we obtain The expression can further be simplified to
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
Following similar procedure, Runge-Kutta formulae of any order can be obtained. However, their derivations becomes exceedingly lengthy and complicated.
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).
This well-known fourth-order R-K method is described in the following steps.
Please note that the second-order Runge-Kutta method described above requires the evaluation of the function twice for each complete step of integration.
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.
NumericalAnalysis Lecture 37