In the script below, enter (leaving no blanks) the coefficients of the polynomial p(x) and the endpoints of an interval [a,b] in which you want to find a root. When entering numbers, you can use integers and decimals. Pressing the "Plot" button will draw the graph of p(x). Then enter a first approximation x_1 of a root for p(x) in [a,b]. (For a nice picture, choosing x_1 rather far from the root is generally best.) For any point x_n, Newton's method calculates

x_(n+1) = x_n - p(x_n)/p'(x_n).

Geometrically, x_(n+1) is where the tangent line to the graph at (x_n, p(x_n)) crosses the x-axis, and is usually a better approximation of the root than x_n was. Press the "Newton step" button repeatedly until you get an approximation with the desired accuracy.