All problems
Newton Step for a Nonlinear System
Problem
For the system f1(x, y) = x^2 + y - 3 and f2(x, y) = x - y^2 + 2, the Jacobian is [[2x, 1], [1, -2y]].
A Newton step is p - J^{-1} F(p). Given the point [x, y], return the updated point. Assume the Jacobian is invertible there.
Hint
Build F and J at the point, invert the 2x2 Jacobian, then subtract J^{-1}F.
Test cases
case 1
in: [[1,1]]
expected: [1,2]
case 2
in: [[2,0]]
expected: [-2,15]
case 3
in: [[0,2]]
expected: [6,3]
Starter codePython
def newton_step_nonlinear_system(point):
# Your code here
pass3 test cases · run your code against them in the editor