| 1 | initial version |
Not surprised that f(3) is giving you an error. This form of substituting values in symbolic expressions has been deprecated for quite a while (well, over four years!). You must have got the warning at some point in your calculations. You should be using either f.subs(x=3) or f(x=3), i.e., specify the variable name explicitly.
Note that there are some idiosyncrasies while working with symbolic functions. For instance the following will not complain even though f is not defined as a function of x:
sage: f = SR(1)
sage: f.subs(x=2)
1
| 2 | No.2 Revision |
Not surprised that f(3) is giving you an error. This form of substituting values in symbolic expressions has been deprecated for quite a while (well, over four years!). You must have got the warning at some point in your calculations. You should be using either f.subs(x=3) or f(x=3), i.e., specify the variable name explicitly.
Note that there are some idiosyncrasies while working with symbolic functions. expressions. For instance the following will not complain even though f is not defined as a function of x:
sage: f = SR(1)
sage: f.subs(x=2)
1
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.