Ask Your Question

Revision history [back]

It is not clear what should the user enter, but if it is something like sin(x) for t and pi for u2, you have to understand that when you write sin(x) in the command line, you create a symbolic object, corresponding to the mathematical function $sin(x)$. When you type "sin(x)" as an input of raw_input(), the function returns the string "sin(x)", not the symbolic mathematical function. So you have to transform this string as a symbolic expression, that is an element of the symbolic ring, for this you should replace the string t by SR(t) (idem for u2):

sage: SR(t).limit(x=SR(u2)+0.001)