Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #5736 > unrolled thread

Simplifying radicals

Started byTom De Vries <tidetabletom@gmail.com>
First post2011-10-20 11:49 +0000
Last post2011-10-24 09:19 +0000
Articles 6 — 5 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Simplifying radicals Tom De Vries <tidetabletom@gmail.com> - 2011-10-20 11:49 +0000
    Re: Simplifying radicals "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-10-21 10:25 +0000
    Re: Simplifying radicals dimitris <dimmechan@yahoo.com> - 2011-10-21 10:29 +0000
    Re: Simplifying radicals dimitris <dimmechan@yahoo.com> - 2011-10-22 10:15 +0000
    Re: Simplifying radicals Ray Koopman <koopman@sfu.ca> - 2011-10-23 10:35 +0000
      Re: Simplifying radicals Tom <tidetabletom@gmail.com> - 2011-10-24 09:19 +0000

#5736 — Simplifying radicals

FromTom De Vries <tidetabletom@gmail.com>
Date2011-10-20 11:49 +0000
SubjectSimplifying radicals
Message-ID<j7p1s8$5ko$1@smc.vnet.net>
Hi,  I'm working with some introductory topics in radicals.

I know that Mathematica assumes things about the domain used in
problems,  so the principal cube root of a negative number will be
complex... or something like that..

I'm way down at the lower high school level simply working with cube
roots of negative numbers and wanting a negative number result.

I know there are ways of using assumptions and solving over the reals, etc.

Is there any EASY way I can simply ask for the cube root of -729 and get -9?

TOM

[toc] | [next] | [standalone]


#5745

From"Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com>
Date2011-10-21 10:25 +0000
Message-ID<j7rhb4$hc7$1@smc.vnet.net>
In reply to#5736
On Thu, 20 Oct 2011 12:49:28 +0100, Tom De Vries <tidetabletom@gmail.com>  
wrote:

> Hi,  I'm working with some introductory topics in radicals.
>
> I know that Mathematica assumes things about the domain used in
> problems,  so the principal cube root of a negative number will be
> complex... or something like that..
>
> I'm way down at the lower high school level simply working with cube
> roots of negative numbers and wanting a negative number result.
>
> I know there are ways of using assumptions and solving over the reals,  
> etc.
>
> Is there any EASY way I can simply ask for the cube root of -729 and get  
> -9?
>
> TOM
>

negativeCubeRoot[num_?Negative] := Block[{x},
  x /. ToRules@Reduce[num == x^3 && x < 0, x, Reals]
];

negativeCubeRoot[-729]

-9

negativeCubeRoot[-150]

-5^(2/3) 6^(1/3)

negativeCubeRoot[-73.8]

-4.19455

[toc] | [prev] | [next] | [standalone]


#5752

Fromdimitris <dimmechan@yahoo.com>
Date2011-10-21 10:29 +0000
Message-ID<j7rhiq$hea$1@smc.vnet.net>
In reply to#5736
On Oct 20, 2:49 pm, Tom De Vries <tidetable...@gmail.com> wrote:
> Hi,  I'm working with some introductory topics in radicals.
>
> I know that Mathematica assumes things about the domain used in
> problems,  so the principal cube root of a negative number will be
> complex... or something like that..
>
> I'm way down at the lower high school level simply working with cube
> roots of negative numbers and wanting a negative number result.
>
> I know there are ways of using assumptions and solving over the reals, etc.
>
> Is there any EASY way I can simply ask for the cube root of -729 and get -9?
>
> TOM

Hello.

In[1]:=mycuberoot[x_] := Block[{w}, w = w /. Solve[w^3 == 1][[3]]=
;
If[Re[x] < 0, w*x^(1/3), x^(1/3)]]

In[2]:= mycuberoot[-729]
Out[2]= -9

A more advanced example:

In[17]:= {2 - Sqrt[5], 2 + Sqrt[5]}^(1/3)
 N[%]

Out[17]= {(2 - Sqrt[5])^(1/3), (2 + Sqrt[5])^(1/3)}  (*Mathematica by
her defaults evaluates (2 - Sqrt[5])^(1/3) to be a complex number*)
Out[18]= {0.30901699437494756 + 0.535233134659635*I,
1.618033988749895}

In[19]:= mycuberoot /@ {2 - Sqrt[5], 2 + Sqrt[5]}
Chop[N[%]]

Out[19]= {(-1)^(2/3)*(2 - Sqrt[5])^(1/3), (2 + Sqrt[5])^(1/3)}
Out[20]= {-0.618033988749895, 1.618033988749895}

For versions up to 5.2 you can also load the package RealOnly.

In[1]:=Needs["Miscellaneous`RealOnly`"]

In[2]:=
(-729)^(1/3)

Out[2]=
-9

Keep in mind that perhaps will be some conflicts with built in
functions like Simplify.

For more recent versions the package is not available anymore.
Nevertheless you can still download it from the following link:
http://library.wolfram.com/infocenter/MathSource/6771/

Regards
Dimitris

[toc] | [prev] | [next] | [standalone]


#5787

Fromdimitris <dimmechan@yahoo.com>
Date2011-10-22 10:15 +0000
Message-ID<j7u536$t85$1@smc.vnet.net>
In reply to#5736
On Oct 20, 2:49 pm, Tom De Vries <tidetable...@gmail.com> wrote:
> Hi,  I'm working with some introductory topics in radicals.
>
> I know that Mathematica assumes things about the domain used in
> problems,  so the principal cube root of a negative number will be
> complex... or something like that..
>
> I'm way down at the lower high school level simply working with cube
> roots of negative numbers and wanting a negative number result.
>
> I know there are ways of using assumptions and solving over the reals, etc.
>
> Is there any EASY way I can simply ask for the cube root of -729 and get -9?
>
> TOM

Apart from my original reply I would strongly suggest the following
thread:

http : // groups.google.com/group/comp.soft - sys.math.mathematica/
browse_thread/thread/403 b579399a8b61/d057e0af1e2a5474?lnk = gst & q principal + cube + root # d057e0af1e2a5474

Regards
Dimitris

[toc] | [prev] | [next] | [standalone]


#5825

FromRay Koopman <koopman@sfu.ca>
Date2011-10-23 10:35 +0000
Message-ID<j80qm8$agm$1@smc.vnet.net>
In reply to#5736
On Oct 20, 4:49 am, Tom De Vries <tidetable...@gmail.com> wrote:
> Hi,  I'm working with some introductory topics in radicals.
>
> I know that Mathematica assumes things about the domain used in
> problems,  so the principal cube root of a negative number will be
> complex... or something like that..
>
> I'm way down at the lower high school level simply working with cube
> roots of negative numbers and wanting a negative number result.
>
> I know there are ways of using assumptions and solving over the reals, etc.
>
> Is there any EASY way I can simply ask for the cube root of -729 and get -9?
>
> TOM

qbrt = Piecewise[{{-(-#)^(1/3),#<0}},#^(1/3)]&

[toc] | [prev] | [next] | [standalone]


#5839

FromTom <tidetabletom@gmail.com>
Date2011-10-24 09:19 +0000
Message-ID<j83aiv$k6a$1@smc.vnet.net>
In reply to#5825
Thanks for all the replies to my question,  I appreciate it!

I always learn a lot when I post questions to this group,  it's very
helpful!!!

TOM

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web