Message Boards Message Boards

Heuristic package to denest radicals

Posted 8 years ago

NOTE: package and examples notebooks are attached at the end of this post


If you square a surd, and then take the square root, you just get it back. But how do you take the ? if you expand it after you square it?

enter image description here

Sometimes FullSimplify is smart enough:

enter image description here

Usually, it isn’t:

enter image description here

enter image description here

Corey Ziegler Hunts wrote a big heuristic package to denest radicals:

enter image description here

(Why “Strad”?) But usually radicals don’t denest:

enter image description here

When they do, the result can be startling:

enter image description here

Can this be right?

enter image description here

Yep. Hopefully this will be obsoleted by Mathematica's developers. But maybe not. I confess near total ignorance of Galois theory, which underlies all the denesting papers. But those papers never exhibit any cool new denestings! SAGE and Maple are rumored to denest, but again, where are goodies like

enter image description here

There are some issues. If there is no denesting, it can take infeasibly long to give up. And it doesn't listify. It misconstrues lists.

Illustrating the widespread underuse of denesting, Theta Function gives:

enter image description here

enter image description here

Tsk.

enter image description here

Is it possible for the nth root of a real binomial to denest to more than five terms? I've never seen one.

Attachments:
POSTED BY: Bill Gosper
4 Replies
Posted 8 years ago

Dear Valeriu: PowerExpand has no effect here--you could replace it by Identity. And replacing it with Expand has the exact opposite effect of what Strad (and its verbose cousin DenestRadicals3)

In[491]:= Sqrt[Expand[(Sqrt[3] - Sqrt[2])^2]]

Out[491]= Sqrt[5 - 2 Sqrt[6]]

In[492]:= DenestRadicals3@%

During evaluation of In[492]:= {f[Sqrt[5-2 Sqrt[6]]]}

During evaluation of In

During evaluation of In[492]:= problem Sqrt[5-2 Sqrt[6]]

During evaluation of In[492]:= outer root: 2 extra root: 1

During evaluation of In

During evaluation of In[492]:= multiplier count: 2 multipliers: {1,Sqrt[6]}

During evaluation of In[492]:= multiplier: 1 minpoly degree: 4

During evaluation of In[492]:= adding new multipliers from: 1

During evaluation of In[492]:= multiplier: Sqrt[6] minpoly degree: 4

During evaluation of In[492]:= adding new multipliers from: Sqrt[6]

During evaluation of In[492]:= multiplier count: 3 from: {1,4}

During evaluation of In[492]:= multiplier: 2 minpoly degree: 2

During evaluation of In[492]:= success: {2,2,{{2,1}}}

During evaluation of In[492]:= history: {{0,[Infinity]},{1,4},{2,2}}

During evaluation of In[492]:= -Sqrt[2]+Sqrt[3]

During evaluation of In

Out[492]= -Sqrt[2] + Sqrt[3]

are trying to achieve, namely, to convert the radicand back into a power that cancels the root operation. So I don't understand the objective of PowerExpand here. --Bill

POSTED BY: Bill Gosper
Posted 8 years ago

Vladimir: Sorry to have only now seen your query. License? Corey wrote this years ago while of highschool age, and appears to lack further interest in it. He has moved on from mathematics (http://www.blurb.com/b/2172660-minskys-trinskys-3rd-edition) to software engineering. I believe his chief concern with this package is not to be contacted when someone finds a bug! --Bill

POSTED BY: Bill Gosper

Dear Bill,

This is an amazing package! What license have you published it under? May I use it and derivative work in my open source projects?

What about applying PowerExpand?

In[2]:= Sqrt[PowerExpand[(Sqrt[2] - 1)^2]]

Out[2]= -1 + Sqrt[2]

In[3]:= Sqrt[PowerExpand[(Sqrt[3] - Sqrt[2])^2]]

Out[3]= -Sqrt[2] + Sqrt[3]

enter image description here

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract