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].
For each iteration, calculate the midpoint m=(a+b)/2m=(a+b)/2m=(a+b)/2, evaluate f(m)f(m)f(m), and retain the half whose endpoints have opposite signs. Use the updated interval as the starting interval for the next iteration.
Complete the first three iterations. Enter exact terminating decimals for the midpoint and both updated endpoints; all quantities are dimensionless.
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?
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.
Repairing a Length-Unit Mismatch
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:
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: