Fundamentals / Numerical mathematics

Nonlinear equations

Bracket and certify roots, derive Newton and secant updates for coupled equations, and follow branches and active constraints as parameters change.

Prerequisites Derivatives and Taylor expansion.

Investigate with OneSimulation Locate the root of an implicit cooling step

Read the subject in depth

Each volume develops its arguments in sequence, with worked problems and links to experiments.

How the course fits together

  1. Chapters 1–4

    A sign-changing bracket certifies existence, a contraction supplies an error bound, and tangents or secants accelerate local convergence. Replace the scalar derivative by a Jacobian for simultaneous equations.

  2. Chapters 5–8

    Globalise Newton steps, follow parameter-dependent roots, and examine polynomial sensitivity. Interval bounds can certify that a computed root is the only one inside a chosen box.

  3. Chapters 9–12

    Approximate Jacobians or their linear solves when derivatives are expensive. Residual minimisation and complementarity address measurement mismatch and switching physical constraints.

Chapters

  1. Existence, brackets and error certificates

    Decide whether a scalar balance has a root, isolate it with a sign-changing interval and translate an equation residual into a bound in physical units.

  2. Fixed-point iteration and contraction

    Select an iteration map for a nonlinear balance, prove convergence on an invariant interval and use an observed increment to bound the remaining error.

  3. Newton and secant updates

    Derive derivative-based and derivative-free updates, measure their convergence near a simple zero and explain why a repeated zero changes the convergence order.

  4. Newton’s method for coupled balances

    Assemble a Jacobian from two coupled residuals, solve for a simultaneous correction and interpret how scaling changes the meaning of a norm.

  5. Line searches and trust regions

    Diagnose a cycling Newton sequence, compute a merit-function decrease and explain how damping and trust regions change the step while preserving the root.

  6. Continuation and folds

    Track a family of equilibria through parameter changes, identify the failure of ordinary parameter continuation at a fold and build a predictor–corrector step.

  7. Polynomial roots and coefficient sensitivity

    Evaluate a polynomial and its derivative in one sweep, then estimate how far a coefficient error can move a simple root.

  8. Root enclosures with interval Newton

    Combine interval bounds and a single function evaluation to exclude roots or isolate one with a verifiable enclosure.

  9. Secant information for systems

    Derive Broyden's rank-one Jacobian update and decide whether the direction it learned is sufficient for the next step.

  10. Solving Newton equations inexactly

    Allocate work between the inner linear iteration and outer nonlinear iteration, and estimate the accuracy needed from a Jacobian action.

  11. Gauss–Newton and residual curvature

    Derive Gauss–Newton from a local residual model and locate when omitted curvature or insufficient information changes the step.

  12. Inequalities and active constraints

    Translate one-sided equilibrium into complementarity equations, identify an active set and verify both force and feasibility.

Further chapters and interactive tutorials

  1. Why a flat zero slows Newton's method

    Factor a residual near a multiple root, recover the missing factor in a Newton step and distinguish a small residual from a small location error.

  2. Eliminating a fixed point's leading geometric error

    Recover a limit from three consecutive iterates, derive Steffensen's update and find the cancellation that makes an apparently faster step unreliable.

  3. Deciding how far to trust a linearised residual

    Derive an acceptance test from predicted versus actual decrease and see how it rescues a Newton direction that crosses the root by a large distance.

  4. A physically positive root across six decades

    Reparametrise the unknown and rescale the residual in a nonlinear resistance model. Follow what each choice changes in a Newton step.

  5. Finding a turning point without using the load as a coordinate

    Use tangent geometry to continue across a fold, and distinguish branch sensitivity from an ill-posed choice of variable in an equilibrium computation.

  6. Newton's method for an unknown covariance square root

    A pair of independent unit-variance signals must be transformed to a prescribed covariance ellipse. One can solve a scalar square-root equation along each principal axis. A calibration that starts in a different frame exposes the genuinely matrix-valued derivative. Derive it, solve for its correction, and determine which residual will detect a wrong update.

Computational notebooks

Run the Python calculations in your browser and compare the figures with the derivations.

Problem sheets

Sheets 1–6 accompany the first twelve chapters. The final projects bring several methods together. Attempt each stage before opening its worked solution.

  1. Isolating and iterating rootsFor chapters 1 and 2

    Use a verified interval to certify one solution, recognise the effect of a transformation on convergence and quantify a stopping rule.

  2. Tangents and JacobiansFor chapters 3 and 4

    Compute scalar, secant and coupled Newton corrections, and test what an incorrectly assembled derivative changes.

  3. Safeguards and continuationFor chapters 5 and 6

    Control steps within a scalar bracket, track a turning branch and distinguish equilibrium from stability under a specified evolution law.

  4. Root sensitivity and certificatesFor chapters 7 and 8

    Quantify the influence of coefficients and use derivative intervals to make verifiable statements about roots.

  5. What an approximate Jacobian knowsFor chapters 9 and 10

    Construct a minimal secant update, diagnose the loss of an earlier secant equation, and budget an inexact Newton step.

  6. Misfit and one-sided equilibriumFor chapters 11 and 12

    Distinguish a stationary residual fit from an exact root and identify which unilateral constraints carry load.

  7. Project · Locate contact and calibrate a misleading residual

    Two surfaces touch tangentially. A height sensor measures gap rather than signed distance. Decide what rootfinding, residual checks and a second sensor can each certify.

  8. Find a periodic orbit when the starting point has no preferred phase

    A nonlinear oscillator returns to its starting point after one period. Writing that fact as a root equation leaves a neutral direction and several unrelated solutions. A solvable amplitude oscillator lets you construct, stabilise and independently check a shooting method.

Final synthesis problem · Locate and follow the two equilibria of a fold

Applied study

Bracket a root and decide when a Newton step is reliable.

Why solve an equation inside a time step?

A thermal mass cools by radiation. Its temperature obeys \(\dot T=-\beta(T^4-T_a^4)\). For \(T>T_a\) the cooling rate decreases as the body cools. Backward Euler samples this rate at the end of the step. Calling the unknown end temperature \(x\), write the discrete energy balance as a root problem

\[F(x)=x-T_n+h\beta(x^4-T_a^4)=0.\]

Assume a positive time step \(h\), coefficient \(\beta>0\), and \(T_n>T_a>0\). The physical interval is \([T_a,T_n]\). Since \(F(T_a)=T_a-T_n<0\), \(F(T_n)>0\), and \(F\) is continuous, a root exists. Its derivative \(1+4h\beta x^3\) is positive throughout this interval, so the root is unique. These facts suggest an algorithm even before choosing a starting guess.

Trade guaranteed progress for local speed

Bisection evaluates \(F\) at the midpoint and keeps the half containing a sign change. Each iteration halves the interval width. The midpoint error is at most half the remaining width, even when derivatives are unavailable.

Newton’s method draws the tangent at \(x_j\), \(F(x_j)+F'(x_j)(x-x_j)\), and takes its zero \(x_{j+1}=x_j-F(x_j)/F'(x_j)\). Near a simple root \(r\), Taylor expansion about \(x_j\) gives

\[x_{j+1}-r=[F''(\xi)/(2F'(x_j))](x_j-r)^2.\]

If the derivative stays away from zero and the second derivative is bounded, this explains local quadratic convergence. Farther from the root, a practical safeguard is to replace a tangent step that leaves the bracket with bisection.

Residual and temperature error have a particularly simple relation here. For an approximation \(x\) in the physical bracket, the mean value theorem gives

\[|F(x)|=F'(\eta)|x-r|\geq|x-r|.\]

An absolute residual of \(10^{-6}\) K certifies a root error no greater than \(10^{-6}\) K for this scaled equation.

Follow two tangent steps

Set \(T_n=2\) K, \(T_a=1\) K, \(h=1\) s and \(\beta=0.0015\) K⁻³s⁻¹. This deliberately scaled thermal example keeps the arithmetic visible. Starting at \(x_0=2\), the residual is \(0.0015(16-1)=0.0225\) K and the slope is

\[1+4(0.0015)2^3=1.048.\]

The first update gives \(x_1=1.97853053\) K and \(F(x_1)\simeq1.65\times10^{-5}\) K.

Re-evaluating the slope at \(x_1\) gives \(x_2=1.97851479\) K, with residual about \(8.7\times10^{-12}\) K before rounding the iterate for display. This is the root for one backward Euler step. It still differs from the continuous-time temperature at one second because the rate varied during that second.

Problem class

Budget the bisections

Start from \([1,2]\) K. After how many bracket halvings is the midpoint guaranteed to be within \(10^{-5}\) K of the root without evaluating a derivative?

Show the calculation

After \(n\) halvings, the width is \(2^{-n}\) K. Midpoint error is bounded by \(2^{-(n+1)}\) K. Thus

\[n\geq\lceil\log_2(1/(2\times10^{-5}))\rceil=16.\]

Fifteen halvings still allow an error greater than the target.

Test a fixed-point iteration

Consider \(g(x)=2-h\beta(x^4-1)\). For \(h=1\) s and \(h=25\) s, does the maximum slope magnitude on \([1,2]\) certify contraction? What can a failed bound tell you?

Show the calculation

The maximum \(|g'|\) is \(4h\beta\,2^3=0.048h\) with \(h\) in seconds. Both maps take the bracket into itself: at one second the image is \([1.9775,2]\), at 25 seconds it is \([1.4375,2]\). At one second the maximum slope is 0.048, which certifies convergence from anywhere in the bracket. At 25 seconds the maximum is 1.2. The global contraction test is then inconclusive. Local convergence depends on the slope near the root.

OneSimulation laboratory

Locate the root of an implicit cooling step

Compare recorded OneSimulation runs on this page. To test your own inputs, download the Python model and run the model in an activated OneSimulation environment.

The downloadable model takes one backward Euler step with \(C=2\) J/K, \(A=0.3\) m², emissivity 0.5 and a test radiation constant of 0.02 W/(m²·K⁴), giving \(\beta=0.0015\) K⁻³s⁻¹. Its output substitutes the returned temperature into the residual independently. Predict which edit changes the root. Download the Python experiment · OneSimulation implicit cooling comparison.

python nonlinear-equations.py
python nonlinear-equations.py --step 0.05
python nonlinear-equations.py --solver damped
End temperature and discrete residual from a single step.
Step, solverTemperature (K)|F| (K)
1 s, Newton1.97851479065.6 × 10⁻¹⁷
0.05 s, Newton1.99887769133.7 × 10⁻¹⁷
1 s, damped Newton1.97851479065.6 × 10⁻¹⁷
Damping the Newton iteration gives the same converged end temperature at a one-second step. Shortening the step changes the equation and gives a warmer endpoint.
Damping the Newton iteration gives the same converged end temperature at a one-second step. Shortening the step changes the equation and gives a warmer endpoint.

A different step changes both the equation and the observation time. A converged line-search Newton method on the original step recovers the same physical root. To measure time discretisation error, compare solutions on successively finer grids at a common final time.

Change parameters · Change the laboratory inputs

Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.

Problem sheet 2 · Distinguish root accuracy from temperature sensitivity

Advanced study across the subject

Each sequence connects the course to detailed chapters in neighbouring subjects. The complete course PDF includes their derivations, examples and exercises.

  1. Equilibria, branches and stability

    Turn a physical stationarity condition into a nonlinear equation. Trace the solutions through loss of stability and decide which roots survive a perturbation.

  2. Nonlinear inference and implicit equations

    Investigate what a residual and a local derivative measure in inverse fitting, discretised boundary equations and an implicitly advanced stiff mode.

Find every real zero of a constitutive equation. Use the energy curvature to decide which branch a polarisation measurement can follow.

When does a polar crystal change its preferred state?

Further reading

Compare specific topics with the university sources