Newton-Raphson Method--Convergence of the Roots.

Similar documents
Oscillation around a local maxima of minima--newton-raphson Method.

Direct Method of Interpolation - Simulation.

Integration Using the Gauss Quadrature Rule - Convergence

Romberg Integration - Method

The Bisection Method versus Newton s Method in Maple (Classic Version for Windows)

C3 Numerical methods

FPGA Implementation of the Complex Division in Digital Predistortion Linearizer

SYSTEMS OF NONLINEAR EQUATIONS

Today s class. Roots of equation Finish up incremental search Open methods. Numerical Methods, Fall 2011 Lecture 5. Prof. Jinbo Bi CSE, UConn

9.1: GRAPHING QUADRATICS ALGEBRA 1

Visualizing Linear Transformations in R 3

Section 18-1: Graphical Representation of Linear Equations and Functions

Direction Fields; Euler s Method

MA 111 Project #1 Curve Fitting

Newton s Method. Example : Find the root of f (x) =

You will need to use a calculator for this worksheet A (1, 1)

Lagrange Multipliers

Iteration. The final line is simply ending the do word in the first line. You can put as many lines as you like in between the do and the end do

MEI Conference Teaching numerical methods using graphing technology

Thursday 14 June 2012 Morning

Quadratic Functions Dr. Laura J. Pyzdrowski

Computers in Engineering Root Finding Michael A. Hawker

Maclaurin series. To create a simple version of this resource yourself using Geogebra:

(ii) Use Simpson s rule with two strips to find an approximation to Use your answers to parts (i) and (ii) to show that ln 2.

2.4. Rates of Change and Tangent Lines. Copyright 2007 Pearson Education, Inc. Publishing as Pearson Prentice Hall

Graphing Transformations Techniques -- Team Project Packet A

Introduction to C++ Introduction to C++ Week 6 Dr Alex Martin 2013 Slide 1

Elementary Functions

Warm - Up. Sunday, February 1, HINT: plot points first then connect the dots. Draw a graph with the following characteristics:

5/21/08 2:16 PM \\eng\files\numerical Methods\sim...\mtl_dif_sim_secondorderdif.m 1 of 5

f( x ), or a solution to the equation f( x) 0. You are already familiar with ways of solving

AC : MATHEMATICAL MODELING AND SIMULATION US- ING LABVIEW AND LABVIEW MATHSCRIPT

Reals 1. Floating-point numbers and their properties. Pitfalls of numeric computation. Horner's method. Bisection. Newton's method.

PAST QUESTIONS ON INTEGRATION PAPER 1

This document describes how I implement the Newton method using Python and Fortran on the test function f(x) = (x 1) log 10 (x).

Numerical Methods Lecture 7 - Optimization

EXPLORING RATIONAL FUNCTIONS GRAPHICALLY

Drawing fractals in a few lines of Matlab

Name Course Days/Start Time

Brenda Lynch TI Summit Algebra 1 October 20, 2012

Computational Mathematics/Information Technology. Worksheet 2 Iteration and Excel

Principles of Linear Algebra With Maple TM The Newton Raphson Method

1 Programs for double integrals

Objective. m y 1 y = x 1 x 2

Practice with Parameterizing Curves and Surfaces. (Part 1)

MEI STRUCTURED MATHEMATICS. MEI conference University of Hertfordshire June C3 COURSEWORK

Section 4.3. Graphing Exponential Functions

MACM 204 Makeup Assignment - Practice Final.

[1] CURVE FITTING WITH EXCEL

Sec 4.1 Coordinates and Scatter Plots. Coordinate Plane: Formed by two real number lines that intersect at a right angle.

Introduction to CS graphs and plots in Excel Jacek Wiślicki, Laurent Babout,

First of all, we need to know what it means for a parameterize curve to be differentiable. FACT:

Excel and the solution of linear and non-linear simultaneous equations. Part 1

Circle Tangent Secant Chord Angle Kuta

Module 4 : Solving Linear Algebraic Equations Section 11 Appendix C: Steepest Descent / Gradient Search Method

Escape-Time Fractals

Introduction to Numerical Computing

Math 467 Homework Set 1: some solutions > with(detools): with(plots): Warning, the name changecoords has been redefined

1.1 - Functions, Domain, and Range

Graphical Approach to Solve the Transcendental Equations Salim Akhtar 1 Ms. Manisha Dawra 2

Graphing and Equations

CS101 Computer Programming and Utilization

APPENDICES. APPENDIX A Calculus and the TI-82 Calculator. Functions. Specific Window Settings

Lab 5 Excel Spreadsheet Introduction

EXAMPLE. 1. Enter y = x 2 + 8x + 9.

8/31/08 12:02 AM C:\Documents and Settings\SR.IA-3\Des...\mtl_aae_sim_quadratic.m 1 of 6

Paste them together (lining up the x-axis in each piece) to create the graph of the piecewise-defined function.

Approximate First and Second Derivatives

MAC Learning Objectives. Transformation of Graphs. Module 5 Transformation of Graphs. - A Library of Functions - Transformation of Graphs

MAC Module 5 Transformation of Graphs. Rev.S08

Lecture 10 Root Finding using Open Methods. Dr.Qi Ying

Module 3: Graphing Quadratic Functions

Test Name: Chapter 3 Review

UNIT 8: SOLVING AND GRAPHING QUADRATICS. 8-1 Factoring to Solve Quadratic Equations. Solve each equation:

UNIT 3B CREATING AND GRAPHING EQUATIONS Lesson 4: Solving Systems of Equations Instruction

Tangent line problems

Final Exam Review Algebra Semester 1

HSC Mathematics - Extension 1. Workshop E2

Rational functions, like rational numbers, will involve a fraction. We will discuss rational functions in the form:

Graphs of Rational Functions

Function Transformations and Symmetry

13.6 Directional derivatives,

2. The diagram shows part of the graph of y = a (x h) 2 + k. The graph has its vertex at P, and passes through the point A with coordinates (1, 0).

9.1 Parametric Curves

Functions of Several Variables, Limits and Derivatives

Slope of the Tangent Line. Estimating with a Secant Line

STATISTICS 579 R Tutorial: More on Writing Functions

AH Properties of Functions.notebook April 19, 2018

Analyzing Change: Extrema and Points of Inflection & 5.1 Optimization

Name Date Period. Worksheet 6.3 Volumes Show all work. No calculator unless stated. Multiple Choice

Graphing Techniques. Domain (, ) Range (, ) Squaring Function f(x) = x 2 Domain (, ) Range [, ) f( x) = x 2

The derivative of a function at one point. 1. Secant lines and tangents. 2. The tangent problem

September 18, B Math Test Chapter 1 Name: x can be expressed as: {y y 0, y R}.

7.8. Approximate Integration

Classroom Tips and Techniques: Drawing a Normal and Tangent Plane on a Surface

The New Bisection Plus Algorithm by Namir Shammas

14.6 Directional Derivatives and the Gradient Vector

Graphs of Polynomial Functions. Use the information that you get from the Maple output to do the following:

A large number of user subroutines and utility routines is available in Abaqus, that are all programmed in Fortran. Subroutines are different for

Section 1.1 The Distance and Midpoint Formulas

Transcription:

Newton-Raphson Method--Convergence of the Roots. 2003 Nathan Collier, Autar Kaw, Jai Paul, Michael Keteltas, University of South Florida, kaw@eng.usf.edu, http://numericalmethods.eng.usf.edu/mws NOTE: This worksheet demonstrates the use of Maple to illustrate the convergence of the roots using the Newton-Raphson method of finding roots of a nonlinear equation. Introduction Newton-Raphson method [text notes][ppt] is based on the principle that if the initial guess of the root of f(x) = 0 is at x i, then if one draws the tangent to the curve at f( x i ), the point x i+ 1 where the tangent crosses the x-axis is an improved estimate of the root. Using the definition of the slope of a function, f ( xi ) xi+ 1 = xi f '( x ) The following simulation illustrates the convergence of the roots using Newton-Raphson method of finding roots of a nonlinear equation. > restart; i Section I : Data. The following is the data that is used to solve the nonlinear equation which is obtained from the floating ball problem from the General Engineering to find the depth 'x' to which the ball is submerged under water Function in f(x)=0 > f(x):=x^3-0.165*x^2+3.993*10^(-4): Initial guess > x0:=0.05: Upper bound of range of 'x' that is desired > uxrange:=0.12: Lower bound of range of 'x' that is desired > lxrange:=-0.02: Maximum number of iterations > nmax:=5: Enter the umber of the root desired > rootnumber:=1:

Section II: Before you start. The derivative of the given function is found before we start. > g(x):=diff(f(x),x); g( x ):= 3 x 2 0.330 x We now plot the data. The following function determines the upper and lower ranges on the Y-axis. This is done using the upper and lower ranges of the X-axis specified, and the value of the original functional at these values. > yranger:=proc(uxrange,lxrange) local i,maxi,mini,tot; maxi:=eval(f(x),x=lxrange); mini:=eval(f(x),x=lxrange); for i from lxrange by (uxrange-lxrange)/10 to uxrange do if eval(f(x),x=i)<mini then mini:=eval(f(x),x=i) end if; if eval(f(x),x=i)>maxi then maxi:=eval(f(x),x=i) end if; end do; tot:=maxi-mini; -0.1*tot+mini..0.1*tot+maxi; > yrange:=yranger(uxrange,lxrange): > xrange:=lxrange..uxrange: The following calls are needed to use the plot function > with(plots): Warning, the name changecoords has been redefined > with(plottools): Warning, the name arrow has been redefined > plot(f(x),x=xrange,y=yrange,title="entered function on given interval",legend=["function"],thickness=3);

Section III: True Value. The "true" solution is taken as the solution that Maple's numerical root solver obtains. This is a decent assumption because their subroutines have been professionally written. You must take caution, however, because Maple's "RootOf" function might be finding another of the function's roots. For the rest of the sheet to be correct, you need to ensure that xrtrue is the root that you are attempting to find. This can be altered by changing the value of 'rootnumber' above. > xrtrue:=rootof(f(x),x,index=rootnumber): > xrtrue:=evalf(xrtrue);

xrtrue := 0.06237758151 Section IV: Value of root as a function of iterations. Here the Newton-Raphson method algorithm is applied to generate the values of the roots, true error, absolute relative true error, approximate error, absolute relative approximate error, and the number of significant digits at least correct in the estimated root as a function of number of iterations. > xr:=proc(n) local p, q, i; p:=x0; q:=x0; for i from 1 to n do p:=q-eval(f(x),x=q)/eval(g(x),x=q); q:=p; end do; p; > nrange:=1..nmax: Absolute true error > Et:=proc(n) abs(xrtrue-xr(n)); Absolute relative true error > et:=proc(n) abs(et(n)/xrtrue)*100; Absolute approximate error > Ea:=proc(n) abs(xr(n)-xr(n-1)); Absolute relative approximate error > ea:=proc(n) local p;

if n <=1 then p:=0; else p:=abs(ea(n)/xr(n))*100; end if; p; Significant digits at least correct > sigdigits:=proc(n) local p; p:=floor((2-log10(ea(n)/0.5))); if p<0 then p:=0 end if; p; Section V: Graphs of Results. > plot(xr,nrange,title="estimated root as a function of number of iterations",thickness=3,color=red);

> plot(et,nrange,title="absolute true error as a function of number of iterations",thickness=3,color=navy);

> plot(et,nrange,title="absolute relative true error as a function of number of iterations",thickness=3,color=blue);

> plot(ea,nrange,title="absolute approximate error as a function of number of iterations",thickness=3,color=aquamarine);

> plot(ea,nrange,title="absolute relative approximate error as a function of number of iterations",thickness=3,color=green);

> plot(sigdigits,nrange,title="number of significant digits at least correct as a function of number of iterations",thickness=3,color=gold);

> Section VI: Conclusion. Maple helped us to apply our knowledge of numerical methods of finding roots of a nonlinear equation using the Newton-Raphson method to simulate the convergence of the root of the given nonlinear equation. References [1] Nathan Collier, Autar Kaw, Jai Paul, Michael Keteltas, Holistic Numerical Methods Institute, See http://numericalmethods.eng.usf.edu/mws/gen/03nle/mws_gen_nle_txt_newton.pdf Disclaimer: While every effort has been made to validate the solutions in this worksheet, University of South Florida and the contributors are not responsible for any errors contained and are not liable for any damages resulting from the use of this material.