1 / 48

Lecture 39

Numerical Analysis. Lecture 39. Chapter 7 Ordinary Differential Equations. Introduction Taylor Series Euler Method Runge-Kutta Method Predictor Corrector Method. PREDICTOR – CORRECTOR METHOD.

Download Presentation

Lecture 39

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. NumericalAnalysis Lecture 39

  2. Chapter 7Ordinary Differential Equations

  3. IntroductionTaylor SeriesEuler MethodRunge-Kutta MethodPredictor Corrector Method

  4. PREDICTOR – CORRECTOR METHOD

  5. The methods presented so far are called single-step methods, where we have seen that the computation of y at tn+1 that is yn+1 requires the knowledge of yn only.

  6. In predictor-corrector methods which we will discuss now, is also known as multi-step methods. To compute the value of y at tn+1, we must know the solution y at tn, tn-1, tn-2, etc.

  7. Thus, a predictor formula is used to predict the value of y at tn+1 and then a corrector formula is used to improve the value of yn+1. Let us consider an IVP

  8. Using simple Euler’s and modified Euler’s method, we can write down a simple predictor-corrector pair (P – C) as

  9. Here, yn+1(1) is the first corrected value of yn+1. The corrector formula may be used iteratively as defined below: The iteration is terminated when two successive iterates agree to the desired accuracy

  10. In this pair, to extrapolate the value of yn+1, we have approximated the solution curve in the interval (tn, tn+1) by a straight line passing through (tn, yn) and (tn+1, yn+1).

  11. The accuracy of the predictor formula can be improved by considering a quadratic curve through the equally spaced points (tn-1, yn-1), (tn, yn), (tn+1, yn+1)

  12. Suppose we fit a quadratic curve of the form where a, b, c are constants to be determined

  13. As the curve passes through (tn-1, yn-1) and (tn, yn) and satisfies we obtain Therefore

  14. and Which gives or

  15. Substituting these values of a, b and c into the quadratic equation, we get That is,

  16. Thus, instead of considering the P-C pair, we may consider the P-C pair given by The essential difference between them is, the one given above is more accurate

  17. However, this one can not be used to predict yn+1 for a given IVP, because its use require the knowledge of past two points. In such a situation, a R-K method is generally used to start the predictor method.

  18. Milne’s Method It is also a multi-step method where we assume that the solution to the given IVP is known at the past four equally spaced point t0, t1, t2 and t3.

  19. To derive Milne’s predictor-corrector pair, let us consider a typical IVP

  20. On integration between the limits t0 and t4, we get

  21. But we know from Newton’s forward difference formula where

  22. Now, by changing the variable of integration (from t to s), the limits of integration also changes (from 0 to 4), and thus the above expression becomes

  23. which simplifies to Substituting the differences It can be further simplified to

  24. Alternatively, it can also be written as This is known as Milne’s predictor formula.

  25. Similarly, integrating the original over the interval t0 to t2 or s = 0 to 2 and repeating the above steps, we get which is known as Milne’s corrector formula.

  26. In general, Milne’s predictor-corrector pair can be written as

  27. From these equations, we observe that the magnitude of the truncation error in corrector formula is while the truncation error in predictor formula is Thus: TE in, c-formula is less than the TE in p-formula.

  28. In order to apply this P – C method to solve numerically any initial value problem, we first predict the value of yn+1 by means of predictor formula, where derivatives are computed using the given differential equation itself.

  29. Using the predicted value yn+1, we calculate the derivativey’n+1from the given differential equation and then we use the corrector formula of the pair to have the corrected value of yn+1

  30. This in turn may be used to obtain improved value of yn+1 by using corrector again. This in turn may be used to obtain improved value of yn+1 by using the corrector again. This cycle is repeated until we achieve the required accuracy.

  31. Example Find y (2.0) if y ( t ) is the solution of y (0) = 2, y (0.5) = 2.636, y (1.0) = 3.595 and y(1.5) = 4.968 Use Milne’s P-C method.

  32. Solution Taking t0 = 0.0, t1 = 0.5, t2 = 1.0, t3 = 1.5 y0, y1, y2 and y3, are given, we have to compute y4, the solution of the given differential equation corresponding to t =2.0

  33. The Milne’s P – C pair is given as

  34. From the given differential equation, We have,

  35. Now, using predictor formula, we compute

  36. Using this predicted value, we shall compute the improved value of y4 from corrector formula

  37. Using the available predicted value y4 and the initial values, we compute

  38. Thus, the first corrected value of y4 is given by

  39. Suppose, we apply the corrector formula again, then we have Finally, y (2.0) = y4 = 6.8734.

  40. Example Tabulate the solution of in the interval [0, 0.4] with h = 0.1, using Milne’s P-C method.

  41. Solution Milne’s P-C method demand the solution at first four points t0, t1, t2 and t3. As it is not a self – starting method, we shall use R-K method of fourth order to get the required solution and then switch over to Milne’s P – C method.

  42. Thus, taking t0 = 0, t1 = 0.1, t2 = 0.2, t3 = 0.3 we get the corresponding y values using R–K method of 4th order; that is y0 = 1, y1 = 1.1103, y2 = 1.2428 and y3 = 1.3997 (Reference Lecture 38)

  43. Now, we compute

  44. Using Milne’s predictor formula

  45. Before using corrector formula, we compute

  46. Finally, using Milne’s corrector formula, we compute

  47. The required solution is:

  48. NumericalAnalysis Lecture 39

More Related