1 / 36

MATH 175: Numerical Analysis II

MATH 175: Numerical Analysis II. Lecturer: Jomar F. Rabajante 2 nd Sem AY2012-2013 IMSP, UPLB. RECALL: SOLVING ODEs. Example: The solution to the ODE dy / dt , also written as y’ , is y(t) or y( t,y ) . Obtaining an explicit formula: y(t) Obtaining an implicit formula: y( t,y )

quanda
Download Presentation

MATH 175: Numerical Analysis II

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. MATH 175: Numerical Analysis II Lecturer: Jomar F. Rabajante 2ndSem AY2012-2013 IMSP, UPLB

  2. RECALL: SOLVING ODEs Example: The solution to the ODE dy/dt, also written as y’, is y(t) or y(t,y). • Obtaining an explicit formula: y(t) • Obtaining an implicit formula: y(t,y) • Obtaining a power series representation for y(t) • Numerically approximating the solution y(t) or y(t,y) • Sketching the geometric representation of y(t)

  3. INITIAL VALUE PROBLEM • Consider we have an IVP (first-order ODE)

  4. 1st Method: EULER’S METHOD Simple derivation: Partition [a,b] in to n – 1 grid (i.e. n points) with equal step size h = (b – a)/n Start with Determine the successive slopes:

  5. 1st Method: EULER’S METHOD Hence, the Euler’s Method is increment from wi to wi+1

  6. 1st Method: EULER’S METHOD Example 1: Apply Euler’s Method to

  7. 1st Method: EULER’S METHOD Example 1: Let h=0.2

  8. 1st Method: EULER’S METHOD Example 1: Using MS Excel

  9. 1st Method: EULER’S METHOD Another derivation: (Using Taylor Series)

  10. ANALYSIS OF IVP SOLVERS • LOCAL TRUNCATION OR DISCRETIZATION ERROR & CONSISTENCY • GLOBAL TRUNCATION OR DISCRETIZATION ERROR & CONVERGENCE • STABILITY (of the numerical method) The most important of this is convergence. If the method does not converge, then it is useless.

  11. ANALYSIS OF IVP ITSELF • EXISTENCE OF SOLUTION • UNIQUENESS OF SOLUTION • STABILITY (of the IV Problem) If the IVP has no solution or has no unique solution then our results from any numerical method (however sophisticated it is) is meaningless. If our IVP is unstable (sensitive to changes in initial & parameter values), then we may get results which are far from the exact solution. Remember that we are approximating the solutions, so any error may affect our solution.

  12. LOCAL TRUNCATION ERROR • Measures the error generated by one step of the method, assuming the solution at previous steps was exact. For one-step methods: (One step means we only need wiin computing wi+1) Assuming the solutions at previous steps are exact.

  13. LOCAL TRUNCATION ERROR If then the numerical method is CONSISTENT. Notice that a method is consistent if its local error is proportional to the size of the step size h.

  14. LOCAL TRUNCATION ERROR Example (for Euler’s Method): Assumed correct

  15. LOCAL TRUNCATION ERROR Example (for Euler’s Method): This means that the error in each step is proportional to the square of the step size.

  16. GLOBAL TRUNCATION ERROR • Measures the cumulative effect of the errors introduced by all of the time steps taken • It is the difference between the solution of the differential equation (if this is available) and the solution of the difference equation If then the method is CONVERGENT. Considering the cumulative errors

  17. GLOBAL TRUNCATION ERROR The max error should approach zero as we decrease the step size. In short, a solver is convergent if the approximate solutions converge to the exact solution for each t, as h0.

  18. GLOBAL TRUNCATION ERROR Considering the accumulated errors. If for some constant p, then the method is of order p. We will define order of a numerical method as the “p” on its global error.

  19. GLOBAL TRUNCATION ERROR Example (for Euler’s Method): Naïve analysis: After n steps constant

  20. GLOBAL TRUNCATION ERROR Example (for Euler’s Method): Actually, where L is a Lipschitz constant. Euler’s Method is a first-order method. Halving the size of h will reduce the error bound to half. This makes Euler’s method a crude method (but very easy to use).

  21. GLOBAL TRUNCATION ERROR An explicit one-step method is convergent if and only if it is consistent. For a convergent explicit one-step method, if the local truncation error is O(hm+1) then the global error is O(hm) or the method is of order m.

  22. FOCUSING ON CONSISTENCY AND CONVERGENCE Interpreting Consistency and Convergence: Consistency means that as h shrinks the difference equation tends to the ODE. Convergence means that as h shrinks the solution of the difference equation tends to the solution of the ODE.

  23. TRUNCATION VS ROUND-OFF Take note that the truncation errors that we have presented here are errors arising from the process (or method) itself. This does not yet consider the round-off errors that you or your computer might commit. Discretization error Total Error Error Round-off error Step size h

  24. STABILITY OF THE METHOD

  25. STABILITY OF THE METHOD REMEMBER: our method is a difference equation RECALL: fixed-point iteration

  26. STABILITY OF THE METHOD We need to inspect the stability of the method since we are dealing with computers that may give round-off errors. We need to check how sensitive our method is from small round-off errors.

  27. Existence and Uniqueness of Solution We first discuss Lipschitz condition. DEFINITION: A function f(t,y) satisfies the LIPSCHITZ CONDITION in the variable y on the rectangle S=[a,b]x[y1,y2] if there exists a constant L (called the Lipschitz constant) satisfying for each (t,y1), (t,y2) in S.

  28. Existence and Uniqueness of Solution Example 1: Find the Lipschitz constant for L=1

  29. Existence and Uniqueness of Solution Example 2: Find the Lipschitz constant for L=2

  30. Existence and Uniqueness of Solution Another way of getting Lipschitz constant: THEOREM: If f is defined on S=[a,b]x[c,d] and there exists a constant L>0 such that for all (t,y) in S, then f satisfies a Lipschitz condition in y on S with Lipschitz constant L.

  31. Existence and Uniqueness of Solution Example 3: Find the Lipschitz constant for You will get

  32. Existence and Uniqueness of Solution See Existence and Uniqueness Theorem in my MS Thesis (Analysis of Nonlinear Systems Chapter)

  33. STABILITY OF THE IVP Check for sensitivity to changes in initial conditions. Check for sensitivity to changes in the values of the parameters. Do you have any idea how to roughly check for the stability of the IVP? (Do perturbations)

  34. WELL-POSEDNESS An IVP that has a unique solution and is stable is said to be well-posed. Before solving an IVP, please check its well-posedness… 

  35. Examples • The good • The bad • The ugly Also, solutions to IVP when y(0)=0is not unique.

More Related