Lecture 14: Newton’s method for system of two nonlinear equations Function newton2d01 Set initial (x,y) point, maximum number of iterations, and convergence.

Slides:



Advertisements
Similar presentations
M. Dumbser 1 / 23 Analisi Numerica Università degli Studi di Trento Dipartimento dIngegneria Civile ed Ambientale Dr.-Ing. Michael Dumbser Lecture on Numerical.
Advertisements

Introduction to Matlab
Lecture 5 Fixed point iteration Download fixedpoint.m From math.unm.edu/~plushnik/375.
Lecture 5 Newton-Raphson Method
Solution of Nonlinear Equation (b)
Pose Estimation Using Four Corresponding Points M.L. Liu and K.H. Wong, "Pose Estimation using Four Corresponding Points", Pattern Recognition Letters,
Numerical Solution of Nonlinear Equations
Suggested problems from text (6 th edition) Chapter 3.1 p85 Problems 1, 4, 9, 10 Computer problems 1, 2, 4, 7 Chapter 3.2 p101 Problems 4, 15, 17, 19 Computer.
數值方法 2008, Applied Mathematics NDHU 1 Nonlinear systems Newton’s method The steepest descent method.
Mathematics1 Mathematics 1 Applied Informatics Štefan BEREŽNÝ.
Lecture 26: Numerical Integration Trapezoid rule Simpson's rule Simpson's 3/8 rule Boole’s rule Newton-Cotes Formulas.
Numerical Methods. Read xl and xu Define the function f(xl)f(xu) : 0 xu = xm Find xm=(xl+xu)/2 Read ε(limit) & max_iteration f(xl)f(xm):0 Ea = |(xm-xmold)*100/xm|
Modified Newton Methods Lecture 9 Alessandra Nardi Thanks to Prof. Jacob White, Jaime Peraire, Michal Rewienski, and Karen Veroy.
Lecture #18 EEE 574 Dr. Dan Tylavsky Nonlinear Problem Solvers.
Dr. Jie Zou PHY Chapter 2 Solution of Nonlinear Equations: Lecture (III)
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 20 Solution of Linear System of Equations - Iterative Methods.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 19 Solution of Linear System of Equations - Iterative Methods.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 9 Roots of Equations Open Methods.
ENGG 1801 Engineering Computing MATLAB Lecture 7: Tutorial Weeks Solution of nonlinear algebraic equations (II)
If a certain transformation matrix M transforms to x1 y1 z to x2 y2 z to x3 y3 z3 Then, what is matrix M? Question : Direction Cosine.
Lectures on Numerical Methods 1 Numerical Methods Charudatt Kadolkar Copyright 2000 © Charudatt Kadolkar.
ECE602 BME I Nonlinear Equations in Biomedical Engineering (Cont’d)
Newton's Method for Functions of Several Variables
ME451 Kinematics and Dynamics of Machine Systems Newton-Raphson Method October 04, 2013 Radu Serban University of Wisconsin-Madison.
8/30/ Secant Method Major: All Engineering Majors Authors: Autar Kaw, Jai Paul
ITERATIVE TECHNIQUES FOR SOLVING NON-LINEAR SYSTEMS (AND LINEAR SYSTEMS)
Taylor Series.
This is the graph of y = sin xo
Trigonometric Equations Edited by Mr. Francis Hung Last Updated: 2013–03–12 1http:///
9/20/ Secant Method Civil Engineering Majors Authors: Autar Kaw, Jai Paul
Chapter 6 Finding the Roots of Equations
ME451 Kinematics and Dynamics of Machine Systems Numerical Solution of DAE IVP Newmark Method November 1, 2013 Radu Serban University of Wisconsin-Madison.
Newton's Method for Functions of Several Variables Joe Castle & Megan Grywalski.
Trigonometric Equations Edited by Mr. Francis Hung Last Updated:
Copyleft  2005 by Media Lab Ordinary Differential Equations Boundary Value Problems.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Roots of Equations ~ Open Methods Chapter 6 Credit:
Lecture 6 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
Lecture 3 Bisection method Download bisection02.m And ftest2.m From math.unm.edu/~plushnik/375.
11/30/ Secant Method Industrial Engineering Majors Authors: Autar Kaw, Jai Paul
Newton’s Method, Root Finding with MATLAB and Excel
Circuits Theory Examples Newton-Raphson Method. Formula for one-dimensional case: Series of successive solutions: If the iteration process is converged,
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.
Part 3 Chapter 12 Iterative Methods
Newton-Raphson Method Computer Engineering Majors Authors: Autar Kaw, Jai Paul Transforming Numerical Methods Education.
Derivation of the 2D Rotation Matrix Changing View from Global to Local X Y X’ Y’  P Y Sin  X Cos  X’ = X Cos  + Y Sin  Y Cos  X Sin  Y’ = Y Cos.
6/13/ Secant Method Computer Engineering Majors Authors: Autar Kaw, Jai Paul
Numerical Methods for Inverse Kinematics Kris Hauser ECE 383 / ME 442.
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.
CSE 330: Numerical Methods. Introduction The bisection and false position method require bracketing of the root by two guesses Such methods are called.
LECTURE 4 OF SOLUTIONS OF NON-LINEAR EQUATIONS OBJECTIVES
Secant Method.
بسم الله الرحمن الرحيم.
Secant Method – Derivation
ENGG 1801 Engineering Computing
Solving Nonlinear Equation
MATH 2140 Numerical Methods
Computers in Civil Engineering 53:081 Spring 2003
Roots of equations Class IX.
SOLUTION OF NONLINEAR EQUATIONS
Chemical Engineering Majors Authors: Autar Kaw, Jai Paul
Mathematical Solution of Non-linear equations : Newton Raphson method
3.8 Newton’s Method How do you find a root of the following function without a graphing calculator? This is what Newton did.
ECE 576 POWER SYSTEM DYNAMICS AND STABILITY
X y y = x2 - 3x Solutions of y = x2 - 3x y x –1 5 –2 –3 6 y = x2-3x.
Some Comments on Root finding
Newton-Raphson Method
Numerical Analysis – Solving Nonlinear Equations
Solutions for Nonlinear Equations
For the 1D governing equation used in the reservoir
Presentation transcript:

Lecture 14: Newton’s method for system of two nonlinear equations Function newton2d01 Set initial (x,y) point, maximum number of iterations, and convergence tolerance. for i= 1:maxiter Perform Newton update; check for convergence; print iterates end Define functions f1(x,y), and f2(x,y) and Jacobian matrix: Jacob(x,y). Download newton2d01.m

function newton2d01 %solution of system of two nonlienar equations % f1(x,y) = exp(x)*y = 0 % f2(x,y) = x*cos(y) = 0 % using a Newton iteration. Calls function f1 and f2 and % Jacobian matrix Jacob. % % Setup x = 0.2; y =.5; %initial point (x0,y0) maxiter = 25; %maximum number of iterations tol = 1.e-6; % tolerance (backward error goal) err = inf; iter = 0; disp(['Iteration number = ',num2str(iter),' x=',num2str(x),' y=',num2str(y)]); % Newton update. while err > tol & iter <= maxiter J = Jacob(x,y); rhs = -[f1(x,y);f2(x,y)]; dxy = J\rhs; x = x + dxy(1); y = y + dxy(2); err = norm([f1(x,y);f2(x,y)],Inf); iter = iter+1; disp(['Iteration number = ',num2str(iter),' x=',num2str(x),' y=',num2str(y), ' Backward error=',num2str(err)]); end

function z = f1(x,y) z = exp(x)*y; function z = f2(x,y) z = x*cos(y); function xx = Jacob(x,y) %value of Jacobian matrix xx = [exp(x)*y, exp(x); cos(y), -x*sin(y)]; Continue with function newton2d01

>> newton2d01 Iteration number = 0 x=0.2 y=0.5 Iteration number = 1 x= y= Backward error= Iteration number = 2 x= y= Backward error= Iteration number = 3 x= e-008 y= e-006 Backward error=3.2121e-006 Iteration number = 4 x=1.6822e-019 y=5.2369e-014 Backward error=5.2369e-014 >>

Inclass 1 Modify function newton2d01 to find root of the following nonlinear system: f1(x,y) = sin(y)/(x^2+1) = 0 f2(x,y) = cos(2*y)*sin(x) = 0 For initial point (x0,y0)=(0.4,0.3) and tol=10^(-14)

Iteration number = 0 x=0.4 y=0.3 Iteration number = 1 x= y= Backward error= Iteration number = 2 x= y= Backward error= Iteration number = 3 x= y= Backward error= Iteration number = 4 x=1.0521e-011 y=7.0755e-012 Backward error=1.0521e-011 Iteration number = 5 x=0 y=0 Backward error=0