Re: Re: Radicals simplify
- To: mathgroup at smc.vnet.net
- Subject: [mg106435] Re: [mg106399] Re: Radicals simplify
- From: "David Park" <djmpark at comcast.net>
- Date: Tue, 12 Jan 2010 04:50:49 -0500 (EST)
- References: <hic37h$5ef$1@smc.vnet.net> <hieujs$mtu$1@smc.vnet.net> <549721.1263255174908.JavaMail.root@n11>
The problem is that Mathematica automatically combines expressions such as x
Sqrt[x]. To display that form it is necessary to wrap x in a HoldForm so
that it won't recombine.
In Mathematica it is often necessary to write routines to obtain the form
you want. Here is a somewhat general routine that may work for you:
factorIntegerPower::usage =
"factorIntegerPower[expr] will factor out integer powers from a \
symbolic radical power x^p where p is Rational. The integer power is \
kept in a HoldForm. It is assumes that x represents a positive Real.";
factorIntegerPower[expr_] :=
expr /. x_^p_Rational :>
Module[{floor, frac},
floor = Floor[p];
frac = p - floor;
If[floor == 0, x^frac, HoldForm @@ {x^floor} x^frac]
]
{11 x^(3/2), y^(73/15), y^(2/15), x^(-14/11)} // factorIntegerPower
{11 Sqrt[x] x, y^(13/15) y^4, y^(2/15), x^(8/11) 1/x^2}
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/
From: francix [mailto:fracix at hotmail.com]
"dh" <dh at metrohm.com> ha scritto nel messaggio
news:hieujs$mtu$1 at smc.vnet.net...
>
>
> Hi,
>
> why do you think x(x^2 y^3)^(1/4) is simpler than (x^6 y^3)^(1/4)?
>
> Mathematica needs some criterion for this decision. The default criterion
is the
>
> "LeafCount[..]". If that does not suit you, you must define another
>
> criterion.
>
> Daniel
Thank you all for your answer.
I understand your explanations, but I have the impression
that in this case Mathematica uses numbers in a different
way from letters.
If I do
Simplify[2 Sqrt[2] + 4 Sqrt[2]] I get
6 Sqrt[2]
or
Simplify[5 Sqrt[50] + 6 Sqrt[18]] I get
43 Sqrt[2]
Instead if I do
Simplify[5 x Sqrt[x] + 6 x Sqrt[x], x >= 0] or
Simplify[5 Sqrt[x^3] + 6 x Sqrt[x], x >= 0] I get
11 x^(3/2) instead of 11xSqrt[x]
As you know the last one is the result
normally found in Algebra books.
So, there is no solution?