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, 12 Jan 2015 18:15:30 +0100Derivative of a functionhttps://ask.sagemath.org/question/25495/derivative-of-a-function/ Hi, I've got this two functions:
psi=function('psi',t)
psi_d=function('psi_d',t)
psi=(sin(delta(t))*v(t))/(l*cos(delta(t)))
psi_d=diff(psi)
but it says *No differentiation variable specified* how can I derivate psi? Please someone help me it's driving me crazy since yesterday!
Thank you very muchMon, 12 Jan 2015 12:52:24 +0100https://ask.sagemath.org/question/25495/derivative-of-a-function/Comment by kcrisman for <p>Hi, I've got this two functions:</p>
<pre><code>psi=function('psi',t)
psi_d=function('psi_d',t)
psi=(sin(delta(t))*v(t))/(l*cos(delta(t)))
psi_d=diff(psi)
</code></pre>
<p>but it says <em>No differentiation variable specified</em> how can I derivate psi? Please someone help me it's driving me crazy since yesterday!</p>
<p>Thank you very much</p>
https://ask.sagemath.org/question/25495/derivative-of-a-function/?comment=25502#post-id-25502By the way, in general the first thing you should do when you encounter an error like that is to make sure you didn't accidentally make a mistake in the syntax. This help can be gotten by typing `diff?` and it should tell you then that you need the variable of differentiation, as pointed out below.Mon, 12 Jan 2015 18:15:30 +0100https://ask.sagemath.org/question/25495/derivative-of-a-function/?comment=25502#post-id-25502Answer by FrédéricC for <p>Hi, I've got this two functions:</p>
<pre><code>psi=function('psi',t)
psi_d=function('psi_d',t)
psi=(sin(delta(t))*v(t))/(l*cos(delta(t)))
psi_d=diff(psi)
</code></pre>
<p>but it says <em>No differentiation variable specified</em> how can I derivate psi? Please someone help me it's driving me crazy since yesterday!</p>
<p>Thank you very much</p>
https://ask.sagemath.org/question/25495/derivative-of-a-function/?answer=25496#post-id-25496You have to specify the derivation variable t:
sage: diff(psi,t)
v(t)*D[0](delta)(t)/l + sin(delta(t))^2*v(t)*D[0](delta)(t)/(l*cos(delta(t))^2) + sin(delta(t))*D[0](v)(t)/(l*cos(delta(t)))Mon, 12 Jan 2015 13:47:37 +0100https://ask.sagemath.org/question/25495/derivative-of-a-function/?answer=25496#post-id-25496Comment by Silvia for <p>You have to specify the derivation variable t:</p>
<pre><code>sage: diff(psi,t)
v(t)*D[0](delta)(t)/l + sin(delta(t))^2*v(t)*D[0](delta)(t)/(l*cos(delta(t))^2) + sin(delta(t))*D[0](v)(t)/(l*cos(delta(t)))
</code></pre>
https://ask.sagemath.org/question/25495/derivative-of-a-function/?comment=25497#post-id-25497Thank you so much!!Mon, 12 Jan 2015 13:57:17 +0100https://ask.sagemath.org/question/25495/derivative-of-a-function/?comment=25497#post-id-25497