How to animate Newton-Raphson method in Sagemath in a jupyter Notebook?

Viewed 13

How would I go about animating the Newton-Raphson method in Sagemath in a Jupyter notebook?

I have the function

f(x)= 4*x^3 - 4*x -1

which Ive plotted using

plot(f,xmin=-5,xmax=5,ymin=-5,ymax=5)

I have found my root using this code many times for increasing values of f

f1 = f0 - f(f0)/df(f0) ; f1.n()

However my proffessor wants us to animate this method, but Ive never animated something like this before, how would you suggest I go about it?

0 Answers
Related