Search   Memberlist   Usergroups
 Page 1 of 1 [5 Posts]
Author Message
science forum Guru Wannabe

Joined: 11 Sep 2005
Posts: 198

Posted: Wed Mar 29, 2006 10:21 pm    Post subject: Semi-tough simplify test

This "simplify challenge" from the internet is semi-tough (not
as good as VB's, but scalable) Using Mathematica notation:

xnum=((6-4*Sqrt[2])*Log[3-2*Sqrt[2]]+(3-2*Sqrt[2])*
Log[17-12*Sqrt[2]]+32-24*Sqrt[2]);
xden=(48*Sqrt[2]-72)*(Log[Sqrt[2]+1]+Sqrt[2])/3;
x=xnum/xden;

The answer is x=1. If you dont believe me, print N[x,300]//InputForm

Mathematica is unable to complete the simplification of
Expand[{x, x^2, x^4, ... }], etc. Typically the leafcount is
cut by about 1/3 before it gives up.

 Quote: From extrapolation I estimate that FullSimplify[Expand[x^32]] (* leafcount= a miserly 60432 *)

will take 10^33 years on my Mac G5. Can't wait that long,
this Universe will endure only about 10^11 more yrs and the
license will have expired. Can maple or maxima do it quicker?
Peter L. Montgomery
science forum Guru Wannabe

Joined: 01 May 2005
Posts: 181

Posted: Thu Mar 30, 2006 3:17 am    Post subject: Re: Semi-tough simplify test

 Quote: This "simplify challenge" from the internet is semi-tough (not as good as VB's, but scalable) Using Mathematica notation: xnum=((6-4*Sqrt[2])*Log[3-2*Sqrt[2]]+(3-2*Sqrt[2])* Log[17-12*Sqrt[2]]+32-24*Sqrt[2]); xden=(48*Sqrt[2]-72)*(Log[Sqrt[2]+1]+Sqrt[2])/3; x=xnum/xden; The answer is x=1. If you dont believe me, print N[x,300]//InputForm Mathematica is unable to complete the simplification of Expand[{x, x^2, x^4, ... }], etc. Typically the leafcount is cut by about 1/3 before it gives up. From extrapolation I estimate that FullSimplify[Expand[x^32]] (* leafcount= a miserly 60432 *) will take 10^33 years on my Mac G5. Can't wait that long, this Universe will endure only about 10^11 more yrs and the license will have expired. Can maple or maxima do it quicker?

Maple 10 does it instantly:

|\^/| Maple 10 (SUN SPARC SOLARIS)
.._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2005
<____ ____> Waterloo Maple Inc.
| Type ? for help.
 Quote: Sqrt := sqrt; Sqrt := sqrt

 Quote: Log := log; Log := log

 Quote: xnum:=((6-4*Sqrt(2))*Log(3-2*Sqrt(2))+(3-2*Sqrt(2))* Log(17-12*Sqrt(2))+32-24*Sqrt(2)); xnum :=

1/2 1/2 1/2 1/2 1/2
(6 - 4 2 ) ln(3 - 2 2 ) + (3 - 2 2 ) ln(17 - 12 2 ) + 32 - 24 2

 Quote: xden:=(48*Sqrt(2)-72)*(Log(Sqrt(2)+1)+Sqrt(2))/3; 1/2 1/2 1/2

xden := 1/3 (48 2 - 72) (ln(2 + 1) + 2 )

 Quote: x:=xnum/xden; x := 3 (

1/2 1/2 1/2 1/2 1/2
(6 - 4 2 ) ln(3 - 2 2 ) + (3 - 2 2 ) ln(17 - 12 2 ) + 32 - 24 2 )

/ 1/2 1/2 1/2
/ ((48 2 - 72) (ln(2 + 1) + 2 ))
/

 Quote: simplify(x); bytes used=4001356, alloc=3538296, time=0.83

1

 Quote: evalf(x); 0.9999999807

 Quote: ;quit; bytes used=4904128, alloc=3538296, time=1.02

--
VP Cheney Burr-ed his gun as a bird flew past The nation responds "burr"
as we await bird flu shots and fight a real cold war.

pmontgom@cwi.nl Microsoft Research and CWI Home: Bellevue, WA
science forum Guru Wannabe

Joined: 11 Sep 2005
Posts: 198

Posted: Thu Mar 30, 2006 4:36 am    Post subject: Re: Semi-tough simplify test

But Maple did not explicitly produce x=1 (integer 1). At least
I didnt see it in your post.

Mathematica's FullSimplify gives (after 2.3 sec) for x:

(8*Sqrt[2] + (7 + 6*Sqrt[2])*Log[17 - 12*Sqrt[2]] -
6*(3 + 2*Sqrt[2])*Log[3 - 2*Sqrt[2]])/(8*(Sqrt[2] + ArcSinh[1]))

which has about 1/4 of the original leafcount. Complexity is
similar to maple's result.

How about Macsyma and Axiom? Can they produce the
integer one?
science forum Guru Wannabe

Joined: 11 Sep 2005
Posts: 198

 Posted: Thu Mar 30, 2006 4:46 am    Post subject: Re: Semi-tough simplify test My apologies. I see the 1 in the row after bytes used = So Maple wins this one. Canada 1, USA 0.
astanoff@yahoo.fr
science forum beginner

Joined: 21 Oct 2005
Posts: 17

 Posted: Tue Apr 04, 2006 9:22 am    Post subject: Re: Semi-tough simplify test My mma solution with help of FindInstance : In[1]:= myFactor[(x_Integer) + (y_Integer)*Sqrt[z_Integer]] := Module[{ex, coe, fi, a, b, c, d}, ex = (Collect[#1, Sqrt[z]] & )[x + y*Sqrt[z] - Expand[(a + b*Sqrt[z])*(c + d*Sqrt[z])]]; coe = (CoefficientList[#1, Sqrt[z]] & )[ex]; fi = FindInstance[coe[[1]] == 0 && coe[[2]] == 0, {a, b, c, d}, Integers]; First[(a + b*Sqrt[z])*(c + d*Sqrt[z]) /. fi]]; In[2]:= xnum=((6-4*Sqrt[2])*Log[3-2*Sqrt[2]]+(3-2*Sqrt[2])* Log[17-12*Sqrt[2]]+32-24*Sqrt[2]); xden=(48*Sqrt[2]-72)*(Log[Sqrt[2]+1]+Sqrt[2])/3; x=xnum/xden ; In[5]:= x//.Log[a_+b_ Sqrt[z_]]:>Log[myFactor[a+b Sqrt[z]]] // FunctionExpand//FullSimplify Out[5]= 1 V.Astanoff

 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 Page 1 of 1 [5 Posts]
 The time now is Thu Feb 21, 2019 8:05 am | All times are GMT
 Jump to: Select a forum-------------------Forum index|___Science and Technology    |___Math    |   |___Research    |   |___num-analysis    |   |___Symbolic    |   |___Combinatorics    |   |___Probability    |   |   |___Prediction    |   |       |   |___Undergraduate    |   |___Recreational    |       |___Physics    |   |___Research    |   |___New Theories    |   |___Acoustics    |   |___Electromagnetics    |   |___Strings    |   |___Particle    |   |___Fusion    |   |___Relativity    |       |___Chem    |   |___Analytical    |   |___Electrochem    |   |   |___Battery    |   |       |   |___Coatings    |       |___Engineering        |___Control        |___Mechanics        |___Chemical

 Topic Author Forum Replies Last Post Similar Topics How does a CAS simplify complicated expressions? xyz91234@yahoo.com Symbolic 4 Tue Jul 18, 2006 12:59 am test bill11 Math 1 Fri Jul 14, 2006 8:44 pm test lesterzick@cableone.net Math 0 Wed Jul 12, 2006 5:48 pm test - ignore matt271829-news@yahoo.co. Undergraduate 1 Mon Jul 10, 2006 10:32 pm Tough Galois theory problem. Doug B Math 6 Mon Jul 10, 2006 12:10 am