This visualization shows Newton's method applied to f(x) = x^2 - 1, starting from x = 3, broken down into individual steps. Each panel captures one iteration of the algorithm, making it easy to see how the method converges to the root x = 1.
At each step:
- The current guess x_n is marked on the x-axis (blue dot)
- The function value f(x_n) is found on the curve (red dot)
- A tangent line is drawn at that point (blue line)
- The x-intercept of the tangent line becomes the next guess (orange diamond)
Each panel shows the cumulative progress: previous iterations appear faded in the background, while the current step is highlighted. Notice how the guesses rapidly converge toward x = 1.
| Step | Guess | Next Guess |
|---|---|---|
| 1 | 3.0000 | 1.6667 |
| 2 | 1.6667 | 1.1333 |
| 3 | 1.1333 | 1.0078 |
| 4 | 1.0078 | 1.0000 |
| 5 | 1.0000 | 1.0000 |
| File | Description |
|---|---|
sage_code |
Original SageMath implementation (generates animation frames) |
newtons_method_animated.py |
Python 3 translation producing a multi-panel figure |
newtons_method_animated.png |
Step-by-step visualization |
python3 newtons_method_animated.py- The tangent line approximation improves dramatically with each step
- By step 4, the method has already found the root to 4 decimal places
- This demonstrates the quadratic convergence of Newton's method: the number of correct digits roughly doubles each iteration
