Chapter 5 Numerical Root Findings

Slides:



Advertisements
Similar presentations
Numeriska beräkningar i Naturvetenskap och Teknik 1.Solving equations.
Advertisements

Chapter 4 Roots of Equations
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 51.
Lecture #18 EEE 574 Dr. Dan Tylavsky Nonlinear Problem Solvers.
Dr. Jie Zou PHY Chapter 2 Solution of Nonlinear Equations: Lecture (III)
Roots of Equations Bracketing Methods.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 9 Roots of Equations Open Methods.
Solution of Nonlinear Equations: Lecture (I)
Lectures on Numerical Methods 1 Numerical Methods Charudatt Kadolkar Copyright 2000 © Charudatt Kadolkar.
NUMERICAL METHODS WITH C++ PROGRAMMING
Fin500J: Mathematical Foundations in Finance Topic 3: Numerical Methods for Solving Non-linear Equations Philip H. Dybvig Reference: Numerical Methods.
1.4 – Solving Absolute Value Equations. Absolute Value.
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.
Derivative of an Inverse AB Free Response 3.
Newton-Raphson Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul Transforming Numerical Methods Education.
Newton-Raphson Method
Chapter 6 Finding the Roots of Equations
Lecture 3 Bisection method Download bisection02.m And ftest2.m From math.unm.edu/~plushnik/375.
Numerical Methods for Engineering MECN 3500
Dr. Jie Zou PHY Chapter 2 Solution of Nonlinear Equations: Lecture (II)
Lecture 5 - Single Variable Problems CVEN 302 June 12, 2002.
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.
4 Numerical Methods Root Finding Secant Method Modified Secant
4.8 Newton’s Method Mon Nov 9 Do Now Find the equation of a tangent line to f(x) = x^5 – x – 1 at x = 1.
Newton-Raphson Method Computer Engineering Majors Authors: Autar Kaw, Jai Paul Transforming Numerical Methods Education.
Root Finding UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
2.5 – Solving Absolute Value Equations. Absolute Value.
Absolute Value Absolute Value is the distance a number is away from zero on the number line. Find.| 4 | 4 | – 4 | 4 * Absolute Value Is ALWAYS POSITIVE!!!!*
3/7/ Bisection Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul
6/13/ Secant Method Computer Engineering Majors Authors: Autar Kaw, Jai Paul
Lecture 4 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
Numerical Methods and Optimization C o u r s e 1 By Bharat R Chaudhari.
1 4.8 – Newton’s Method. 2 The Situation Let’s find the x-intercept of function graphed using derivatives and tangent lines. |x1|x1 |x2|x2 |x3|x3 Continuing,
CSE 330: Numerical Methods. Introduction The bisection and false position method require bracketing of the root by two guesses Such methods are called.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 / Chapter 5.
Newton-Raphson Method
Newton-Raphson Method
Q1 Write a code to implement bisection method so that, given any continuous function f(x), it can (i) Count the number of roots in a domain [a,b]. (ii)
Solution of Nonlinear Equations (Root finding Problems
Numerical Methods and Analysis
Secant Method.
Newton’s Method for Systems of Non Linear Equations
LECTURE 3 OF SOLUTIONS OF NON -LINEAR EQUATIONS.
Read Chapters 5 and 6 of the textbook
Secant Method – Derivation
Roots of equations Class VII.
Chapter 1: False-Position Method of Solving a Nonlinear Equation
Important Values for Continuous functions
Newton-Raphson Method
Computers in Civil Engineering 53:081 Spring 2003
Roots of equations Class IX.
Newton-Raphson Method
Rational Exponents and Nth Roots Objectives:
Algorithms and Convergence
Newton’s Method and Its Extensions
3.8: Newton’s Method Greg Kelly, Hanford High School, Richland, Washington.
Solving Equations 3x+7 –7 13 –7 =.
FP1: Chapter 2 Numerical Solutions of Equations
3.8: Newton’s Method Greg Kelly, Hanford High School, Richland, Washington.
Assignment 1: due 1/16/19 Estimate all of the zero of x3-x2-2x+1 graphically. Write a MatLab code for Newton’s method. Use your code to refine the graphical.
Some Comments on Root finding
Newton-Raphson Method
Assignment 1: due 1/17/19 Estimate all of the zero of x3-x2-2x+1 graphically. Write a MatLab code for Newton’s method. Use your code to refine the graphical.
Comp 208 Computers in Engineering Yi Lin Winter, 2007
Solutions for Nonlinear Equations
FUNCTIONS & THEIR GRAPHS
Presentation transcript:

Chapter 5 Numerical Root Findings

Root of a continuous function The roots of a function f(x) are defined as the values for which the value of the function becomes equal to zero. So, finding the roots of f(x) means solving the equation f(x) = 0. The value of x=r such that f(r)=0 is the root for the function f. Given a continuous function in an interval, how do we find it roots?

Bisection method We shall refer to the lecture note by Dr Dana Mackey, Dublin Institute of Technology: http://www.maths.dit.ie/~dmackey/lectures/Roots.pdf

Bisection method, figure Figure credit: http://cse.unl.edu/~sincovec/Matlab/Lesson%2010/CS211%20Lesson%2010%20- %20Program%20Design.htm

The algorithm of bisection method Suppose we wish to find the root for f(x), and we have an error tolerance of ε (the absolute error in calculating the root must be less that ε). Step 1: Find two numbers a and b at which f has different signs. Step 2: Define c = (a + b)/2. Step 3: If |f(c)| ≤ ε then accept c as the root and stop. Step 4: If f(a)f(c) ≤ 0 then set c as the new b. Otherwise, set c as the new a. Return to step 1.

Exercise Find a root of the equation x6 − x − 1 = 0 accurate to within ε = 0.001. We will need to implement the algorithm using While command. See bisection_rootfinding.nb. The function contains two roots but the code only finds one. As an exercise, modify it to find the other root manually.

Exercise Modify the code bisection_rootfinding.nb so that it can automatically find both roots of the equation x6 − x − 1 = 0 accurate to within ε = 0.001, without manual intervention.

Exercise Modify your code further so that, given any continuous function f(x), it can (i) Count the number of roots in a domain [a,b]. (ii) Evaluate each of these roots one by one in sequence. Try your code on the following functions (i) f(x) = ex − x − 2, for all x. (ii) f(x) = x3 + 2x2 − 3x − 1, for all x (iii) f(x) = (1/x) sin x, for all x. (iv) f(x) = tan(πx) − x − 6, for 0 <= x <= 2Pi. Use ε = 0.001. You code is suppose to be able to find out the roots in all the functions automatically and without manual intervention.

Newton-Raphson Method

Newton-Raphson Method The code Newton_method_root_finding.nb finds a root of the following equations using Newton method based on an initial guess: (i) f(x) = ex − x − 2 (ii) f(x) = x3 + 2x2 − 3x − 1 (iii) f(x) = (1/x) sin x (iv) f(x) = tan(πx) − x − 6

Exercise Modify the code Newton_method_root_finding.nb so that it can find all the roots using Newton method for all the following functions automatically and without manual intervention: (i) f(x) = ex − x − 2, for all x. (ii) f(x) = x3 + 2x2 − 3x − 1, for all x (iii) f(x) = (1/x) sin x, for all x. (iv) f(x) = tan(πx) − x − 6, for 0 <= x <= 2Pi. Use ε = 0.001.