MathGroup Archive 2006

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

Search the Archive

Re: Forcing surds into the numerator

  • To: mathgroup at
  • Subject: [mg64666] Re: Forcing surds into the numerator
  • From: bghiggins at
  • Date: Sun, 26 Feb 2006 05:07:50 -0500 (EST)
  • References: <dtp5pv$eq8$>
  • Sender: owner-wri-mathgroup at


The difficulty with what you are trying to do is that mathematica
always tries to reduce an expression to its simplest form. So the key
is to wrap a HoldForm around the surds. Here is a one way to do this

SurdFunction[x_] := Module[{num = Numerator[x],
    denom = Denominator[x], denom1},
   denom1 = denom /. Sqrt[y_] -> -Sqrt[y];
    (Simplify[num*denom1] /. Sqrt[y_] ->

SurdFunction[1/(2 - Sqrt[2])]

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


(1/4)*HoldForm[Sqrt[2]]*(-1 + HoldForm[Sqrt[3]])

Note that the surds in the output are wrapped with HoldForm to prevent
the kernel from trying to simplify the expression. In StandardForm the
HoldForm is not visible. To use this expression in another calculation,
you need to wrap the output with ReleaseHold.

Hope this helps,



  • Prev by Date: Q: How do I format text within a cell of GridBox[]?
  • Next by Date: Re: 3D Graphics suggestions?
  • Previous by thread: Re: Forcing surds into the numerator
  • Next by thread: Re: Forcing surds into the numerator