Web-Books
in the Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Page - 197 -
  • User
  • Version
    • full version
    • text only version
  • Language
    • Deutsch - German
    • English

Page - 197 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Image of the Page - 197 -

Image of the Page - 197 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Text of the Page - 197 -

6.3 TheSecantMethod 197 6.3 TheSecantMethod When finding the derivative f 0.x/ in Newton’s method is problematic, or when function evaluations take too long; wemay adjust themethod slightly. Instead of using tangent lines to thegraphwemayusesecants1. Theapproachis referred toas thesecantmethod, andthe idea is illustratedgraphically inFig.6.2forourexample problemx2 9D0. The idea of the secant method is to think as in Newton’s method, but instead of using f 0.xn/, we approximate this derivative by a finite difference or the se- cant, i.e., the slopeof the straight line that goes through thepoints .xn;f.xn//and .xn 1;f.xn 1//on thegraph,givenby the twomost recent approximationsxn and xn 1. This slope reads f.xn/ f.xn 1/ xn xn 1 : (6.2) Inserting this expression forf 0.xn/ inNewton’smethodsimplygivesus the secant method: xnC1 Dxn f.xn/f.xn/ f.xn 1/ xn xn 1 ; or xnC1 Dxn f.xn/ xn xn 1 f.xn/ f.xn 1/ : (6.3) Fig.6.2 Illustratestheuseofsecants inthesecantmethodwhensolvingx2 9D0;x2 Œ0;1000 . From twochosen startingvalues,x0 D 1000 andx1 D 700 the crossingx2 of the corresponding secantwith thex axis iscomputed, followedbya similarcomputationofx3 fromx1 andx2 1https://en.wikipedia.org/wiki/Secant_line
back to the  book Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python
Title
Programming for Computations – Python
Subtitle
A Gentle Introduction to Numerical Simulations with Python
Authors
Svein Linge
Hans Petter Langtangen
Publisher
Springer Open
Date
2016
Language
English
License
CC BY-NC 4.0
ISBN
978-3-319-32428-9
Size
17.8 x 25.4 cm
Pages
248
Keywords
Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
Category
Informatik
Web-Books
Library
Privacy
Imprint
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python