MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Simplify Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41808] Re: Simplify Question
  • From: "Dana DeLouis" <delouis at bellsouth.net>
  • Date: Fri, 6 Jun 2003 09:50:39 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Thanks Jens-Peer.  I learned something new from studying your example.
Unfortunately, I get 3 Sqrt functions.

(FullSimplify[#1, x > 0, ComplexityFunction ->
(If[Head[#1] === Rational, 1, 0] & )] & )[Sqrt[2]/Sqrt[1 + 1/x]]

(Sqrt[2]*Sqrt[x])/Sqrt[1 + x]

I guess Mathematica gives a high priority to the exact number of Sqrt[2] and
factors it out.
Here, without making any assumptions on "a", the equation fully simplifies
to the simple Sqrt[a/b].

FullSimplify[Sqrt[a]/Sqrt[b], b > 0]
Sqrt[a/b]

However, if you replace "a" with a number, then it returns a function with 2
Sqrt functions instead of Sqrt[2/b].

FullSimplify[Sqrt[2]/Sqrt[b], b > 0]
Sqrt[2]/Sqrt[b]

The only way I came close was with the following...

FullSimplify[Sqrt[2]/Sqrt[1 + 1/x], x > 0,
ComplexityFunction -> (Count[{#1}, _Power, 2] & )]

Sqrt[2 - 2/(1 + x)]

Then, if I select everything inside the Sqrt function, and hit the Simplify
button, then I get a function with only 1 sqrt function.

Sqrt[(2*x)/(1 + x)]

This was the form I was looking for.

I tried all variations using the option "TransformationFunctions", but I had
no luck with this either.
Well, no big deal I guess.  Now that I am aware of this limitation, I will
try to use variables instead of numbers in the future.
Look forward to the next version.
Thanks again.

--
Dana DeLouis
Windows XP
Mathematica $VersionNumber -> 4.2
delouis at bellsouth.net


"Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de> wrote in message
news:bb73d6$b7f$1 at smc.vnet.net...
> Hi,
>
> do you like the output of
>
> Sqrt[2]/Sqrt[1 + 1/x] //
>   FullSimplify[#, x > 0,
>       ComplexityFunction -> (If[Head[#] === Rational, 1, 0] &)] &
>
> more ??
>
> Regards
>   Jens
>
> >
> > Hello.  Could someone offer an explanation or a solution on the
following?  I am trying to simplify an equation that has a Sqrt in both the
numerator and denominator.  I would like to have just one Sqrt function.
> >
> > Sqrt[2]/Sqrt[1 + 1/x]
> > Returns...
> > Sqrt[2]/Sqrt[1 + 1/x]

>>  I am looking for the following form: (1 Sqrt function)
>>  Sqrt[(2*x)/(1 + x)]

<<snip>>





  • Prev by Date: RE: For[] command in Show[] function
  • Next by Date: virus attachments from some mathgroup users
  • Previous by thread: Re: Mathlink performance and task switches
  • Next by thread: virus attachments from some mathgroup users