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.Sat, 08 Aug 2015 03:18:30 -0500full simplify, sage vs mathematicahttp://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/I have this somewhat lengthy, but in principal trivial expression
sage: B = 1/4*(e^(sqrt(-2*cos(l) + 2)) + 1)*(I*sin(l) -
cos(l))*e^(-1/2*sqrt(-2*cos(l) + 2)) - 1/4*sqrt(-2*cos(l) +
2)*(e^(sqrt(-2*cos(l) + 2))*sin(l)^2/sqrt(-2*cos(l) + 2) +
I*e^(sqrt(-2*cos(l) + 2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2)
- (I*e^(sqrt(-2*cos(l) + 2)) - I)*sin(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*cos(l) - I*e^(sqrt(-2*cos(l) +
2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))) +
1/8*sqrt(-2*cos(l) + 2)*((I*e^(sqrt(-2*cos(l) + 2)) -
I)*cos(l) + (e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) -
I*e^(sqrt(-2*cos(l) + 2)) + I)*(e^(1/2*sqrt(-2*cos(l) +
2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2) -
2*e^(1/2*sqrt(-2*cos(l) + 2))*sin(l) - e^(1/2*sqrt(-2*cos(l)
+ 2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2)))^2 -
1/4*((I*e^(sqrt(-2*cos(l) + 2)) - I)*cos(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) - I*e^(sqrt(-2*cos(l) +
2)) + I)*sin(l)/(sqrt(-2*cos(l) + 2)*(e^(1/2*sqrt(-2*cos(l)
+ 2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))))
My humble understanding of full_simply() is, that it will 'kind of' make the 'simplest looking' expression from that.
sage: B.full_simply()
1/8*((e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^3 -
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^2 +
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l) +
((-I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*cos(l)^2 +
(2*I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 2*I)*cos(l) -
I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*sin(l) + sqrt(cos(l) -
1)*((I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) -
I*sqrt(2))*cos(l)^2 + (-2*I*sqrt(2)*e^(I*sqrt(cos(l) -
1)*sqrt(2)) + 2*I*sqrt(2))*cos(l) +
((sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - sqrt(2))*cos(l) -
sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + sqrt(2))*sin(l) +
I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I*sqrt(2)) -
e^(I*sqrt(cos(l) - 1)*sqrt(2)) - 1)/(e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*sin(l)^2 + 2*e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*cos(l) - 2*e^(1/2*I*sqrt(cos(l) - 1)*sqrt(2)))
That doesn't look too much simpler. So I compared to *Mathematica*
sage: B._mathematica_().FullSimplify()
(I*Sin[l/2]^3*(Sqrt[1 - Cos[l]]*Cosh[Sin[l/2]] -
Sqrt[2]*Sinh[Sqrt[Sin[l/2]^2]]))/(E^((I/2)*l)*(1 - Cos[l])^(3/2))
Does this imply I really have to use *Mathematica* for such things?Thu, 27 Oct 2011 10:38:16 -0500http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/Comment by Xaver for <div class="snippet"><p>I have this somewhat lengthy, but in principal trivial expression </p>
<pre><code>sage: B = 1/4*(e^(sqrt(-2*cos(l) + 2)) + 1)*(I*sin(l) -
cos(l))*e^(-1/2*sqrt(-2*cos(l) + 2)) - 1/4*sqrt(-2*cos(l) +
2)*(e^(sqrt(-2*cos(l) + 2))*sin(l)^2/sqrt(-2*cos(l) + 2) +
I*e^(sqrt(-2*cos(l) + 2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2)
- (I*e^(sqrt(-2*cos(l) + 2)) - I)*sin(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*cos(l) - I*e^(sqrt(-2*cos(l) +
2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))) +
1/8*sqrt(-2*cos(l) + 2)*((I*e^(sqrt(-2*cos(l) + 2)) -
I)*cos(l) + (e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) -
I*e^(sqrt(-2*cos(l) + 2)) + I)*(e^(1/2*sqrt(-2*cos(l) +
2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2) -
2*e^(1/2*sqrt(-2*cos(l) + 2))*sin(l) - e^(1/2*sqrt(-2*cos(l)
+ 2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2)))^2 -
1/4*((I*e^(sqrt(-2*cos(l) + 2)) - I)*cos(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) - I*e^(sqrt(-2*cos(l) +
2)) + I)*sin(l)/(sqrt(-2*cos(l) + 2)*(e^(1/2*sqrt(-2*cos(l)
+ 2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))))
</code></pre>
<p>My humble understanding of full_simply() is, that it will 'kind of' make the 'simplest looking' expression from that.</p>
<pre><code>sage: B.full_simply()
1/8*((e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^3 -
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^2 +
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l) +
((-I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*cos(l)^2 +
(2*I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 2*I)*cos(l) -
I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*sin(l) + sqrt(cos(l) -
1)*((I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) -
I*sqrt(2))*cos(l)^2 + (-2*I*sqrt(2)*e^(I*sqrt(cos(l) -
1)*sqrt(2)) + 2*I*sqrt(2))*cos(l) +
((sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - sqrt(2))*cos(l) -
sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + sqrt(2))*sin(l) +
I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I*sqrt(2)) -
e^(I*sqrt(cos(l) - 1)*sqrt(2)) - 1)/(e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*sin(l)^2 + 2*e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*cos(l) - 2*e^(1/2*I*sqrt(cos(l) - 1)*sqrt(2)))
</code></pre>
<p>That doesn ...<span class="expander"> <a>(more)</a></span></p></div>http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21022#post-id-21022@G-Sage TAB completion produces both, full_simplify() and simplify_full() and they both return the same results - moreover the doc says:
simplify_full(...)
File: sage/symbolic/expression.pyx (starting at line 6553)
Applies simplify_factorial, simplify_trig, simplify_rational,
simplify_radical, simplify_log, and again simplify_rational to
self (in that order).
ALIAS: simplify_full and full_simplify are the sameThu, 27 Oct 2011 12:48:48 -0500http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21022#post-id-21022Comment by G-Sage for <div class="snippet"><p>I have this somewhat lengthy, but in principal trivial expression </p>
<pre><code>sage: B = 1/4*(e^(sqrt(-2*cos(l) + 2)) + 1)*(I*sin(l) -
cos(l))*e^(-1/2*sqrt(-2*cos(l) + 2)) - 1/4*sqrt(-2*cos(l) +
2)*(e^(sqrt(-2*cos(l) + 2))*sin(l)^2/sqrt(-2*cos(l) + 2) +
I*e^(sqrt(-2*cos(l) + 2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2)
- (I*e^(sqrt(-2*cos(l) + 2)) - I)*sin(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*cos(l) - I*e^(sqrt(-2*cos(l) +
2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))) +
1/8*sqrt(-2*cos(l) + 2)*((I*e^(sqrt(-2*cos(l) + 2)) -
I)*cos(l) + (e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) -
I*e^(sqrt(-2*cos(l) + 2)) + I)*(e^(1/2*sqrt(-2*cos(l) +
2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2) -
2*e^(1/2*sqrt(-2*cos(l) + 2))*sin(l) - e^(1/2*sqrt(-2*cos(l)
+ 2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2)))^2 -
1/4*((I*e^(sqrt(-2*cos(l) + 2)) - I)*cos(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) - I*e^(sqrt(-2*cos(l) +
2)) + I)*sin(l)/(sqrt(-2*cos(l) + 2)*(e^(1/2*sqrt(-2*cos(l)
+ 2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))))
</code></pre>
<p>My humble understanding of full_simply() is, that it will 'kind of' make the 'simplest looking' expression from that.</p>
<pre><code>sage: B.full_simply()
1/8*((e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^3 -
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^2 +
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l) +
((-I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*cos(l)^2 +
(2*I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 2*I)*cos(l) -
I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*sin(l) + sqrt(cos(l) -
1)*((I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) -
I*sqrt(2))*cos(l)^2 + (-2*I*sqrt(2)*e^(I*sqrt(cos(l) -
1)*sqrt(2)) + 2*I*sqrt(2))*cos(l) +
((sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - sqrt(2))*cos(l) -
sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + sqrt(2))*sin(l) +
I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I*sqrt(2)) -
e^(I*sqrt(cos(l) - 1)*sqrt(2)) - 1)/(e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*sin(l)^2 + 2*e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*cos(l) - 2*e^(1/2*I*sqrt(cos(l) - 1)*sqrt(2)))
</code></pre>
<p>That doesn ...<span class="expander"> <a>(more)</a></span></p></div>http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21017#post-id-21017@Xaver First, I had a slight typo (extra y), but my question was is it really full_simply? You responded by saying there exists full_simplify. These are different. It's not that important. I just thought it was weird to have full_simply when it's so close to the full phrase.Thu, 27 Oct 2011 15:28:41 -0500http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21017#post-id-21017Comment by G-Sage for <div class="snippet"><p>I have this somewhat lengthy, but in principal trivial expression </p>
<pre><code>sage: B = 1/4*(e^(sqrt(-2*cos(l) + 2)) + 1)*(I*sin(l) -
cos(l))*e^(-1/2*sqrt(-2*cos(l) + 2)) - 1/4*sqrt(-2*cos(l) +
2)*(e^(sqrt(-2*cos(l) + 2))*sin(l)^2/sqrt(-2*cos(l) + 2) +
I*e^(sqrt(-2*cos(l) + 2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2)
- (I*e^(sqrt(-2*cos(l) + 2)) - I)*sin(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*cos(l) - I*e^(sqrt(-2*cos(l) +
2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))) +
1/8*sqrt(-2*cos(l) + 2)*((I*e^(sqrt(-2*cos(l) + 2)) -
I)*cos(l) + (e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) -
I*e^(sqrt(-2*cos(l) + 2)) + I)*(e^(1/2*sqrt(-2*cos(l) +
2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2) -
2*e^(1/2*sqrt(-2*cos(l) + 2))*sin(l) - e^(1/2*sqrt(-2*cos(l)
+ 2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2)))^2 -
1/4*((I*e^(sqrt(-2*cos(l) + 2)) - I)*cos(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) - I*e^(sqrt(-2*cos(l) +
2)) + I)*sin(l)/(sqrt(-2*cos(l) + 2)*(e^(1/2*sqrt(-2*cos(l)
+ 2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))))
</code></pre>
<p>My humble understanding of full_simply() is, that it will 'kind of' make the 'simplest looking' expression from that.</p>
<pre><code>sage: B.full_simply()
1/8*((e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^3 -
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^2 +
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l) +
((-I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*cos(l)^2 +
(2*I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 2*I)*cos(l) -
I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*sin(l) + sqrt(cos(l) -
1)*((I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) -
I*sqrt(2))*cos(l)^2 + (-2*I*sqrt(2)*e^(I*sqrt(cos(l) -
1)*sqrt(2)) + 2*I*sqrt(2))*cos(l) +
((sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - sqrt(2))*cos(l) -
sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + sqrt(2))*sin(l) +
I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I*sqrt(2)) -
e^(I*sqrt(cos(l) - 1)*sqrt(2)) - 1)/(e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*sin(l)^2 + 2*e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*cos(l) - 2*e^(1/2*I*sqrt(cos(l) - 1)*sqrt(2)))
</code></pre>
<p>That doesn ...<span class="expander"> <a>(more)</a></span></p></div>http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21025#post-id-21025Is it really fully_simply?Thu, 27 Oct 2011 10:54:28 -0500http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21025#post-id-21025Comment by benjaminfjones for <div class="snippet"><p>I have this somewhat lengthy, but in principal trivial expression </p>
<pre><code>sage: B = 1/4*(e^(sqrt(-2*cos(l) + 2)) + 1)*(I*sin(l) -
cos(l))*e^(-1/2*sqrt(-2*cos(l) + 2)) - 1/4*sqrt(-2*cos(l) +
2)*(e^(sqrt(-2*cos(l) + 2))*sin(l)^2/sqrt(-2*cos(l) + 2) +
I*e^(sqrt(-2*cos(l) + 2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2)
- (I*e^(sqrt(-2*cos(l) + 2)) - I)*sin(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*cos(l) - I*e^(sqrt(-2*cos(l) +
2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))) +
1/8*sqrt(-2*cos(l) + 2)*((I*e^(sqrt(-2*cos(l) + 2)) -
I)*cos(l) + (e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) -
I*e^(sqrt(-2*cos(l) + 2)) + I)*(e^(1/2*sqrt(-2*cos(l) +
2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2) -
2*e^(1/2*sqrt(-2*cos(l) + 2))*sin(l) - e^(1/2*sqrt(-2*cos(l)
+ 2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2)))^2 -
1/4*((I*e^(sqrt(-2*cos(l) + 2)) - I)*cos(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) - I*e^(sqrt(-2*cos(l) +
2)) + I)*sin(l)/(sqrt(-2*cos(l) + 2)*(e^(1/2*sqrt(-2*cos(l)
+ 2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))))
</code></pre>
<p>My humble understanding of full_simply() is, that it will 'kind of' make the 'simplest looking' expression from that.</p>
<pre><code>sage: B.full_simply()
1/8*((e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^3 -
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^2 +
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l) +
((-I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*cos(l)^2 +
(2*I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 2*I)*cos(l) -
I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*sin(l) + sqrt(cos(l) -
1)*((I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) -
I*sqrt(2))*cos(l)^2 + (-2*I*sqrt(2)*e^(I*sqrt(cos(l) -
1)*sqrt(2)) + 2*I*sqrt(2))*cos(l) +
((sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - sqrt(2))*cos(l) -
sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + sqrt(2))*sin(l) +
I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I*sqrt(2)) -
e^(I*sqrt(cos(l) - 1)*sqrt(2)) - 1)/(e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*sin(l)^2 + 2*e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*cos(l) - 2*e^(1/2*I*sqrt(cos(l) - 1)*sqrt(2)))
</code></pre>
<p>That doesn ...<span class="expander"> <a>(more)</a></span></p></div>http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21021#post-id-21021What is `l` here? A symbolic variable?Thu, 27 Oct 2011 13:42:06 -0500http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21021#post-id-21021Comment by kcrisman for <div class="snippet"><p>I have this somewhat lengthy, but in principal trivial expression </p>
<pre><code>sage: B = 1/4*(e^(sqrt(-2*cos(l) + 2)) + 1)*(I*sin(l) -
cos(l))*e^(-1/2*sqrt(-2*cos(l) + 2)) - 1/4*sqrt(-2*cos(l) +
2)*(e^(sqrt(-2*cos(l) + 2))*sin(l)^2/sqrt(-2*cos(l) + 2) +
I*e^(sqrt(-2*cos(l) + 2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2)
- (I*e^(sqrt(-2*cos(l) + 2)) - I)*sin(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*cos(l) - I*e^(sqrt(-2*cos(l) +
2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))) +
1/8*sqrt(-2*cos(l) + 2)*((I*e^(sqrt(-2*cos(l) + 2)) -
I)*cos(l) + (e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) -
I*e^(sqrt(-2*cos(l) + 2)) + I)*(e^(1/2*sqrt(-2*cos(l) +
2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2) -
2*e^(1/2*sqrt(-2*cos(l) + 2))*sin(l) - e^(1/2*sqrt(-2*cos(l)
+ 2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2)))^2 -
1/4*((I*e^(sqrt(-2*cos(l) + 2)) - I)*cos(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) - I*e^(sqrt(-2*cos(l) +
2)) + I)*sin(l)/(sqrt(-2*cos(l) + 2)*(e^(1/2*sqrt(-2*cos(l)
+ 2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))))
</code></pre>
<p>My humble understanding of full_simply() is, that it will 'kind of' make the 'simplest looking' expression from that.</p>
<pre><code>sage: B.full_simply()
1/8*((e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^3 -
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^2 +
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l) +
((-I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*cos(l)^2 +
(2*I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 2*I)*cos(l) -
I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*sin(l) + sqrt(cos(l) -
1)*((I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) -
I*sqrt(2))*cos(l)^2 + (-2*I*sqrt(2)*e^(I*sqrt(cos(l) -
1)*sqrt(2)) + 2*I*sqrt(2))*cos(l) +
((sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - sqrt(2))*cos(l) -
sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + sqrt(2))*sin(l) +
I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I*sqrt(2)) -
e^(I*sqrt(cos(l) - 1)*sqrt(2)) - 1)/(e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*sin(l)^2 + 2*e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*cos(l) - 2*e^(1/2*I*sqrt(cos(l) - 1)*sqrt(2)))
</code></pre>
<p>That doesn ...<span class="expander"> <a>(more)</a></span></p></div>http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21020#post-id-21020I don't know that an "answer" is really appropriate here. It's pretty well-known among power users that symbolic manipulation is something that Maple and Mma do better than Maxima (which provides our simplification). It's unfortunate, but that is one reason we provide the hooks to other programs. Thu, 27 Oct 2011 14:51:54 -0500http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21020#post-id-21020Comment by kcrisman for <div class="snippet"><p>I have this somewhat lengthy, but in principal trivial expression </p>
<pre><code>sage: B = 1/4*(e^(sqrt(-2*cos(l) + 2)) + 1)*(I*sin(l) -
cos(l))*e^(-1/2*sqrt(-2*cos(l) + 2)) - 1/4*sqrt(-2*cos(l) +
2)*(e^(sqrt(-2*cos(l) + 2))*sin(l)^2/sqrt(-2*cos(l) + 2) +
I*e^(sqrt(-2*cos(l) + 2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2)
- (I*e^(sqrt(-2*cos(l) + 2)) - I)*sin(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*cos(l) - I*e^(sqrt(-2*cos(l) +
2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))) +
1/8*sqrt(-2*cos(l) + 2)*((I*e^(sqrt(-2*cos(l) + 2)) -
I)*cos(l) + (e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) -
I*e^(sqrt(-2*cos(l) + 2)) + I)*(e^(1/2*sqrt(-2*cos(l) +
2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2) -
2*e^(1/2*sqrt(-2*cos(l) + 2))*sin(l) - e^(1/2*sqrt(-2*cos(l)
+ 2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2)))^2 -
1/4*((I*e^(sqrt(-2*cos(l) + 2)) - I)*cos(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) - I*e^(sqrt(-2*cos(l) +
2)) + I)*sin(l)/(sqrt(-2*cos(l) + 2)*(e^(1/2*sqrt(-2*cos(l)
+ 2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))))
</code></pre>
<p>My humble understanding of full_simply() is, that it will 'kind of' make the 'simplest looking' expression from that.</p>
<pre><code>sage: B.full_simply()
1/8*((e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^3 -
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^2 +
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l) +
((-I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*cos(l)^2 +
(2*I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 2*I)*cos(l) -
I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*sin(l) + sqrt(cos(l) -
1)*((I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) -
I*sqrt(2))*cos(l)^2 + (-2*I*sqrt(2)*e^(I*sqrt(cos(l) -
1)*sqrt(2)) + 2*I*sqrt(2))*cos(l) +
((sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - sqrt(2))*cos(l) -
sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + sqrt(2))*sin(l) +
I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I*sqrt(2)) -
e^(I*sqrt(cos(l) - 1)*sqrt(2)) - 1)/(e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*sin(l)^2 + 2*e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*cos(l) - 2*e^(1/2*I*sqrt(cos(l) - 1)*sqrt(2)))
</code></pre>
<p>That doesn ...<span class="expander"> <a>(more)</a></span></p></div>http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21008#post-id-21008I think that there is just a typo in Xaver's comment. No worries.Fri, 28 Oct 2011 07:52:55 -0500http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21008#post-id-21008Answer by Xaver for <div class="snippet"><p>I have this somewhat lengthy, but in principal trivial expression </p>
<pre><code>sage: B = 1/4*(e^(sqrt(-2*cos(l) + 2)) + 1)*(I*sin(l) -
cos(l))*e^(-1/2*sqrt(-2*cos(l) + 2)) - 1/4*sqrt(-2*cos(l) +
2)*(e^(sqrt(-2*cos(l) + 2))*sin(l)^2/sqrt(-2*cos(l) + 2) +
I*e^(sqrt(-2*cos(l) + 2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2)
- (I*e^(sqrt(-2*cos(l) + 2)) - I)*sin(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*cos(l) - I*e^(sqrt(-2*cos(l) +
2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))) +
1/8*sqrt(-2*cos(l) + 2)*((I*e^(sqrt(-2*cos(l) + 2)) -
I)*cos(l) + (e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) -
I*e^(sqrt(-2*cos(l) + 2)) + I)*(e^(1/2*sqrt(-2*cos(l) +
2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2) -
2*e^(1/2*sqrt(-2*cos(l) + 2))*sin(l) - e^(1/2*sqrt(-2*cos(l)
+ 2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2)))^2 -
1/4*((I*e^(sqrt(-2*cos(l) + 2)) - I)*cos(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) - I*e^(sqrt(-2*cos(l) +
2)) + I)*sin(l)/(sqrt(-2*cos(l) + 2)*(e^(1/2*sqrt(-2*cos(l)
+ 2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))))
</code></pre>
<p>My humble understanding of full_simply() is, that it will 'kind of' make the 'simplest looking' expression from that.</p>
<pre><code>sage: B.full_simply()
1/8*((e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^3 -
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^2 +
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l) +
((-I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*cos(l)^2 +
(2*I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 2*I)*cos(l) -
I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*sin(l) + sqrt(cos(l) -
1)*((I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) -
I*sqrt(2))*cos(l)^2 + (-2*I*sqrt(2)*e^(I*sqrt(cos(l) -
1)*sqrt(2)) + 2*I*sqrt(2))*cos(l) +
((sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - sqrt(2))*cos(l) -
sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + sqrt(2))*sin(l) +
I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I*sqrt(2)) -
e^(I*sqrt(cos(l) - 1)*sqrt(2)) - 1)/(e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*sin(l)^2 + 2*e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*cos(l) - 2*e^(1/2*I*sqrt(cos(l) - 1)*sqrt(2)))
</code></pre>
<p>That doesn ...<span class="expander"> <a>(more)</a></span></p></div> http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?answer=12829#post-id-12829> kcrisman wrote: I don't know that an "answer" is
> really appropriate here. It's pretty
> well-known among power users that
> symbolic manipulation is something
> that Maple and Mma do better than
> Maxima (which provides our
> simplification). It's unfortunate
**Actually this is far more of an answer than I was expecting from an open source project.** Thank you very much indeed. I am surely not a power user of sage but I am a power user of mathematica with several tens of thousands of lines of code written for research and teaching in theoretical physics over the years and using it surely not only but definitely also for symbolic manipulation. Actually I didn't even know of sage since very recently a student of mine asked about it. Reading the "Tour of Sage" and the "Tutorial" in the docs and the frequently reoccurring benchmarks against mathematica in other parts of the docs, I was mislead to think ".. wow this might be an open source replacement ..". So it played around with sage in my spare time, attempting just some very 1st and trivial things.
Some of my related questions you can find in this forum. I learned, stuff like: sage can't get elementary functions like the log() straight, or, plotting more than just the cos() gets you into trouble, and now I read that I should not use sage for symbolic manipulations.
So yes, you gave an answer - one which will also help my students (which can have their university licenses of mathematica for free anyway).
Update: see this http://thingwy.blogspot.de/
Thu, 27 Oct 2011 21:21:54 -0500http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?answer=12829#post-id-12829Comment by Xaver for <blockquote>
<p>kcrisman wrote: I don't know that an "answer" is
really appropriate here. It's pretty
well-known among power users that
symbolic manipulation is something
that Maple and Mma do better than
Maxima (which provides our
simplification). It's unfortunate</p>
</blockquote>
<p><strong>Actually this is far more of an answer than I was expecting from an open source project.</strong> Thank you very much indeed. I am surely not a power user of sage but I am a power user of mathematica with several tens of thousands of lines of code written for research and teaching in theoretical physics over the years and using it surely not only but definitely also for symbolic manipulation. Actually I didn't even know of sage since very recently a student of mine asked about it. Reading the "Tour of Sage" and the "Tutorial" in the docs and the frequently reoccurring benchmarks against mathematica in other parts of the docs, I was mislead to think ".. wow this might be an open source replacement ..". So it played around with sage in my spare time, attempting just some very 1st and trivial things.</p>
<p>Some of my related questions you can find in this forum. I learned, stuff like: sage can't get elementary functions like the log() straight, or, plotting more than just the cos() gets you into trouble, and now I read that I should not use sage for symbolic manipulations.</p>
<p>So yes, you gave an answer - one which will also help my students (which can have their university licenses of mathematica for free anyway).</p>
<p>Update: see this <a href="http://thingwy.blogspot.de/">http://thingwy.blogspot.de/</a></p>
http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=28776#post-id-28776see this post http://thingwy.blogspot.de/Sat, 08 Aug 2015 03:18:30 -0500http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=28776#post-id-28776Comment by kcrisman for <blockquote>
<p>kcrisman wrote: I don't know that an "answer" is
really appropriate here. It's pretty
well-known among power users that
symbolic manipulation is something
that Maple and Mma do better than
Maxima (which provides our
simplification). It's unfortunate</p>
</blockquote>
<p><strong>Actually this is far more of an answer than I was expecting from an open source project.</strong> Thank you very much indeed. I am surely not a power user of sage but I am a power user of mathematica with several tens of thousands of lines of code written for research and teaching in theoretical physics over the years and using it surely not only but definitely also for symbolic manipulation. Actually I didn't even know of sage since very recently a student of mine asked about it. Reading the "Tour of Sage" and the "Tutorial" in the docs and the frequently reoccurring benchmarks against mathematica in other parts of the docs, I was mislead to think ".. wow this might be an open source replacement ..". So it played around with sage in my spare time, attempting just some very 1st and trivial things.</p>
<p>Some of my related questions you can find in this forum. I learned, stuff like: sage can't get elementary functions like the log() straight, or, plotting more than just the cos() gets you into trouble, and now I read that I should not use sage for symbolic manipulations.</p>
<p>So yes, you gave an answer - one which will also help my students (which can have their university licenses of mathematica for free anyway).</p>
<p>Update: see this <a href="http://thingwy.blogspot.de/">http://thingwy.blogspot.de/</a></p>
http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=20571#post-id-20571I'm not sure what else there is to say here. You may want to try Maxima directly, or ask on their list how they would respond to this. Basically, Maxima is philosophically oriented the other direction from Mathematica on this.Sun, 08 Jan 2012 14:44:25 -0600http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=20571#post-id-20571Comment by G-Sage for <blockquote>
<p>kcrisman wrote: I don't know that an "answer" is
really appropriate here. It's pretty
well-known among power users that
symbolic manipulation is something
that Maple and Mma do better than
Maxima (which provides our
simplification). It's unfortunate</p>
</blockquote>
<p><strong>Actually this is far more of an answer than I was expecting from an open source project.</strong> Thank you very much indeed. I am surely not a power user of sage but I am a power user of mathematica with several tens of thousands of lines of code written for research and teaching in theoretical physics over the years and using it surely not only but definitely also for symbolic manipulation. Actually I didn't even know of sage since very recently a student of mine asked about it. Reading the "Tour of Sage" and the "Tutorial" in the docs and the frequently reoccurring benchmarks against mathematica in other parts of the docs, I was mislead to think ".. wow this might be an open source replacement ..". So it played around with sage in my spare time, attempting just some very 1st and trivial things.</p>
<p>Some of my related questions you can find in this forum. I learned, stuff like: sage can't get elementary functions like the log() straight, or, plotting more than just the cos() gets you into trouble, and now I read that I should not use sage for symbolic manipulations.</p>
<p>So yes, you gave an answer - one which will also help my students (which can have their university licenses of mathematica for free anyway).</p>
<p>Update: see this <a href="http://thingwy.blogspot.de/">http://thingwy.blogspot.de/</a></p>
http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21006#post-id-21006@Xaver And, I would like to add, if it seems like these things are so simple to you, perhaps you can program them to work better? That's the beauty of Sage.Fri, 28 Oct 2011 09:47:21 -0500http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21006#post-id-21006Comment by kcrisman for <blockquote>
<p>kcrisman wrote: I don't know that an "answer" is
really appropriate here. It's pretty
well-known among power users that
symbolic manipulation is something
that Maple and Mma do better than
Maxima (which provides our
simplification). It's unfortunate</p>
</blockquote>
<p><strong>Actually this is far more of an answer than I was expecting from an open source project.</strong> Thank you very much indeed. I am surely not a power user of sage but I am a power user of mathematica with several tens of thousands of lines of code written for research and teaching in theoretical physics over the years and using it surely not only but definitely also for symbolic manipulation. Actually I didn't even know of sage since very recently a student of mine asked about it. Reading the "Tour of Sage" and the "Tutorial" in the docs and the frequently reoccurring benchmarks against mathematica in other parts of the docs, I was mislead to think ".. wow this might be an open source replacement ..". So it played around with sage in my spare time, attempting just some very 1st and trivial things.</p>
<p>Some of my related questions you can find in this forum. I learned, stuff like: sage can't get elementary functions like the log() straight, or, plotting more than just the cos() gets you into trouble, and now I read that I should not use sage for symbolic manipulations.</p>
<p>So yes, you gave an answer - one which will also help my students (which can have their university licenses of mathematica for free anyway).</p>
<p>Update: see this <a href="http://thingwy.blogspot.de/">http://thingwy.blogspot.de/</a></p>
http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21005#post-id-21005@G-Sage to be fair, most mathematicians would like to *do* math, not necessarily program it :) which the BDFL often points out. Fri, 28 Oct 2011 16:16:28 -0500http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21005#post-id-21005Comment by H. Arponen for <blockquote>
<p>kcrisman wrote: I don't know that an "answer" is
really appropriate here. It's pretty
well-known among power users that
symbolic manipulation is something
that Maple and Mma do better than
Maxima (which provides our
simplification). It's unfortunate</p>
</blockquote>
<p><strong>Actually this is far more of an answer than I was expecting from an open source project.</strong> Thank you very much indeed. I am surely not a power user of sage but I am a power user of mathematica with several tens of thousands of lines of code written for research and teaching in theoretical physics over the years and using it surely not only but definitely also for symbolic manipulation. Actually I didn't even know of sage since very recently a student of mine asked about it. Reading the "Tour of Sage" and the "Tutorial" in the docs and the frequently reoccurring benchmarks against mathematica in other parts of the docs, I was mislead to think ".. wow this might be an open source replacement ..". So it played around with sage in my spare time, attempting just some very 1st and trivial things.</p>
<p>Some of my related questions you can find in this forum. I learned, stuff like: sage can't get elementary functions like the log() straight, or, plotting more than just the cos() gets you into trouble, and now I read that I should not use sage for symbolic manipulations.</p>
<p>So yes, you gave an answer - one which will also help my students (which can have their university licenses of mathematica for free anyway).</p>
<p>Update: see this <a href="http://thingwy.blogspot.de/">http://thingwy.blogspot.de/</a></p>
http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=20576#post-id-20576I'd like to try to resurrect this issue, if possible. Similarly to Xaver, I had high hopes for SAGE, but when comparing different symbolic simplification functions, I've come to realize the superiority of MMA's FullSimplify. I don't think there's any program/function that can even come close to that... anyway, is something like that under development by SAGE members? I'd like to perhaps take part, although I'm probably not qualified... I have some experience with functional programming in mma though. It would be great to be able to completely migrate to SAGE! :)Sun, 08 Jan 2012 04:20:57 -0600http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=20576#post-id-20576Comment by G-Sage for <blockquote>
<p>kcrisman wrote: I don't know that an "answer" is
really appropriate here. It's pretty
well-known among power users that
symbolic manipulation is something
that Maple and Mma do better than
Maxima (which provides our
simplification). It's unfortunate</p>
</blockquote>
<p><strong>Actually this is far more of an answer than I was expecting from an open source project.</strong> Thank you very much indeed. I am surely not a power user of sage but I am a power user of mathematica with several tens of thousands of lines of code written for research and teaching in theoretical physics over the years and using it surely not only but definitely also for symbolic manipulation. Actually I didn't even know of sage since very recently a student of mine asked about it. Reading the "Tour of Sage" and the "Tutorial" in the docs and the frequently reoccurring benchmarks against mathematica in other parts of the docs, I was mislead to think ".. wow this might be an open source replacement ..". So it played around with sage in my spare time, attempting just some very 1st and trivial things.</p>
<p>Some of my related questions you can find in this forum. I learned, stuff like: sage can't get elementary functions like the log() straight, or, plotting more than just the cos() gets you into trouble, and now I read that I should not use sage for symbolic manipulations.</p>
<p>So yes, you gave an answer - one which will also help my students (which can have their university licenses of mathematica for free anyway).</p>
<p>Update: see this <a href="http://thingwy.blogspot.de/">http://thingwy.blogspot.de/</a></p>
http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21013#post-id-21013But, the point of this is that any one who wants to can create new features. For some things, it's way better than Mathematica already. And, for others, it could be better in the future as people contribute more and more to it. It's only been around for a few years. Mathematica was first released in 1988. If you thought this would be as good as Mathematica in every way, that doesn't make any sense. And, for any one who doesn't end up as a professor, Mathematica is going to cost them $1500, or whatever, maybe that's off. Sage will cost them $0.Fri, 28 Oct 2011 00:45:04 -0500http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21013#post-id-21013Comment by kcrisman for <blockquote>
<p>kcrisman wrote: I don't know that an "answer" is
really appropriate here. It's pretty
well-known among power users that
symbolic manipulation is something
that Maple and Mma do better than
Maxima (which provides our
simplification). It's unfortunate</p>
</blockquote>
<p><strong>Actually this is far more of an answer than I was expecting from an open source project.</strong> Thank you very much indeed. I am surely not a power user of sage but I am a power user of mathematica with several tens of thousands of lines of code written for research and teaching in theoretical physics over the years and using it surely not only but definitely also for symbolic manipulation. Actually I didn't even know of sage since very recently a student of mine asked about it. Reading the "Tour of Sage" and the "Tutorial" in the docs and the frequently reoccurring benchmarks against mathematica in other parts of the docs, I was mislead to think ".. wow this might be an open source replacement ..". So it played around with sage in my spare time, attempting just some very 1st and trivial things.</p>
<p>Some of my related questions you can find in this forum. I learned, stuff like: sage can't get elementary functions like the log() straight, or, plotting more than just the cos() gets you into trouble, and now I read that I should not use sage for symbolic manipulations.</p>
<p>So yes, you gave an answer - one which will also help my students (which can have their university licenses of mathematica for free anyway).</p>
<p>Update: see this <a href="http://thingwy.blogspot.de/">http://thingwy.blogspot.de/</a></p>
http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21011#post-id-21011Well, in Sage we like to be honest. And there is a lot of stuff we have that blows Mma out of the water, if you do those things. But remember, some of the questions you are asking are asking something different than Sage is answering. To be quite frank, there is nothing I need to do in my research or teaching that Sage cannot do. To me, the sort of symbolic things you are talking about are relatively arcane (and the things I do are probably arcane to you!). Sorry I can't expand on this but I need to rush off :( the point being that I think you are overstating the case of "very trivial" things Sage cannot do up to certain standards.Fri, 28 Oct 2011 03:03:03 -0500http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=21011#post-id-21011Comment by H. Arponen for <blockquote>
<p>kcrisman wrote: I don't know that an "answer" is
really appropriate here. It's pretty
well-known among power users that
symbolic manipulation is something
that Maple and Mma do better than
Maxima (which provides our
simplification). It's unfortunate</p>
</blockquote>
<p><strong>Actually this is far more of an answer than I was expecting from an open source project.</strong> Thank you very much indeed. I am surely not a power user of sage but I am a power user of mathematica with several tens of thousands of lines of code written for research and teaching in theoretical physics over the years and using it surely not only but definitely also for symbolic manipulation. Actually I didn't even know of sage since very recently a student of mine asked about it. Reading the "Tour of Sage" and the "Tutorial" in the docs and the frequently reoccurring benchmarks against mathematica in other parts of the docs, I was mislead to think ".. wow this might be an open source replacement ..". So it played around with sage in my spare time, attempting just some very 1st and trivial things.</p>
<p>Some of my related questions you can find in this forum. I learned, stuff like: sage can't get elementary functions like the log() straight, or, plotting more than just the cos() gets you into trouble, and now I read that I should not use sage for symbolic manipulations.</p>
<p>So yes, you gave an answer - one which will also help my students (which can have their university licenses of mathematica for free anyway).</p>
<p>Update: see this <a href="http://thingwy.blogspot.de/">http://thingwy.blogspot.de/</a></p>
http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=20575#post-id-20575I'd like to try to resurrect this issue, if possible. Similarly to Xaver, I had high hopes for SAGE, but when comparing different symbolic simplification functions, I've come to realize the superiority of MMA's FullSimplify. I don't think there's any program/function that can even come close to that...Sun, 08 Jan 2012 04:20:57 -0600http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?comment=20575#post-id-20575Answer by kcrisman for <div class="snippet"><p>I have this somewhat lengthy, but in principal trivial expression </p>
<pre><code>sage: B = 1/4*(e^(sqrt(-2*cos(l) + 2)) + 1)*(I*sin(l) -
cos(l))*e^(-1/2*sqrt(-2*cos(l) + 2)) - 1/4*sqrt(-2*cos(l) +
2)*(e^(sqrt(-2*cos(l) + 2))*sin(l)^2/sqrt(-2*cos(l) + 2) +
I*e^(sqrt(-2*cos(l) + 2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2)
- (I*e^(sqrt(-2*cos(l) + 2)) - I)*sin(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*cos(l) - I*e^(sqrt(-2*cos(l) +
2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))) +
1/8*sqrt(-2*cos(l) + 2)*((I*e^(sqrt(-2*cos(l) + 2)) -
I)*cos(l) + (e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) -
I*e^(sqrt(-2*cos(l) + 2)) + I)*(e^(1/2*sqrt(-2*cos(l) +
2))*sin(l)*cos(l)/sqrt(-2*cos(l) + 2) -
2*e^(1/2*sqrt(-2*cos(l) + 2))*sin(l) - e^(1/2*sqrt(-2*cos(l)
+ 2))*sin(l)/sqrt(-2*cos(l) + 2))/(e^(1/2*sqrt(-2*cos(l) +
2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2)))^2 -
1/4*((I*e^(sqrt(-2*cos(l) + 2)) - I)*cos(l) +
(e^(sqrt(-2*cos(l) + 2)) - 1)*sin(l) - I*e^(sqrt(-2*cos(l) +
2)) + I)*sin(l)/(sqrt(-2*cos(l) + 2)*(e^(1/2*sqrt(-2*cos(l)
+ 2))*cos(l) - e^(1/2*sqrt(-2*cos(l) + 2))))
</code></pre>
<p>My humble understanding of full_simply() is, that it will 'kind of' make the 'simplest looking' expression from that.</p>
<pre><code>sage: B.full_simply()
1/8*((e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^3 -
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l)^2 +
3*(e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 1)*cos(l) +
((-I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*cos(l)^2 +
(2*I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + 2*I)*cos(l) -
I*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I)*sin(l) + sqrt(cos(l) -
1)*((I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) -
I*sqrt(2))*cos(l)^2 + (-2*I*sqrt(2)*e^(I*sqrt(cos(l) -
1)*sqrt(2)) + 2*I*sqrt(2))*cos(l) +
((sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - sqrt(2))*cos(l) -
sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) + sqrt(2))*sin(l) +
I*sqrt(2)*e^(I*sqrt(cos(l) - 1)*sqrt(2)) - I*sqrt(2)) -
e^(I*sqrt(cos(l) - 1)*sqrt(2)) - 1)/(e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*sin(l)^2 + 2*e^(1/2*I*sqrt(cos(l) -
1)*sqrt(2))*cos(l) - 2*e^(1/2*I*sqrt(cos(l) - 1)*sqrt(2)))
</code></pre>
<p>That doesn ...<span class="expander"> <a>(more)</a></span></p></div> http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?answer=12826#post-id-12826On the other hand, I do think it could be useful to apply some simplification rules via substitution. For instance, you have lots of `e^(I*sqrt(cos(l) - 1)*sqrt(2))` guys.
var('T')
C = B.substitute_expression(e^(sqrt(-2*cos(l) + 2))==T)
This isn't ideal, but better, I guess. Sometimes this sort of thing is quite helpful, though.
Also, sometimes using `factor` or `expand` proves useful. Thu, 27 Oct 2011 14:58:51 -0500http://ask.sagemath.org/question/8403/full-simplify-sage-vs-mathematica/?answer=12826#post-id-12826