1 | initial version |
Let's dissect this case :
sage: f=function("f")
sage: g=function("g")
Sage knows the chain rule, but expresses it in a somewhat unusual form :
sage: diff(g(f(x)),x)
diff(f(x), x)*D[0](g)(f(x))
Let's try to understand it :
sage: diff(g(f(x)),x).operands()[1]
D[0](g)(f(x))
sage: diff(g(f(x)),x).operands()[1].operator()
D[0](g)
This is not a "usual" function, but it has arguments :
sage: diff(g(f(x)),x).operands()[1].arguments()
(x,)
and is applied to a list of arguments :
sage: diff(g(f(x)),x).operands()[1].operands()
[f(x)]
When applied to x
, it returns the valye od the derivative of f
at the point x
:
sage: diff(g(f(x)),x).operands()[1].operator()(x)
diff(g(x), x)
but it applies to any value, including an unrelated variable :
sage: var("t")
t
sage: diff(g(f(x)),x).operands()[1].operator()(t)
diff(g(t), t)
This object is not a symbolic expression :
sage: diff(g(f(x)),x).operands()[1].operator() in SR
False
so let's investigate :
sage: type(diff(g(f(x)),x).operands()[1].operator())
<class 'sage.symbolic.operators.FDerivativeOperator'>
You should read help(type(diff(g(f(x)),x).operands()[1].operator()))
... Note that FDerivativeOperator
isn't directly accessible :
import_statements(type(diff(g(f(x)),x).operands()[1].operator()))
from sage.symbolic.operators import FDerivativeOperator
And that the ?
interface to its help fails :
sage: FDerivativeOperator?
[ in the *Messages* buffer of emacs : ] Object FDerivativeOperator not found.
HTH,
2 | No.2 Revision |
Let's dissect this case :
sage: f=function("f")
sage: g=function("g")
Sage knows the chain rule, but expresses it in a somewhat unusual form :
sage: diff(g(f(x)),x)
diff(f(x), x)*D[0](g)(f(x))
Let's try to understand it :
sage: diff(g(f(x)),x).operands()[1]
D[0](g)(f(x))
sage: diff(g(f(x)),x).operands()[1].operator()
D[0](g)
This is not a "usual" function, but it has arguments :
sage: diff(g(f(x)),x).operands()[1].arguments()
(x,)
and is applied to a list of arguments :
sage: diff(g(f(x)),x).operands()[1].operands()
[f(x)]
When applied to x
, it returns the valye od the derivative of f
at the point x
:
sage: diff(g(f(x)),x).operands()[1].operator()(x)
diff(g(x), x)
but it applies to any value, including an unrelated variable :
sage: var("t")
t
sage: diff(g(f(x)),x).operands()[1].operator()(t)
diff(g(t), t)
This object is not a symbolic expression :
sage: diff(g(f(x)),x).operands()[1].operator() in SR
False
so let's investigate :
sage: type(diff(g(f(x)),x).operands()[1].operator())
<class 'sage.symbolic.operators.FDerivativeOperator'>
You should read help(type(diff(g(f(x)),x).operands()[1].operator()))
... Note that FDerivativeOperator
isn't directly accessible :
import_statements(type(diff(g(f(x)),x).operands()[1].operator()))
from sage.symbolic.operators import FDerivativeOperator
And that the ?
interface to its help fails :
sage: FDerivativeOperator?
[ in
[in the *Messages* buffer of emacs : ] ] Object FDerivativeOperator not
found.found.
HTH,
3 | No.3 Revision |
Let's dissect this case :
sage: f=function("f")
sage: g=function("g")
Sage knows the chain rule, but expresses it in a somewhat unusual form :
sage: diff(g(f(x)),x)
diff(f(x), x)*D[0](g)(f(x))
Let's try to understand it :
sage: diff(g(f(x)),x).operands()[1]
D[0](g)(f(x))
sage: diff(g(f(x)),x).operands()[1].operator()
D[0](g)
This is not a "usual" function, but it has arguments :
sage: diff(g(f(x)),x).operands()[1].arguments()
(x,)
and is applied to a list of arguments :
sage: diff(g(f(x)),x).operands()[1].operands()
[f(x)]
When applied to x
, it returns the valye od the derivative of f
at the point x
:
sage: diff(g(f(x)),x).operands()[1].operator()(x)
diff(g(x), x)
but it applies to any value, including an unrelated variable :
sage: var("t")
t
sage: diff(g(f(x)),x).operands()[1].operator()(t)
diff(g(t), t)
This object is not a symbolic expression :
sage: diff(g(f(x)),x).operands()[1].operator() in SR
False
so let's investigate :
sage: type(diff(g(f(x)),x).operands()[1].operator())
<class 'sage.symbolic.operators.FDerivativeOperator'>
You should read help(type(diff(g(f(x)),x).operands()[1].operator()))
and the documentation of operators ... Note that FDerivativeOperator
isn't directly accessible :
import_statements(type(diff(g(f(x)),x).operands()[1].operator()))
from sage.symbolic.operators import FDerivativeOperator
And that the ?
interface to its help fails :
sage: FDerivativeOperator?
[in the *Messages* buffer of emacs : ] Object FDerivativeOperator not found.
HTH,