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

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

Image of the Page - 191 -

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

Text of the Page - 191 -

6.2 Newton’sMethod 191 Afundamental ideaofnumericalmethodsfornonlinearequations is toconstruct a seriesof linearequations(sinceweknowhowtosolve linearequations)andhope that thesolutionsof these linearequationsbringuscloser andcloser to thesolution of the nonlinear equation. The idea will be clearer when we present Newton’s methodand the secantmethod. 6.2.1 DerivingandImplementingNewton’sMethod Figure 6.1 shows thef.x/ function in ourmodel equationx2 9 D 0. Numer- icalmethods for algebraic equations require us to guess at a solution first. Here, this guess is called x0. The fundamental idea ofNewton’smethod is to approxi- mate the original functionf.x/ by a straight line, i.e., a linear function, since it is straightforward to solve linear equations. There are infinitelymany choices of how to approximatef.x/bya straight line. Newton’smethod applies the tangent off.x/ at x0, see the rightmost tangent in Fig. 6.1. This linear tangent function crosses thex axis at a pointwecallx1. This is (hopefully) a better approximation to the solution off.x/ D 0 thanx0. The next fundamental idea is to repeat this process. Wefind the tangent off at x1, computewhere it crosses the x axis, at a point calledx2, and repeat the process again. Figure 6.1 shows that the process bringsuscloserandcloser to the left. It remains,however, to see ifwehitxD3or comesufficientlyclose to this solution. Howdowe compute the tangent of a functionf.x/ at a pointx0? The tangent function,herecalled Qf.x/, is linear andhas twoproperties: Fig. 6.1 Illustrates the idea of Newton’s method with f.x/ D x2 9, repeatedly solving for crossingof tangent lineswith thex axis
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