I am trying to force Mathematica to output $\frac{1}{\sqrt2}$ as $\frac{\sqrt2}{2}$.
I tried:
{1, Sqrt[2]}*Sqrt[2]
Which outputs:
(* {Sqrt[2], 2} *)
Now,
Divide @@ {Sqrt[2], 2}
returns:
(* 1/Sqrt[2] *)
So I tried:
HoldForm[Divide @@ {Sqrt[2], 2}]
But that didn't work. Any suggestions to get my preferred output for this particular example?



{1, Sqrt[2]}*Sqrt[2] /. {x_, y_} :> Divide[HoldForm[x], y]– garej Jan 17 '16 at 20:06Divide @@ HoldForm /@ {Sqrt[2], 2}– garej Jan 17 '16 at 20:151/Sqrt[2]asSqrt[2]/2in output. Rather the question seems to be about printingSqrt[2]/2. It may be worth updating the title and text accordingly. – Oleksandr R. Jan 18 '16 at 01:39