The problem is that x
is a symbolic expression, and it does not have a eint
method. So, instead of plotting a smybolic expression, you should try to plot a Python function:
sage: def eint(x):
....: return RR(x).eint()
Now, you can plot this function:
sage: plot(eint, [-1,1], frame=True)
Note that i had to transform x
as an element of RR
, because the plot
function iterates over some elements of [-1,1]
viewed as Pyhon floats
which do not have a eint
method either:
sage: float(1.1).eint()
AttributeError: 'float' object has no attribute 'eint'
You can see what happens if we omit to convert the float elements into RR
:
sage: def eint_noconvert(x):
....: return x.eint()
sage: plot(eint_noconvert, [-1,1], frame=True)
AttributeError: 'float' object has no attribute 'eint'