On Sep 18, 6:20 am, alien308 <
alien3...@gmail.com> wrote:
> x = var("x")
> d = function("d",x)
> diff(x, d)
>
Did you intend to differentiate x with respect to d? The error
message is totally unhelpful, though presumably this derivative
doesn't make sense 'as is'.
If you instead do
sage: diff(d,x)
D[0](d)(x)
Which is probably what you want, though the representation leaves
something to be desired (which is a long-standing debate on several
Trac tickets).
But there are other issues here, at least to me - maybe someone can
explain this:
If you don't do let d = function("d", x), but just do function("d",x),
you get a different error. The error comes from trying to make d an
element of the symbolic ring, which perhaps isn't a bug per se, though
at the very least the error message for such a case could be more
helpful.
Moreover,
sage: diff(d,x)
gives an error
TypeError:
Not even an error message! Although
sage: function?
doesn't say you can do this (not assign function("d",x) to a Python
variable), it also doesn't say you can't.
- kcrisman