The concept of the limit is often used to define the integral and the derivative. Run the following code to see how to compute limits with Sage:
var('x') # Something easy f(x) = 1 / x print("Limit of 1/x as x->0+: {0}".format(limit(f, x=0, dir='plus'))) print("Limit of 1/x as x->0-: {0}".format(limit(f, x=0 dir='minus'))) p1 = plot(f, (x, -1, 1), detect_poles='show') p1.axes_range(-1, 1, -10, 10) p1.show() # Something more complex g(x)=(2 * x + 8) / (x^2 + x - 12) g.show() print("Limit of g(x) as x->-4: {0}".format(limit(g, x=-4))) h(x) = (x^2 - 4) / (x - 2) h.show() print("Limit of h(x) ax x->2: {0}".format(lim(h, x=2)))
The results are shown in the following screenshot: