Newton's method for a system updates by solving for the Jacobian
PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Computational Physics · Scientific programming for physicists
Scientific Computing for Physicists, Ch Letting the computer do advanced algebra: operators, series and differentiated programs
Problem
Newton's method for a system F(x,y)=0 updates (x,y) by solving JΔ=−F for the Jacobian J=∂Fi/∂(x,y), exactly as used for Chapter 2's van der Waals system. Consider F1(x,y)=x2+y2−4 and F2(x,y)=ex−y−1.
((a)) Rather than differentiating F by hand, generate the Jacobian symbolically and test the generated function at the three points (0,0), (1,2) and (−1,0.5) against the hand-differentiated formula J=(2xex2y−1). Every entry is a single well-conditioned operation (multiplication or exponentiation), and two entries are exactly zero at (0,0). Using the chapter's rule 100κϵmach with ϵmach=2−52, state a test that each entry should pass and that stays defined where an entry is zero.
((b)) Starting from (x0,y0)=(1,1), use the generated Jacobian to take one Newton step and report the new point (x1,y1).
((c)) Report the residual F(x1,y1) after that one step, and say whether it shows the iteration has converged in a single step.