Basic 1
f(x) = x² − 2; x₀ = 1
Expected result: x ≈ 1.41421356237
Calculation steps
- f′(x) = 2x; xₖ₊₁ = (xₖ + 2/xₖ)/2
- x₀ = 1 → x₁ = 1.5 → x₂ = 17/12
- x₃ = 577/408 ≈ 1.414215686
- x ≈ 1.41421356237; |x² − 2| ≈ 0
Source: Original exercise
Find roots of nonlinear equations with optional derivatives, tangent diagrams and convergence diagnostics.
f(x) = x² − 2; x₀ = 1
Expected result: x ≈ 1.41421356237
Source: Original exercise
cos(x) + 2sin(x) + x² = 0; x₀ = 0; ε = 0.001
Expected result: x₄ ≈ −0.6598
Source values are rounded; compare to the stated tolerance.
x² + 1 = 0; x₀ = 0
Expected result: f′(0) = 0
Expected: derivative is zero; a Newton step is unavailable.
Source: Original exercise
A poor starting point, multiple root or near-zero derivative may slow or prevent convergence. The local linearized error is only an indicator.