# Revision history [back]

I don't think this is a built-in behavior. I'd be interested in a reference for an algorithm, even! Basically, this would just be 0, anything whose tangent line sends it to zero, anything whose tangent line sends it to one of those, etc., right?

If you just wanted to visualize this, you could try using some of the ideas at this ticket about Newton basins, though it wouldn't give the "black points".

For a graphical way of exploring this, I would search sagenb.org for implementations of Newton's method in interactive mode.

You could use solve to try to get some of these points, though I'm not sure how useful this would be.

sage: LA(x) = x - (x^3-1)/(3*x^2)
sage: LA(0)
---------------------------------------------------------------------------
RuntimeError: power::eval(): division by zero
sage: solve(LA==0,x)
[x == 1/4*(I*(-1)^(1/3)*sqrt(3) - (-1)^(1/3))*2^(2/3), x == 1/4*(-I*(-1)^(1/3)*sqrt(3) - (-1)^(1/3))*2^(2/3), x == 1/2*(-1)^(1/3)*2^(2/3)]
sage: S = solve(LA==0,x)
sage: for s in S:
solve(LA == s.rhs(),x)
....:
[x == -1/576*(-18*I*sqrt(3) - 18)*(-I*sqrt(3) + 1)*2^(1/3)/(1/8*sqrt(6) - 5/16)^(1/3) + 1/24*(3*I*sqrt(3) - 3)*(-1)^(1/3)*2^(2/3) - 1/2*(1/8*sqrt(6) - 5/16)^(1/3)*(I*sqrt(3) + 1), x == -1/576*(-18*I*sqrt(3) - 18)*(I*sqrt(3) + 1)*2^(1/3)/(1/8*sqrt(6) - 5/16)^(1/3) + 1/24*(3*I*sqrt(3) - 3)*(-1)^(1/3)*2^(2/3) - 1/2*(1/8*sqrt(6) - 5/16)^(1/3)*(-I*sqrt(3) + 1), x == 1/24*(3*I*sqrt(3) - 3)*(-1)^(1/3)*2^(2/3) + 1/288*(-18*I*sqrt(3) - 18)*2^(1/3)/(1/8*sqrt(6) - 5/16)^(1/3) + (1/8*sqrt(6) - 5/16)^(1/3)]
[x == -1/576*(-I*sqrt(3) + 1)*(18*I*sqrt(3) - 18)*2^(1/3)/(1/8*sqrt(6) - 5/16)^(1/3) - 1/24*(3*I*sqrt(3) + 3)*(-1)^(1/3)*2^(2/3) - 1/2*(1/8*sqrt(6) - 5/16)^(1/3)*(I*sqrt(3) + 1), x == -1/576*(I*sqrt(3) + 1)*(18*I*sqrt(3) - 18)*2^(1/3)/(1/8*sqrt(6) - 5/16)^(1/3) - 1/24*(3*I*sqrt(3) + 3)*(-1)^(1/3)*2^(2/3) - 1/2*(1/8*sqrt(6) - 5/16)^(1/3)*(-I*sqrt(3) + 1), x == -1/24*(3*I*sqrt(3) + 3)*(-1)^(1/3)*2^(2/3) + 1/288*(18*I*sqrt(3) - 18)*2^(1/3)/(1/8*sqrt(6) - 5/16)^(1/3) + (1/8*sqrt(6) - 5/16)^(1/3)]
[x == -1/2*(I*sqrt(3) + 1)*(1/8*sqrt(2)*sqrt(3) - 5/16)^(1/3) - 1/16*(-I*sqrt(3) + 1)*2^(1/3)/(1/8*sqrt(2)*sqrt(3) - 5/16)^(1/3) + 1/4*(-1)^(1/3)*2^(2/3), x == -1/2*(-I*sqrt(3) + 1)*(1/8*sqrt(2)*sqrt(3) - 5/16)^(1/3) - 1/16*(I*sqrt(3) + 1)*2^(1/3)/(1/8*sqrt(2)*sqrt(3) - 5/16)^(1/3) + 1/4*(-1)^(1/3)*2^(2/3), x == 1/4*(-1)^(1/3)*2^(2/3) + (1/8*sqrt(2)*sqrt(3) - 5/16)^(1/3) + 1/8*2^(1/3)/(1/8*sqrt(2)*sqrt(3) - 5/16)^(1/3)]