MA2213 Lecture 9 Nonlinear Systems. Midterm Test Results.

Slides:



Advertisements
Similar presentations
This theorem allows calculations of area using anti-derivatives. What is The Fundamental Theorem of Calculus?
Advertisements

Partial Differential Equations
Mathematics1 Mathematics 1 Applied Informatics Štefan BEREŽNÝ.
CSE 330: Numerical Methods
ESSENTIAL CALCULUS CH11 Partial derivatives
MA Day 24- February 8, 2013 Section 11.3: Clairaut’s Theorem Section 11.4: Differentiability of f(x,y,z) Section 11.5: The Chain Rule.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Newton’s Method Application to LMS Recursive Least Squares Exponentially-Weighted.
A second order ordinary differential equation has the general form
Function Optimization Newton’s Method. Conjugate Gradients
The Derivative. Objectives Students will be able to Use the “Newton’s Quotient and limits” process to calculate the derivative of a function. Determine.
NUMERICAL METHODS WITH C++ PROGRAMMING
Boyce/DiPrima 9 th ed, Ch 3.1: 2 nd Order Linear Homogeneous Equations-Constant Coefficients Elementary Differential Equations and Boundary Value Problems,
Secant Method Another Recursive Method. Secant Method The secant method is a recursive method used to find the solution to an equation like Newton’s Method.
Ch 2.2: Separable Equations In this section we examine a subclass of linear and nonlinear first order equations. Consider the first order equation We can.
Roots of a Polynomial: Root of a polynomial is the value of the independent variable at which the polynomial intersects the horizontal axis (the function.
Applied Discrete Mathematics Week 9: Relations
MA2213 Lecture 1 Rootfinding. Class Schedule Lectures: Tuesday 2-4 in LT31 (building S16) Groups:Class will be divided into 5 groups Each group (of about.
Numerical Computation Lecture 0: Course Introduction Dr. Weifeng SU United International College Autumn 2010.
MA2213 Lecture 4 Numerical Integration. Introduction Definition is the limit of Riemann sums I(f)
5.5 The Substitution Rule In this section, we will learn: To substitute a new variable in place of an existing expression in a function, making integration.
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.
CSE 541 Rick Parent ELEMENTARY NUMERICAL METHODS Winter 2012.
Ch 2.2: Separable Equations In this section we examine a subclass of linear and nonlinear first order equations. Consider the first order equation We can.
Chapter 8 With Question/Answer Animations 1. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
Block 4 Nonlinear Systems Lesson 14 – The Methods of Differential Calculus The world is not only nonlinear but is changing as well 1 Narrator: Charles.
MA Day 25- February 11, 2013 Review of last week’s material Section 11.5: The Chain Rule Section 11.6: The Directional Derivative.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 31.
Curve-Fitting Regression
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.
Matrix Differential Calculus By Dr. Md. Nurul Haque Mollah, Professor, Dept. of Statistics, University of Rajshahi, Bangladesh Dr. M. N. H. MOLLAH.
Scientific Computing General Least Squares. Polynomial Least Squares Polynomial Least Squares: We assume that the class of functions is the class of all.
Problem of the Day No calculator! What is the instantaneous rate of change at x = 2 of f(x) = x2 - 2 ? x - 1 A) -2 C) 1/2 E) 6 B) 1/6 D) 2.
11/30/ Secant Method Industrial Engineering Majors Authors: Autar Kaw, Jai Paul
CHAPTER 3 NUMERICAL METHODS
Example Ex. Find Sol. So. Example Ex. Find (1) (2) (3) Sol. (1) (2) (3)
Applications of Differentiation Section 4.2 The Mean Value Theorem
Newton’s Method, Root Finding with MATLAB and Excel
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.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 7 Roots of Polynomials.
Ch.3 The Derivative. Differentiation Given a curve y = f(x ) Want to compute the slope of tangent at some value x=a. Let A=(a, f(a )) and B=(a +  x,
Ch 2.1: Linear Equations; Method of Integrating Factors A linear first order ODE has the general form where f is linear in y. Examples include equations.
Chapter 2-OPTIMIZATION G.Anuradha. Contents Derivative-based Optimization –Descent Methods –The Method of Steepest Descent –Classical Newton’s Method.
The formulae for the roots of a 3rd degree polynomial are given below
Searching a Linear Subspace Lecture VI. Deriving Subspaces There are several ways to derive the nullspace matrix (or kernel matrix). ◦ The methodology.
Amir Yavariabdi Introduction to the Calculus of Variations and Optical Flow.
6/13/ Secant Method Computer Engineering Majors Authors: Autar Kaw, Jai Paul
Announcements Topics: -sections 6.4 (l’Hopital’s rule), 7.1 (differential equations), and 7.2 (antiderivatives) * Read these sections and study solved.
MA2213 Lecture 10 ODE. Topics Importance p Introduction to the theory p Numerical methods Forward Euler p. 383 Richardson’s extrapolation.
Topic 4 Functions Graphs’ key features: Domain and Range Intercepts
MA2213 Lecture 12 REVIEW. 1.1 on page Compute Compute quadratic Taylor polynomials for 12. Compute where g is the function in problems 11 and 12.
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.
CHAPTER 3 NUMERICAL METHODS
Modeling with Recurrence Relations
Ch 2.2: Separable Equations
The formulae for the roots of a 3rd degree polynomial are given below
FE Exam Tutorial
Advanced Numerical Methods (S. A. Sahu) Code: AMC 51151
A second order ordinary differential equation has the general form
Systems of First Order Linear Equations
Solution of Equations by Iteration
6.5 Taylor Series Linearization
3.8 Newton’s Method How do you find a root of the following function without a graphing calculator? This is what Newton did.
Newton’s Method and Its Extensions
Chapter 7 Functions of Several Variables
Some Comments on Root finding
Newton-Raphson Method
Copyright © Cengage Learning. All rights reserved.
MATH 1910 Chapter 3 Section 8 Newton’s Method.
Presentation transcript:

MA2213 Lecture 9 Nonlinear Systems

Midterm Test Results

Topics Roots of One Nonlinear Equation in One Variable Secant Method pages Roots of Nonlinear Systems (n Equations, n Variables) Newton’s Method pages Calculus Review : Intermediate Value Theorem, Newton’s Method pages Mean Value Theorems for Derivatives and Integrals Applications to Eigenvalue-Eigenvector Calculation Applications to Optimization

Mean Value Theorem for Derivatives Theorem A.4 p. 494 Let There there is at least one point such that

Newton’s Method Newton’s method is based on approximating the graph of y = f(x) with a tangent line and on then using a root of this straight line as an approximation to the root of f(x)

Error of Newton’s Method Newton’s iteration for finding a rootof Mean Value Theorem  between  the error satisfies and Mean Value Theorem  betweenand  Question Compare B with estimate in slides 33,34 Lect 1

MATLAB for Newton’s Method MATLAB implementation of formula 3.27 on page 91 Start with one estimate >> x(1)=2; f(1) = x(1)^6-x(1)-1 >> for n = 1:10 S = 6*x(n)^5 – 1; x(n+1) = x(n) – f(n) / S; f(n+1) = x(n+1)^6 – x(n) – 1; end For n = 1:nmax end >> x' ans = Example pages 91-92

Secant Method is based on approximating the graph of y = f(x) with a secant line and on then using a root of this straight line as an approximation to the root of f(x)

Error of Secant Method It can be shown, using methods from calculus that we used to derive error bounds for Newton’s method, that the sequence of estimates computed using the secant method satisfy equation 3.28 on page 92 where is betweenand is between the largest and smallest of The analysis on page 92 and Problem 8 on pages shows, using the growth of the Fibonacci sequence, that and c is a constant

MATLAB for Secant Method MATLAB implementation of formula 3.27 on page 91 Start with two estimates >> x(1)=2; f(1) = x(1)^6-x(1)-1 >> x(2)=1; f(2) = x(2)^6-x(2)-1 >> for n = 1:9 S = (f(n+1)-f(n)) / (x(n+1)-x(n)); x(n+2) = x(n+1) - (x(n+1)^6-x(n+1) - 1) / S; f(n+2) = x(n+2)^6-x(n+2)-1; end For n = 1:nmax end >> x' ans = Example pages 91-92

Applications of Secant Method The secant method is particularly useful for finding roots of a function Example 1. The frequency where of gene (that causes certain moths to be black) in the n-th generation satisfies selection coefficient, so the MATLAB algorithm below hence Newton’s method is useless. that is defined by an algorithm. In this case there may not even exist an algorithm to compute the derivative of >> b(1) = >> s =.33; >> for n = 1:50 b(n+1) = b(n)/(1-s*(1-b(n))^2); end is the defines a function that equals the frequency of genes in the 50 th generation if the frequency in the 1 st generation = and the selection coefficient = s

Applications of Secant Method

Motivation Let us consider two equations in two variables Question What are the graphs of these equations ? Ifis an initial guess (and approximate zero of both f and g) then we may approximate f and g by linear functions

Motivation We can express this in matrix form as where M is the matrix of derivatives defined by If M is invertible then a reasonable next guess is Question Why is this guess reasonable ?

Motivation Example For f, g on slide 13 and Question What should the next guess be ? Question What happed to the residual ?

The General Newton Method We change notation To obtain Newton’s method we let x = current estimate Taylor’s Theorem & Chain Rule Imply and choose the next estimate to be where makes the right side above = 0

The General Newton Method For a general system on n-equations in n-variables

Eigenvalue-Eigenvector Application For then Result If constructby is an eigenvector of a simple eigenvalue is nonsingular. Proof corresponding to a then

MATLAB for Newton Eig-Eig function [v,l] = newt(A,v0,l0,niter) % function [v,l] = newt(A,v0,l0,niter) % % Inputs: % A is a complex 4 x 4 matrix % v0 initial eigenvector estimate % l0 initial eigenvalue estimate % niter = number of iterations % Outputs: % v = eigenvector % l = eigenvalue Id = eye(4); % 4 x 4 identity matrix x = [v0;l0]; % ‘system’ vector v = x(1:4); l = x(5); for k = 1:niter B=A -l*Id; J = [B -v;v' 0]; res = [B*v;.5*v'*v-.5]; x = x - J\res; v = x(1:4); l = x(5); end v = x(1:4); l = x(5); Question In the k-loop what name is given to the derivative matrix ? Question Under what the conditions is res = 0 ?

Computation of Real Eig-Eig >> [A V diag(D)] ans = >> v0 = [ ]' >> l0 = 3 >> niter = 4; >> [v,l] = newt(A,v0,l0,niter); >> v-V(:,3) ans = 1.0e-010 * >> l-D(3,3) ans = e-012

Computation of Complex Eig-Eig >> [A diag(D)] i i >> V i i i i i i

Computation of Complex Eig-Eig >> (v0./V(:,3))/(v0(1)/V(1,3)) i i i >> l0/D(3,3) i >> [v,l] = newt(A,v0,l0,4); >> (v./V(:,3))/(v(1)/V(1,3)) i i i >> l/D(3,3) i

Taylor’s Theorem in Several Variables Taylor’s theorem applied to yields and the chain rule implies that this matrix of second derivatives of G is the Hessian of G at x

Optimization Theorem Ifis continuously differentiable and has a local minimum / local maximum at then is positive / negative definite,and the Hessian Ifis twice continuously differentiable, thenhas a local minimum / local maximum at Proof If G has a local minimum at p, then henceand similarly for a local maximum. Positive / negative definite means> / < 0 whenever hence pos / neg def and implies thereforehas a local minimum / maximum at

Homework Due Lab 5 (Week 12, 5-9 November) 1.Write a MATLAB Program to implement the secant method and use it to (a) do Problem 1 on page 96, (b) do 15 iterations to solve the problem in Example on page 91 and for that example verify that the error satisfies the approximation 3.31 on page 92 and estimate the value of the constant c numerically and compare with the formula at the bottom of page 92. You should study Problem 8 on pages to know how the error estimate is derived and its relationship to the Fibonacci sequence 2. Write a MATLAB program to compute the function f in slide 11 and use it with the program for the secant method (that you wrote for Problem 1) to compute a value of s such that f(s)= 0.7 Suggestion: Start with s(1) =.33 and s(2) = Do problems 1, 2, and 3 on page 364 of the textbook 4. Extra Credit: Write a MATLAB program to compute the position of an airplane from its approximate position and its distance from three GPS satellites. Synthesize some data and test the program.