Tools › Numerical Methods › Equation Solvers › ODE and Nonlinear Equation Solver › Example

Where a circle meets an exponential curve: Newton's method for two equations with the Jacobian written out

ToolODE and Nonlinear Equation Solver
SourceOriginal case, checked against scipy.optimize.fsolve and the analytic Jacobian in test_ode_nonlinear_solver.php.
LevelUndergraduate

Problem

Find the point in the first quadrant where the circle x² + y² = 4 meets the curve y = eˣ − 1, by Newton's method for a system starting from (x, y) = (2, 0.5). Show the first iteration in full.

Inputs to Enter

  • Problem: system of equations; x^2 + y^2 = 4 and y = exp(x) - 1
  • Starting guess x = 2, y = 0.5; tolerance 1e-8
Open the ODE and Nonlinear Equation Solver tool

Answers

  • At the guess: F₁ = 2² + 0.5² − 4 = 0.25, F₂ = 0.5 − (e² − 1) = −5.88906
  • Jacobian rows (4, 1) and (−7.38906, 1); determinant 4 × 1 − 1 × (−7.38906) = 11.3891
  • Step by Cramer's rule: Δx = (−5.88906 − 0.25) / 11.3891 = −0.539031, Δy = (0.25 × (−7.38906) + 5.88906 × 4) / 11.3891 = 1.90612
  • After one iteration (1.4609688, 2.4061246); then (1.111307, 1.803044), (1.010054, 1.730687), (1.004186, 1.729637)
  • Solution x = 1.004168738, y = 1.729637287 after 6 iterations, largest residual 8.9 × 10⁻¹⁶; measured order 2.00

Notes

Open this case in the tool: /analysis-tools/numerical-methods/equation-solvers/ode-nonlinear-solver/?try=circle-meets-curve. The two curves cross a second time in the third quadrant, near (−1.82, −0.84); a starting guess there, such as x = −2, y = −1, finds that solution instead. Newton's method returns the solution its starting guess leads to and gives no sign of the other.

More Examples for This Tool