Seite - 191 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Bild der Seite - 191 -
Text der Seite - 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
Programming for Computations – Python
A Gentle Introduction to Numerical Simulations with Python
- Titel
- Programming for Computations – Python
- Untertitel
- A Gentle Introduction to Numerical Simulations with Python
- Autoren
- Svein Linge
- Hans Petter Langtangen
- Verlag
- Springer Open
- Datum
- 2016
- Sprache
- englisch
- Lizenz
- CC BY-NC 4.0
- ISBN
- 978-3-319-32428-9
- Abmessungen
- 17.8 x 25.4 cm
- Seiten
- 248
- Schlagwörter
- Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
- Kategorie
- Informatik