Finding Roots of Scalar Functions Using in Mathcad
Finding Roots of Scalar Functions Using in Mathcad
Finding Roots of Scalar Functions Using in Mathcad
Tom Co 9/27/2008)
Introduction. There are several nonlinear scalar problems which are not polynomials. Based on an initial guess, an iterative numerical method can be used to determine one root at a time. MathCad Procudure. 1. Define the nonlinear function. The function could contain other parameters, e.g. , , , 2. Set an initial guess, e.g. 3. Use the root( ) function, e.g. , , , , , , Example:
Remarks: a) The initial guess is crucial to determining the roots. A plot of the nonlinear function is often a good idea, especially for the scalar case (see Figure 1). Also, see handout on Newton method (www.chem.mtu.edu/~tbco/cm3450/NewtonsMethod.pdf) to see why initial guesses matter.
Figure 1. Plot of the nonlinear function. b) The root that is found is not necessarily the closest to the initial guess. c) Units are allowed in this method. d) Sometimes, scaling may be necessary.