Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are two separate problems here.

  • Sage appears to calculate the wrong symbolic limit.
  • Plotting expressions of this kind has inherent numerical instability, which Sage could make easier to control.

You seem to have almost purposely chosen a formula which would have high numerical instability! Any time you have denominators and numerators both going to zero and you start plugging in for tiny changes $\Delta x$ you have the chance at running into trouble.

Unfortunately, limit(V(a,w), a=+oo, algorithm='sympy') doesn't seem to produce a result (perhaps Sympy doesn't handle these sorts of limits). If there is independent confirmation of this error, a ticket should be opened.

However, the issue is symbolics, not numerical precision. You may find some luck with adapting some plot refinement parameters, or possibly inputting numbers of higher precision - something like M = [(x,V(x,1)) for x in [RealField(1000)(y) for y in [0,0.001..8]]]; points(M) but I have to admit I was unable to get that to avoid the instability either.