From: Evan C. <eva...@gm...> - 2018-05-30 00:16:52
|
Thanks for the insights. Makes some sense, given my understanding of how Maxima 'works'. On 5/29/2018 7:39 PM, Stavros Macrakis (Σταῦρος Μακράκης) wrote: > Maxima has a canonical form for many things. There's no way to force > it to write 1 2/3 or 1+2/3 instead of 5/3 or 2*sqrt(2) instead of > 2^(3/2). The simplifier immediately converts 2*sqrt(2) into 2^(3/2). > On the other hand, the general simplifier leaves 2*sqrt(6) alone; you > need radcan to transform it to 2^(3/2)*sqrt(3). > > All that being said, it is pretty trivial to work with /unsimplified > /expressions yourself using the pattern matching routines or simple > recursing through the expression. Of course, you'll have to decide > whether you prefer 1/sqrt(2) or sqrt(2)/2; sqrt(6) or sqrt(2)*sqrt(3); > whether you want to simplify sqrt(6)/sqrt(21) to sqrt(2)/sqrt(7); etc. > > On Tue, May 29, 2018 at 7:10 PM, Evan Cooch <eva...@gm... > <mailto:eva...@gm...>> wrote: > > My son who is toiling away in middle school math asked me if there > was a simple way using a CAS to re-write expressions in simplest > radical form. For example, enter sqrt(8), and have the CAS return > 2 * sqrt(2). > > I know how to do this in Maple, or Mathematica (e.g, in Maple, > convert(sqrt(8),radical) will suffice), but I wanted to show him > ho to do it in Maxima (I'm try to encourage him to use Open > Source, etc). But, for the life of me, I can't figure out how to > get Maxima to return something in simplest radical form, in a > format that will be 'obvious' to him. I've made a few token > attempts using radcan, but > > radcan(sqrt(8)) > > returns 2^(3/2), which *I* know is equivalent to 2 * sqrt(2), but > my son might not (although I'd be impressed if he did). > > Is there a straightforward way, in Maxima, to simplify (say) > sqrt(8) --> 2 * sqrt(2) (and have it look like that -- 222\sqrt{2})? > > Thanks in advance... > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > <mailto:Max...@li...> > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > <https://lists.sourceforge.net/lists/listinfo/maxima-discuss> > > |