Package for limits

First, you’re using Richardson.extrapolate incorrectly: The second argument is not the point to extrapolate to, it is the initial step away from the limit point x0 (which defaults to zero).

Second, Richardson extrapolation is based on polynomial extrapolation, so it isn’t going to work if the limit diverges.

Third, this particular extrapolation problem is going to be very difficult to do numerically (as opposed to symbolically) in any case. Because 11/15 is not representable in binary floating point, and the singularity is only logarithmic, in double precision g(11/15) gives a quite small magnitude result of ≈ 1.5573367747276683. (And calling extrapolate(g, 0.1, x0=11/15) “correctly” gives this answer.)

3 Likes