ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 15 Aug 2013 14:55:23 -0500Computing derivativeshttp://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 06:46:42 -0500http://ask.sagemath.org/question/10438/computing-derivatives/Comment 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>
http://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 07:55:35 -0500http://ask.sagemath.org/question/10438/computing-derivatives/?comment=17157#post-id-17157Comment 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>
http://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 14:55:23 -0500http://ask.sagemath.org/question/10438/computing-derivatives/?comment=17155#post-id-17155Comment 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>
http://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 07:46:33 -0500http://ask.sagemath.org/question/10438/computing-derivatives/?comment=17158#post-id-17158Answer 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>
http://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 10:39:10 -0500http://ask.sagemath.org/question/10438/computing-derivatives/?answer=15349#post-id-15349