This is the 1D analogue of the earlier quadratic demo. It compares GD, momentum, Nesterov, and Newton on the parabola
f(x)=x². Since f'(x)=2x, plain GD follows x_{t+1}=(1-2η)x_t.
trajectory
current iterate
x₀ = 1 (fixed)
What to notice
For GD on x², stability requires roughly 0 < η < 1.
If η < 0.5, the iterates move monotonically toward 0.
If 0.5 < η < 1, they alternate signs while shrinking.
At η = 1, they oscillate with constant magnitude, and for η > 1 they diverge.