A nonlinear spring calculation solves
A programmer stores extension as u in millimetres, with x=u/1000x=u/1000x=u/1000 when numerical values are used. The residual calculation below correctly returns newtons, but the update mixes length units:
u = 100; % mm r = 1.2*u + 3.0e-5*u^3 - 180; % N slope = 1200 + 90000*(u/1000)^2; % N/m uNew = u - r/slope; % intended to be mm
Which replacement produces a dimensionally consistent Newton update in millimetres? Candidate values are shown to three decimal places.
Use slope = 1.2 + 9.0e-5*u^2 and uNew = u - r/slope; obtain 114.286 mm.
Use slope = 1200 + 90000*(u/1000)^2 and uNew = u - r/slope; obtain 100.014 mm.
Use slope = 1.2 + 9.0e-5*u^2 and uNew = u + r/slope; obtain 85.714 mm.
Use slope = 1.2 + 3.0e-5*u^2 and uNew = u - r/slope; obtain 120.000 mm.
Unlock full course notes by signing up
Checking the Candidate Residual
A scalar MATLAB solver accepts a candidate only when both its absolute displacement step and its absolute force residual meet their tolerances. At iteration 4 of a maximum of 20 iterations, its variables are:
Which expression correctly sets the logical variable converged according to this requirement?
Tracing a Bisection Calibration
An engineering calibration requires the positive, dimensionless gain ggg satisfying
A MATLAB implementation uses bisection, which repeatedly halves an interval while retaining endpoints with opposite function signs. Its initial bracket is [1,2][1,2][1,2].
When a Small Residual Hides a Large Error
A displacement calibration calculation for a very soft spring uses the exact linear residual model
where xxx is in metres. A numerical solver returns an estimate x^\hat{x}x^ with signed residual f(x^)=+0.000100 Nf(\hat{x})=+0.000100\ \text{N}f(x^)=+0.000100 N. This passes its residual tolerance of 0.000150 N0.000150\ \text{N}0.000150 N.
Using Step Refinement to Control Integration Error
A MATLAB program integrates a smooth power signal over a fixed time interval to estimate transferred energy. The program uses the composite trapezoidal rule with uniform time step hhh.
Two runs give E(0.4 s)=12.8 JE(0.4\ \text{s})=12.8\ \text{J}E(0.4 s)=12.8 J and E(0.2 s)=12.2 JE(0.2\ \text{s})=12.2\ \text{J}E(0.2 s)=12.2 J. For this calculation, assume the following error model is exact over the step sizes considered: