Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2010

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

Search the Archive

using rules for square roots

  • To: mathgroup at
  • Subject: [mg110257] using rules for square roots
  • From: Kent Holing <KHO at>
  • Date: Thu, 10 Jun 2010 08:10:04 -0400 (EDT)

Using the Mathematica session
g[x_,n_]:=Module[{m=Quotient[n,2]},If[EvenQ[n],x^m,x^m Sqrt[x]]]; 
rule1=Sqrt[x_ y_]->Sqrt[x] Sqrt[y]; 
rule=Sqrt[x_^n_]->x^Quotient[n,2] Sqrt[x^Mod[n,2]]; 

Now, str/.rule gives the "correct" answer

But why does not rule0 work? 
str/.rule returns

I would also like that rule (and rule0) should return say
e^5/2 as e^2 Sqrt[e]. How can this be accomplished?


  • Prev by Date: Re: Question
  • Next by Date: Re: Question
  • Previous by thread: Re: difficulty using FindRoot
  • Next by thread: Re: using rules for square roots