Download presentation
Presentation is loading. Please wait.
1
MATH 175: Numerical Analysis II
Lecturer: Jomar F. Rabajante 2nd Sem AY 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 step ti wi 0.0 1 0.2 2 0.4 3 0.6 4 0.8 5 1.0
10
1st Method: EULER’S METHOD
Another derivation: (Using Taylor Series)
11
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.
12
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.
13
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 wi in computing wi+1) Assuming the solutions at previous steps are exact.
14
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.
15
LOCAL TRUNCATION ERROR
Example (for Euler’s Method): Assumed correct
16
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.
17
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
18
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 h0.
19
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.
20
GLOBAL TRUNCATION ERROR
Example (for Euler’s Method): Naïve analysis: After n steps constant
21
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).
22
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.
23
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.
24
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
25
STABILITY OF THE METHOD
26
STABILITY OF THE METHOD
REMEMBER: our method is a difference equation RECALL: fixed-point iteration
27
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.
28
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. In mathematics, more specifically in real analysis, Lipschitz continuity, named after Rudolf Lipschitz, is a smoothness condition for functions which is stronger than regular continuity. Intuitively, a Lipschitz continuous function is limited in how fast it can change; a line joining any two points on the graph of this function will never have a slope steeper than a certain number called the Lipschitz constant of the function.
29
Existence and Uniqueness of Solution
Example 1: Find the Lipschitz constant for L=1
30
Existence and Uniqueness of Solution
Example 2: Find the Lipschitz constant for L=2
31
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.
32
Existence and Uniqueness of Solution
Example 3: Find the Lipschitz constant for You will get
33
Existence and Uniqueness of Solution
See Existence and Uniqueness Theorem in my MS Thesis (Analysis of Nonlinear Systems Chapter)
34
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)
35
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…
36
Examples The good The bad The ugly
Also, solutions to IVP when y(0)=0 is not unique.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.