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

Page - 176 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition

Image of the Page - 176 -

Image of the Page - 176 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition

Text of the Page - 176 -

176 7 SolvingNonlinearAlgebraicEquations Here,f(x) is someprescribedformula involvingx. Forexample, theequation e−x sinx= cosx has f(x)= e−x sinx−cosx. Just move all terms to the left-hand side and then the formula to the left of the equalitysign isf(x). So, when do we really need to solve algebraic equations beyond the simplest typeswe can treat with pen and paper? Thereare two major applicationareas. One iswhenusing implicit numericalmethodsforordinarydifferentialequations.These giverise tooneorasystemofalgebraicequations.Theothermajorapplicationtype isoptimization,i.e.,findingthemaximaorminimaofafunction.Thesemaximaand minimaare normally foundby solving the algebraic equationF ′(x)= 0 ifF(x) is the function to be optimized.Differentialequationsare verymuchused throughout science and engineering, and actually most engineering problems are optimization problems in the end, because one wants a design that maximizes performance and minimizescost. We first consider one algebraic equation in one variable, for which we present some fundamental solution algorithms that any reader should get to know. Our focus will, as usual, be placed on the programming of the algorithms. Systems of nonlinear algebraic equations with many variables arise from implicit methods for ordinary and partial differential equations as well as in multivariate optimization. Our attention will be restricted to Newton’s method for such systems of nonlinear algebraicequations. RootFinding Whensolving algebraicequationsf(x)=0, we oftensay that the solutionx is a root of the equation. The solution process itself is thus often called root finding. 7.1 BruteForceMethods Therepresentationofamathematicalfunctionf(x)onacomputer takes twoforms. One isaPythonfunctionreturningthe functionvaluegiventheargument,while the other is a collection of points (x,f(x)) along the function curve. The latter is the representation we use for plotting, together with an assumption of linear variation betweenthepoints.Thisrepresentationisalsoverywellsuitedforequationsolving: we simply go through all points and see if the function crosses the x axis, or for optimization:we test for local maximumorminimumpoints.Because there is a lot ofwork toexamineahugenumberofpoints, andalsobecause the idea isextremely simple, suchapproachesareoften referred toas brute forcemethods.
back to the  book Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition"
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
Web-Books
Library
Privacy
Imprint
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python