Page - 182 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition
Image of the Page - 182 -
Text of the Page - 182 -
182 7 SolvingNonlinearAlgebraicEquations
Fig. 7.1 Illustrates the idea of Newton’s method with f(x) = x2 − 9, repeatedly solving for
crossing of tangent lineswith thex axis
How do we compute the tangent of a functionf(x) at a pointx0? The tangent
function,herecalled f˜(x), is linearandhas twoproperties:
1. theslopeequals tof ′(x0)
2. the tangent touches thef(x)curveatx0
So, if we write the tangent function as f˜(x)= ax+b, we must require f˜ ′(x0)=
f ′(x0)and f˜(x0)=f(x0), resulting in
f˜(x)=f(x0)+f ′(x0)(x−x0).
Thekeystep in Newton’smethod is tofindwhere the tangentcrosses thex axis,
whichmeanssolving f˜(x)=0:
f˜(x)=0 ⇒ x=x0− f(x0)
f ′(x0) .
This isournewcandidatepoint,whichwe callx1:
x1 =x0− f(x0)
f ′(x0) .
Programming for Computations – Python
A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition
- Title
- Programming for Computations – Python
- Subtitle
- A Gentle Introduction to Numerical Simulations with Python 3.6
- Volume
- Second Edition
- Authors
- Svein Linge
- Hans Petter Langtangen
- Publisher
- Springer Open
- Date
- 2020
- Language
- English
- License
- CC BY 4.0
- ISBN
- 978-3-319-32428-9
- Size
- 17.8 x 25.4 cm
- Pages
- 356
- Keywords
- Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
- Category
- Informatik