MATH 175: NUMERICAL ANALYSIS II Lecturer: Jomar Fajardo Rabajante IMSP, UPLB 2 nd Semester AY 2012-2013.

Slides:



Advertisements
Similar presentations
“Teach A Level Maths” Vol. 2: A2 Core Modules
Advertisements

3- 1 Chapter 3 Introduction to Numerical Methods Second-order polynomial equation: analytical solution (closed-form solution): For many types of problems,
Lecture 5 Newton-Raphson Method
Roundoff and truncation errors
CSE 330: Numerical Methods
Civil Engineering Majors Author(s): Autar Kaw, Jai Paul
Chapter 4 Roots of Equations
Second Term 05/061 Roots of Equations Bracketing Methods.
Open Methods (Part 1) Fixed Point Iteration & Newton-Raphson Methods
Roots of Equations Bracketing Methods.
Lectures on Numerical Methods 1 Numerical Methods Charudatt Kadolkar Copyright 2000 © Charudatt Kadolkar.
Lecture 1: Numerical Solution of Non-linear equations.
Dr. Marco A. Arocha Aug,  “Roots” problems occur when some function f can be written in terms of one or more dependent variables x, where the.
NUMERICAL METHODS WITH C++ PROGRAMMING
FP1: Chapter 2 Numerical Solutions of Equations
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Theorems on continuous functions. Weierstrass’ theorem Let f(x) be a continuous function over a closed bounded interval [a,b] Then f(x) has at least one.
Lesson 2.5 The Fundamental Theorem of Algebra. For f(x) where n > 0, there is at least one zero in the complex number system Complex → real and imaginary.
Scientific Computing Algorithm Convergence and Root Finding Methods.
MA2213 Lecture 4 Numerical Integration. Introduction Definition is the limit of Riemann sums I(f)
Continuity ( Section 1.8) Alex Karassev. Definition A function f is continuous at a number a if Thus, we can use direct substitution to compute the limit.
Chapter 6 Finding the Roots of Equations
10/21/ Bisection Method Major: All Engineering Majors Authors: Autar Kaw, Jai Paul
Lecture 3 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
1 Nonlinear Equations Jyun-Ming Chen. 2 Contents Bisection False Position Newton Quasi-Newton Inverse Interpolation Method Comparison.
Lecture 6 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
Chapter 3 Roots of Equations. Objectives Understanding what roots problems are and where they occur in engineering and science Knowing how to determine.
Numerical Methods for Engineering MECN 3500
Boundary Value Problems l Up to this point we have solved differential equations that have all of their initial conditions specified. l There is another.
Numerical Methods.
Newton’s Method, Root Finding with MATLAB and Excel
Today’s class Roots of equation Finish up incremental search
linear  2.3 Newton’s Method ( Newton-Raphson Method ) 1/12 Chapter 2 Solutions of Equations in One Variable – Newton’s Method Idea: Linearize a nonlinear.
Numerical Methods Solution of Equation.
Today’s class Numerical differentiation Roots of equation Bracketing methods Numerical Methods, Lecture 4 1 Prof. Jinbo Bi CSE, UConn.
Iteration Methods “Mini-Lecture” on a method to solve problems by iteration Ch. 4: (Nonlinear Oscillations & Chaos). Some nonlinear problems are solved.
1/29/ Bisection Method Computer Engineering Majors Authors: Autar Kaw, Jai Paul
SOLVING NONLINEAR EQUATIONS. SECANT METHOD MATH-415 Numerical Analysis 1.
INTRO TO OPTIMIZATION MATH-415 Numerical Analysis 1.
CSE 330: Numerical Methods. What is true error? True error is the difference between the true value (also called the exact value) and the approximate.
Lecture 4 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
MATH 175: Numerical Analysis II Lecturer: Jomar Fajardo Rabajante IMSP, UPLB 2 nd Sem AY
7/11/ Bisection Method Major: All Engineering Majors Authors: Autar Kaw, Jai Paul
1 M 277 (60 h) Mathematics for Computer Sciences Bibliography  Discrete Mathematics and its applications, Kenneth H. Rosen  Numerical Analysis, Richard.
Answers for Review Questions for Lectures 1-4. Review Lectures 1-4 Problems Question 2. Derive a closed form for the estimate of the solution of the equation.
MATH 175: Numerical Analysis II
Numerical Methods and Analysis
Read Chapters 5 and 6 of the textbook
Chemical Engineering Majors Authors: Autar Kaw, Jai Paul
Numerical Analysis Lecture 7.
Roots of equations Class IX.
Bisection Method.
MATH 175: Numerical Analysis II
Intermediate Value Theorem
SOLUTION OF NONLINEAR EQUATIONS
Intermediate Value Theorem
MATH 174: Numerical Analysis I
Continuity Alex Karassev.
MATH 174: NUMERICAL ANALYSIS I
Math 175: Numerical Analysis II
MATH 175: Numerical Analysis II
Newton-Raphson Method
Mechanical Engineering Majors Authors: Autar Kaw, Jai Paul
MATH 175: Numerical Analysis II
MATH 175: NUMERICAL ANALYSIS II
Copyright © Cengage Learning. All rights reserved.
MATH 1910 Chapter 3 Section 8 Newton’s Method.
Industrial Engineering Majors Authors: Autar Kaw, Jai Paul
1 Newton’s Method.
Major: All Engineering Majors Authors: Autar Kaw, Jai Paul
Presentation transcript:

MATH 175: NUMERICAL ANALYSIS II Lecturer: Jomar Fajardo Rabajante IMSP, UPLB 2 nd Semester AY

CHAPTER 1: NUMERICAL METHODS IN SOLVING NONLINEAR EQUATIONS This chapter involves numerically solving for the roots of an equation or zeros of a function. e.g. Solve for x in This problem may boil down in solving for the root ofor solving for the zeros of

Go back to HS Math or Math 17 The whole of Elementary Algebra (including college algebra) generally focuses on the ways and means of easily solving equations (or systems of equations)… Why do we factor? Why do we simplify? Do these methods have real life applications? Probably, none? Ahhh… Solving equations has...

Recall MATH MODELING IN HIGH SCHOOL AND EARLY MATH SERIES… Example: Age problem!!! We need a working EQUATION in solving this problem… and how can we solve it?

Recall Let us say we have a quadratic equation: - we can use factoring - we can use completing the square - we can use quadratic formula But what if we have a cubic equation - we can use Cardano’s formula

Deadlock… What if we have a polynomial of degree 8? Note that, from a theorem in Algebra (by Abel), we cannot have a closed-form formula for polynomials of degree higher than 4. Or an equation involving transcendentals? e.g.

A Naïve way… GRAPH IT!!! Then get the zeros of f !!!

You can use MS Excel, GraphCalc, Grapes, etc…

A Naïve way… Ah, eh… but what is the exact value? Or if we cannot get the exact value, what is the nearest solution? (say with error at most )

First Method: Exhaustive search or Incremental search Just use MS Excel… Let’s say we want to get this zero

=COS(A123)+5*SIN(A123) +EXP(A123^2)-4 =A

We want f(x)=0, so if f(0.3919)= ≈0, then our APPROXIMATE solution is Smaller step sizes increases our accuracy. However, we cannot measure the order of convergence.

First Method: Exhaustive search or Incremental search Exhaustive search may miss a blip:

Second Method: Bisection (a bracketing method) Recall IVT (specifically the Intermediate Zero Theorem) and Math 174 discussion about Bisection Method

Second Method: Bisection 1.Given f(x), choose the initial interval [x 1,1,x 2,1 ] such that f(x 1,1 )*f(x 2,1 )<0. Input tol, the tolerance error level. Input kmax, maximum number of iterations. Define a counter, say k, to keep track of the number of bisections performed. 2.For k<kmax+2 (starting k=2), compute x 3,k := (x 1,k-1 + x 2,k-1 )/2. Set x 3,1 := x 1,1. If |x 3,k – x 3,k-1 |<tol then print results and exit the program (the root is found in k-1 iterations). Otherwise, if f(x 1,k-1 )*f(x 3,k )<0 then set x 2,k := x 3,k and x 1,k := x 1,k-1, else set x 1,k := x 3,k and x 2,k := x 2,k-1. 3.If convergence is not obtained in kmax+1 iterations, inform the user that the tolerance criterion was not satisfied, and exit the program.

DIFFERENT STOPPING CRITERION Recall Math 174 Terminate when: If tol=10 -n, then x 3,k should approximate the true value to n decimal places or n significant digits delikado

DIFFERENT STOPPING CRITERION Recall Math 174 Terminate when: Iterations have gone on “long enough”

Second Method: Bisection Notice that this algorithm locates only one root of the equation at a time. When an equation has multiple roots, it is the choice of the initial interval provided by the user which determines which root is located. The contrary condition, f(a)*f(b)>0 does NOT imply that there are no real roots in the interval [a,b]. Convergence of bisection method is guaranteed provided that IVT (IZT) is always met in every iteration.

Second Method: Bisection The bisection algorithm will fail in this case

Second Method: Bisection The bisection algorithm may also fail in these cases: -not continuous on the initial interval -multiple roots (may fail to converge to the desired root). It is better to bracket only one root.

Second Method: Bisection How many iterations do we need to have an answer accurate at least up to m decimal places? Let n be the number of iterations, n>1. Note that the computed n should be rounded-up to the nearest integer.

Second Method: Bisection DERIVATION Length of the 1 st interval: b – a Length of the 2 nd interval: (b – a)/2 Length of the n-th interval: (b – a)/2 n–1 At the n-th iteration we get the midpoint, so the length of the interval will become: (b – a)/2 n

Second Method: Bisection DERIVATION Let x* be the exact root. HENCE, THE (worst-case) NUMBER OF ITERATIONS NEEDED IS:

ORDER OF CONVERGENCE (Q-convergence) Given an asymptotic error constant λ>0, the sequence {x 3,k } converges to x* with order p>0 iff Order of convergence: p If p=1, rate of convergence: O(λ k )

ORDER OF CONVERGENCE When p=1 If 0<λ<1, then the sequence {x 3,k } converges to x* linearly If λ=1, then the sequence {x 3,k } converges to x* sublinearly If λ=0, then the sequence {x 3,k } converges to x* superlinearly, meaning it is possibly also of quadratic order, or possibly of higher order (but definitely faster than mere linear, e.g. p=1.6, p=2, p=3, etc… ) As λ becomes nearer to 0, the convergence gets faster.

ORDER OF CONVERGENCE When p=r>1 If 0<λ< ∞, then the sequence {x 3,k } converges to x* with order r If λ= ∞, then the sequence {x 3,k } converges to x* with order less than r If λ=0, then the sequence {x 3,k } converges to x* possibly also with order r+1 or possibly of higher order (but definitely faster than mere order r ) As λ becomes nearer to 0, the convergence gets faster.

Second Method: Bisection ORDER OF CONVERGENCE Recall: Hence, bisection method converges to the root linearly (p=1… slow!) Rate of convergence: O(1/2 k ) meaning the error is reduced by half in every iteration.