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, 11 Jul 2013 16:01:06 +0200simple(?) exponentiation simplificationhttps://ask.sagemath.org/question/10345/simple-exponentiation-simplification/I'm beginning with <code>sage</code>. It sure looks great but I still have to understand what is the actual meaning of what I type in :-(
This is where I am currently stuck:
<pre>
<code>
sage: simplify( (a/b)^c - (a^c)/(b^c) )
-a^c/b^c + (a/b)^c
</code>
</pre>
I would have loved to get a nice clean **$0$**.
What do I need to tell <code>sage</code> so that it sees that $(a/b)^c$ and $a^c/b^c$ are the same?Thu, 11 Jul 2013 15:36:09 +0200https://ask.sagemath.org/question/10345/simple-exponentiation-simplification/Comment by kcrisman for <p>I'm beginning with <code>sage</code>. It sure looks great but I still have to understand what is the actual meaning of what I type in :-(</p>
<p>This is where I am currently stuck:</p>
<pre> <code>
sage: simplify( (a/b)^c - (a^c)/(b^c) )
-a^c/b^c + (a/b)^c
</code>
</pre>
<p>I would have loved to get a nice clean <strong>$0$</strong>.
What do I need to tell <code>sage</code> so that it sees that $(a/b)^c$ and $a^c/b^c$ are the same?</p>
https://ask.sagemath.org/question/10345/simple-exponentiation-simplification/?comment=17297#post-id-17297? This is not the same thing. There isn't any particular reason that Sage (or any other system) should be asked to always expand such expressions; it could be arbitrarily computationally expensive to do so. Whereas when one *explicitly adds in an assumption*, it would be nice to have that happen (which is what the other question is about).Thu, 11 Jul 2013 16:01:06 +0200https://ask.sagemath.org/question/10345/simple-exponentiation-simplification/?comment=17297#post-id-17297Comment by moroplogo for <p>I'm beginning with <code>sage</code>. It sure looks great but I still have to understand what is the actual meaning of what I type in :-(</p>
<p>This is where I am currently stuck:</p>
<pre> <code>
sage: simplify( (a/b)^c - (a^c)/(b^c) )
-a^c/b^c + (a/b)^c
</code>
</pre>
<p>I would have loved to get a nice clean <strong>$0$</strong>.
What do I need to tell <code>sage</code> so that it sees that $(a/b)^c$ and $a^c/b^c$ are the same?</p>
https://ask.sagemath.org/question/10345/simple-exponentiation-simplification/?comment=17298#post-id-17298It's a bit the same problem that here : http://ask.sagemath.org/question/2718/why-abssinpin-is-not-simplified-by-sinpin-when-n2
And the answer is a bit the same...
"The most one can say here is that Maxima doesn't "know" that sin(pi/n) is, in fact, positive. The assumptions framework in Maxima (and hence Sage) is acknowledged to be fairly weak."Thu, 11 Jul 2013 15:50:21 +0200https://ask.sagemath.org/question/10345/simple-exponentiation-simplification/?comment=17298#post-id-17298Answer by tmonteil for <p>I'm beginning with <code>sage</code>. It sure looks great but I still have to understand what is the actual meaning of what I type in :-(</p>
<p>This is where I am currently stuck:</p>
<pre> <code>
sage: simplify( (a/b)^c - (a^c)/(b^c) )
-a^c/b^c + (a/b)^c
</code>
</pre>
<p>I would have loved to get a nice clean <strong>$0$</strong>.
What do I need to tell <code>sage</code> so that it sees that $(a/b)^c$ and $a^c/b^c$ are the same?</p>
https://ask.sagemath.org/question/10345/simple-exponentiation-simplification/?answer=15225#post-id-15225You can use the method `.full_simplify()`:
sage: var('a b c')
(a, b, c)
sage: expression = (a/b)^c - (a^c)/(b^c)
sage: expression.full_simplify()
0
Thu, 11 Jul 2013 15:53:11 +0200https://ask.sagemath.org/question/10345/simple-exponentiation-simplification/?answer=15225#post-id-15225