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.Thu, 15 Aug 2013 21:55:23 +0200Computing derivativeshttps://ask.sagemath.org/question/10438/computing-derivatives/Hey guys,
I dont know where the problem is, but sage (5.10 here) doesnt compute easy derivatives as e.g.
x = var('x')
f = sqrt(x)
diff(f,x)
This leads to the following error:
TypeError: unable to simplify to float approximation
Whats the problem here?Thu, 15 Aug 2013 13:46:42 +0200https://ask.sagemath.org/question/10438/computing-derivatives/Comment by kcrisman for <p>Hey guys,</p>
<p>I dont know where the problem is, but sage (5.10 here) doesnt compute easy derivatives as e.g.</p>
<pre><code>x = var('x')
f = sqrt(x)
diff(f,x)
</code></pre>
<p>This leads to the following error:
TypeError: unable to simplify to float approximation</p>
<p>Whats the problem here?</p>
https://ask.sagemath.org/question/10438/computing-derivatives/?comment=17158#post-id-17158Can you give us your *complete* session? This should work fine, it sounds like you probably accidentally defined something in-between which changed things.Thu, 15 Aug 2013 14:46:33 +0200https://ask.sagemath.org/question/10438/computing-derivatives/?comment=17158#post-id-17158Comment by kcrisman for <p>Hey guys,</p>
<p>I dont know where the problem is, but sage (5.10 here) doesnt compute easy derivatives as e.g.</p>
<pre><code>x = var('x')
f = sqrt(x)
diff(f,x)
</code></pre>
<p>This leads to the following error:
TypeError: unable to simplify to float approximation</p>
<p>Whats the problem here?</p>
https://ask.sagemath.org/question/10438/computing-derivatives/?comment=17155#post-id-17155DSM, why don't you put your answer as an answer so pinwheel can accept it?Thu, 15 Aug 2013 21:55:23 +0200https://ask.sagemath.org/question/10438/computing-derivatives/?comment=17155#post-id-17155Comment by DSM for <p>Hey guys,</p>
<p>I dont know where the problem is, but sage (5.10 here) doesnt compute easy derivatives as e.g.</p>
<pre><code>x = var('x')
f = sqrt(x)
diff(f,x)
</code></pre>
<p>This leads to the following error:
TypeError: unable to simplify to float approximation</p>
<p>Whats the problem here?</p>
https://ask.sagemath.org/question/10438/computing-derivatives/?comment=17157#post-id-17157That's what you'd get if `sqrt` were actually `math.sqrt` and not Sage's `sqrt`.Thu, 15 Aug 2013 14:55:35 +0200https://ask.sagemath.org/question/10438/computing-derivatives/?comment=17157#post-id-17157Answer by pinwheel for <p>Hey guys,</p>
<p>I dont know where the problem is, but sage (5.10 here) doesnt compute easy derivatives as e.g.</p>
<pre><code>x = var('x')
f = sqrt(x)
diff(f,x)
</code></pre>
<p>This leads to the following error:
TypeError: unable to simplify to float approximation</p>
<p>Whats the problem here?</p>
https://ask.sagemath.org/question/10438/computing-derivatives/?answer=15349#post-id-15349You are perfectly right. I defined sqrt as math.sqrt at the very beginning of my session. I completely forget that this is still included.
Thanks a lot!Thu, 15 Aug 2013 17:39:10 +0200https://ask.sagemath.org/question/10438/computing-derivatives/?answer=15349#post-id-15349