A diagonal measurement direction
Given \(B=I\), \(s=(1,1)^T\), \(y=(3,1)^T\), compute Broyden's updated matrix. Verify the new secant equation and its action on \((1,-1)^T\).
Worked solution
The discrepancy is \((2,0)^T\) and \(s^Ts=2\). The correction is \(\left(\begin{smallmatrix}1&1\\0&0\end{smallmatrix}\right)\), giving \(B_{\rm new}=\left(\begin{smallmatrix}2&1\\0&1\end{smallmatrix}\right)\).
Multiplication by \(s\) yields \((3,1)^T\). Multiplication by \((1,-1)^T\) yields \((1,-1)^T\), unchanged because that vector is perpendicular to the observed step.
Explore the related calculation with adjustable inputs. Change the parameters in the corresponding calculation and compare its independently recomputed values with the equation derived in this solution.
A new measurement can disturb an old one
Suppose \(B=\operatorname{diag}(2,1)\) already predicts the action of \(A=\operatorname{diag}(2,3)\) on \(e_1\). Take \(s=(1,1)^T\), compute the updated matrix, and check both secant directions. Which subsequent probe would measure the second column directly?
Worked solution
The new measured change is \((2,3)^T\) while \(Bs=(2,1)^T\), so add \(\left(\begin{smallmatrix}0&0\\1&1\end{smallmatrix}\right)\). The new matrix is \(\left(\begin{smallmatrix}2&0\\1&2\end{smallmatrix}\right)\).
Its action on \((1,1)^T\) is exact but its action on \(e_1\) is now \((2,1)^T\) rather than \((2,0)^T\). Taking \(s=e_2\) would directly observe \(Ae_2=(0,3)^T\), independently of the first column.
Explore the related calculation with adjustable inputs. Change the parameters in the corresponding calculation and compare its independently recomputed values with the equation derived in this solution.
Budget an inner defect
For \(f=x^2-4\) at \(x=2.1\), an inner solver returns \(s=-0.095\). Compute its linear defect, forcing ratio and true new residual. If the target forcing ratio were 0.02, would this step meet the target?
Worked solution
\(f=0.41\), \(f'=4.2\), so the defect is \(0.41-4.2(0.095)=0.011\) and the ratio is \(0.011/0.41\approx0.02683\).
At \(x+s=2.005\), the residual is \(0.020025=0.011+0.095^2\). The permitted linear defect would be \(0.0082\), so this step misses the inner tolerance despite substantially reducing the outer residual.
Explore the related calculation with adjustable inputs. Explore how initial values and the residual slope affect Newton and secant convergence on the quadratic reference problem; retain the stated residual when checking the present hand calculation.
Differentiate a reciprocal with a shared input
Let \(s=1+xy\) and \(F=(s,1/s+x)^T\). Evaluate both the residual and its Jacobian action at \((2,1)\) in direction \((-1,2)\) using dual arithmetic. Then propagate only the seed \((0,1)\). State what must be checked before applying the same rules to a program that replaces \(s\) by \(|s|\).
Worked solution
For the first seed the product \(xy\) has derivative \((-1)1+2(2)=3\), so \(s=(3,3)\) in value–derivative notation. The reciprocal has pair \((1/3,-3/9)\). Adding \(x\) gives
The second seed yields \(\dot s=2\) and second output derivative \(-2/9\). This supplies exactly the second Jacobian column. At the stated positive \(s\), the absolute-value operation has derivative one. At \(s=0\) the absolute value has a kink and the reciprocal is undefined, so no ordinary Jacobian action of this modified residual exists there.
Explore the related calculation with adjustable inputs. Change the parameters in the corresponding calculation and compare its independently recomputed values with the equation derived in this solution.
Revisit chapter 10 · Produce a Jacobian action by forward differentiation.