1 | initial version |
The way you define dn
is a symbolic function, that is an expression given by a mathematical formula, not something that produces an object.
For plot_dn
if you want to produce a graphical object, you need to define is a Python function, not a symbolic. You can try the following:
sage: plot_dn = lambda n, theta, y : plot(dn(k, n, theta, y), (k, 0, 1))
It is equivalent to:
sage: def plot_dn(n, theta, y):
....: return plot(dn(k, n, theta, y), (k, 0, 1))