Fundamentals / Numerical mathematics / Nonlinear equations

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.

Recover the collision of two mathematical roots

Near the contact, model the gap as \(g(x,p)=(x-1)^2-p\), with all variables scaled by their reference units. Sketch its zeros for \(p\) above and below zero. For \(p=0.01\) begin with \([0.95,1.2]\) and test whether a sign-changing bracket isolates a root.

Work through the solution

Real roots are \(1\pm\sqrt p\) for positive \(p\), a double root at one for \(p=0\), and none for negative \(p\). At 0.95 the residual is \(-0.0075\), while at 1.2 it is 0.03. The bracket contains only the upper root at 1.1. A wider interval with both endpoints outside the two roots can have equal endpoint signs even when it contains both.

Explore the related calculation with adjustable inputs. Use the equilibrium parabola to inspect sensitivity and the tangent-coordinate continuation step. Translate the state coordinate if the fold is centred at a different value here.

Calibrate a stopping tolerance

With \(p=0\) begin at 1.2. Take three ordinary Newton steps and one multiplicity-corrected step. A calibrated sensor reading places the nonnegative gap in \([0,10^{-6}]\). What location interval follows from that bound? Compare the slopes in the multiple-root experiment.

Work through the solution

The successive locations are 1.1, 1.05 and 1.025. Multiplying the first Newton correction by two lands exactly on 1 for this pure square. A gap of \(10^{-6}\) is compatible with a displacement of magnitude \(10^{-3}\). Supplying more digits in the root does not improve that data-based bound.

Audit an algorithm that always reports convergence

At \(p=-0.001\) a least-squares routine stops at \(x=1\) and reports zero gradient. Find the residual and explain the report. Use the trust-region model to distinguish a decreasing merit function from a good final fit.

Work through the solution

The residual is 0.001, and the merit gradient \(gg'\) vanishes because \(g'=0\). This is the best fit of this model to the infeasible contact target. The positive minimum is 1,000 times the \(10^{-6}\) gap tolerance used in the preceding test. Report a nonzero closest separation and the uncertainty rather than a located contact.

Choose an additional measurement

You may measure one signed local slope \(g_x\) with uncertainty 0.002, or repeat the same absolute gap measurement. Which option resolves the side of a nearby contact? Express the position uncertainty before combining measurements.

Work through the solution

\(g_x=2(x-1)\) changes sign through contact. Its stated uncertainty yields an uncertainty of 0.001 in the inferred \(x\). An interval for the signed slope that excludes zero resolves which side of contact the instrument occupies. If the measured magnitude is at most 0.002, both signs still fit within the uncertainty. Repeated absolute gaps can improve precision in distance magnitude while retaining the symmetry between left and right solutions.

Explore the related calculation with adjustable inputs. Use the equilibrium parabola to inspect sensitivity and the tangent-coordinate continuation step. Translate the state coordinate if the fold is centred at a different value here.