numerically approximate the real roots of an expression using Newton's method - Maple Help

Home : Support : Online Help : Education : Student Package : Numerical Analysis : Visualization : Student/NumericalAnalysis/Newton

Student[NumericalAnalysis][Newton] - numerically approximate the real roots of an expression using Newton's method

 Calling Sequence Newton(f, x=a, opts) Newton(f, a, opts)

Parameters

 f - algebraic; expression in the variable x representing a continuous function x - name; the independent variable of f a - numeric; the initial approximate root opts - (optional) equation(s) of the form keyword=value, where keyword is one of fixedpointiterator, functionoptions, lineoptions, maxiterations, output, pointoptions, showfunction, showlines, showpoints, showverticalline, stoppingcriterion, tickmarks, caption, tolerance, verticallineoptions, view; the options for approximating the roots of f

Description

 • The Newton command numerically approximates the roots of an algebraic function, f, using the classical Newton-Raphson method.
 • Given an expression f and an initial approximate a, the Newton command computes a sequence ${p}_{k}$, $k$=$0..n$, of approximations to a root of f, where $n$ is the number of iterations taken to reach a stopping criterion. For sufficiently well-behaved functions and sufficiently good initial approximations, the convergence of ${p}_{k}$ toward the exact root is quadratic.
 • The Newton command is a shortcut for calling the Roots command with the method=newton option.

Notes

 • Newton's method will fail if $\frac{\partial }{\partial x}f\left({p}_{k-1}\right)$=0.$\frac{ⅆ}{ⅆx}f\left({p}_{k-1}\right)=0$

Examples

 > $\mathrm{with}\left(\mathrm{Student}[\mathrm{NumericalAnalysis}]\right):$
 > $f:={ⅇ}^{x}+{2}^{-x}+2\mathrm{cos}\left(x\right)-6:$
 > $\mathrm{Newton}\left(f,x=2.0,\mathrm{tolerance}={10}^{-2}\right)$
 ${1.829383715}$ (1)
 > $\mathrm{Newton}\left(f,x=2.0,\mathrm{tolerance}={10}^{-2},\mathrm{output}=\mathrm{sequence}\right)$
 ${2.0}{,}{1.850521336}{,}{1.829751202}{,}{1.829383715}$ (2)
 > $\mathrm{Newton}\left(f,x=2,\mathrm{output}=\mathrm{plot},\mathrm{stoppingcriterion}=\mathrm{function_value}\right)$

To play the following animation in this help page, right-click (Control-click, on Macintosh) the plot to display the context menu.  Select Animation > Play.

 > $\mathrm{Newton}\left(f,x=1.3,\mathrm{output}=\mathrm{animation},\mathrm{stoppingcriterion}=\mathrm{absolute}\right)$