In
$Mathematica$ it's much more direct than you might dream up, in this post Zero crossings and zero-almost crossings a code skeleton was given
nsZ[f_, x0_, n_Integer: 100] := If[NumericQ[f[x0]],
FixedPoint[(# - f[#]/f'[#]) &, N[x0], n],(*else*)
Print["Function f = ", f, " is not numeric at x0 = ", x0];
Return[$Failed]
]
$f$ is the function (e.g. ArcTan),
$x0$ is the start value, the result is the zero position
$x1$ (i.e.
$f(x1) = 0$).
It might converge as well as diverge
In[21]:= nsZ[ArcTan, #, 20] & /@ Range[0.1, 1.5, 0.1]
Out[21]= {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.67686305871854*10^18082, 7.264574678709*10^111191}
divergency happens if the next Iteration Point has a derivative whose Tangent is more horizontal than the Tangent of the current Iteration Point.
Sorry for the silly capitalization of words, it is done automatically since today ...