ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 30 Mar 2015 09:34:58 +0200declare name of derivativehttps://ask.sagemath.org/question/26377/declare-name-of-derivative/After defining a function depending on one variable as
v(t) = function('v', t);
Then v.diff() displays as
t ↦ D[0](v)(t)
Rather I would like to teach Sage that the derivative of v is a such that v.diff() is displayed as t↦a(t).
Can this be done?Sun, 29 Mar 2015 17:16:10 +0200https://ask.sagemath.org/question/26377/declare-name-of-derivative/Answer by rws for <p>After defining a function depending on one variable as</p>
<pre><code>v(t) = function('v', t);
</code></pre>
<p>Then v.diff() displays as</p>
<pre><code>t ↦ D[0](v)(t)
</code></pre>
<p>Rather I would like to teach Sage that the derivative of v is a such that v.diff() is displayed as t↦a(t).</p>
<p>Can this be done?</p>
https://ask.sagemath.org/question/26377/declare-name-of-derivative/?answer=26378#post-id-26378This specific output might not be possible, but you can define a function to be called on `v.diff()`.
It's all explained at http://sagemath.org/doc/reference/calculus/sage/symbolic/function_factory.htmlMon, 30 Mar 2015 09:34:58 +0200https://ask.sagemath.org/question/26377/declare-name-of-derivative/?answer=26378#post-id-26378