1 / 52

Lecture 40

Numerical Analysis. Lecture 40. Chapter 7 Ordinary Differential Equations. Introduction Taylor Series Euler Method Runge-Kutta Method Predictor Corrector Method. RUNGA- KUTTA METHODS. We considered the IVP. We also defined.

finn-mack
Download Presentation

Lecture 40

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 40

  2. Chapter 7Ordinary Differential Equations

  3. IntroductionTaylor SeriesEuler MethodRunge-Kutta MethodPredictor Corrector Method

  4. RUNGA- KUTTA METHODS

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

  6. We obtained Implying

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

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

  9. The fourth-order R-K method was described as

  10. where

  11. PREDICTOR – CORRECTOR METHOD

  12. Milne’s Method It is 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.

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

  14. 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 predictor formula.

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

  16. Adam-Moulton Method It is another predictor-corrector method, where we use the fact that the solution to the given initial value problem is known at past four equally spaced points tn, tn-1, tn-2, tn-3.

  17. The task is to compute the value of y at tn+1. Let us consider the differential equation

  18. Integrating between the limits tn to tn+1, we have That is,

  19. To carry out integration, we proceed as follows. We employ Newton’s backward interpolation formula, so that

  20. After substitution, we obtain

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

  22. Actual integration reduces the above expression to Now substituting the differences such as

  23. Equation simplifies to Alternatively, it can be written as This is known as Adam’s predictor formula.

  24. The truncation error is To obtain corrector formula, we use Newton’s backward interpolation formula about fn+1 instead of fn.

  25. We obtain Carrying out the integration and repeating the steps, we get the corrector formula as

  26. Here, the truncation error is The truncation error in Adam’s predictor is approximately thirteen times more than that in the corrector, but with opposite sign.

  27. In general, Adam-Moulton predictor-corrector pair can be written as

  28. Example Using Adam-Moulton predictor-corrector method, find the solution of the initial value problem at t = 1.0, taking h = 0.2. Compare it with the analytical solution.

  29. Solution In order to use Adam’s P-C method, we require the solution of the given differential equation at the past four equally spaced points, for which we use R-K method of 4th order which is self starting.

  30. Thus taking t0 =0, y0 = 1, h = 0.2, we compute k1 = 0.2, k2 = 0.218, k3 = 0.2198, k4 = 0.23596, and get

  31. Taking t1 = 0.2, y1 = 1.21859, h = 0.2, we compute k1 = 0.23571, k2 = 0.2492, k3 = 0.25064, k4 = 0.26184, and get

  32. Now, we take t2 = 0.4, y2 = 1.46813, h = 0.2, and compute k1 = 0.2616, k2 = 0.2697, k3 = 0.2706, k4 = 0.2757 to get

  33. Thus, we have at our disposal

  34. Now, we use Adam’s P-C pair to calculate y (0.8) and y (1.0) as follows: Thus (1)

  35. From the given differential equation, we have Therefore,

  36. Hence, from Eq. (1), we get Now to obtain the corrector value of y at t = 0.8, we use (2)

  37. But, Therefore, (3) Proceeding similarly, we get

  38. Noting that we calculate Now, the corrector formula for computing y5 is given by (4)

  39. But, Thus, finally we get (5)

  40. The analytical solution can be seen in the following steps. After finding integrating factor and solving, we get

  41. Integrating, we get That is, Now using the initial condition, y(0) = 1, we get c = – 1.

  42. Therefore, the analytical solution is given by from which, we get

  43. Convergence and Stability Considerations

  44. The numerical solution of a differential equation can be shown to converge to its exact solution, if the step size h is very small.

  45. The numerical solution of a differential equation is said to be stable if the error do not grow exponentially as we compute from one step to another.

  46. Stability consideration are very important in finding the numerical solutions of the differential equations either by single-step methods or by using multi-step methods.

  47. However, theoretical analysis of stability and convergence of R -K methods and P –C methods are highly involved and obtain numerically stable solution using 4th order R – K method to the simple problem y’ = Ay gives us stability condition as -2.78<Ah

  48. In practice, to get numerically stable solutions to similar problems, we choose the value of h much smaller than the value given by the above condition and also check for consistency of the result.

  49. Another topic of interest which is not considered, namely the stiff system of differential equations that arises in many chemical engineering systems, such as chemical reactors, where the rate constants for the reactions involved are widely different.

  50. Most of the realistic stiff DE do not have analytical solutions and therefore only numerical solutions can be obtained.

More Related