Ask Your Question

Revision history [back]

The "(x)" appended to your function names is unnecessary and is what's causing the problem with the definition of h. Try this instead with the rest of your code left unchanged:

sage: f = sin(x)/x
sage: g = sin(x)
sage: h = x

Given that x is predefined as a variable when you load Sage (that is, when Sage is started it immediately runs the code x = var('x')) you'll still be able to call the functions like so:

sage: g(0)    # or, more explicitly, g(x=0)
0
sage: h(5)    # or, more explicitly, h(x=0)
5

It's curious, however, that there is no issue with appending "(x)" to the functions f and g. I wonder why...