# Simplifying Radicals in Numerator and Denominator

I am new to Mathematica. So I am sorry if the question seems elementary.

I wanted to simplify an expression but it seems that some radicals ($\sqrt{u}$ and $\sqrt{u-1}$) in numerator or denominator do not cancel. What should I do?

f = Sqrt[u (-1 + u^2) - (-1 + u^2)^2] ((u (-1 + 2 u))/(
2 Sqrt[-u + u^2]) + Sqrt[-u + u^2])

FullSimplify[f]


and the result is

My final goal is to get

$$f = {1 \over 2}\sqrt { - u\left( {u + 1} \right)\left( {{u^2} - u - 1} \right)} \left( {4u - 3} \right)$$

• Greetings! To make the most of Mma.SE please take the tour now. Help us to help you, write an excellent question. Edit if improvable, show due diligence, give brief context, include minimum working examples of code and data in formatted form. As you receive give back, vote and answer questions, keep the site useful, be kind, correct mistakes and share what you have learned. – rhermans Jan 18 '16 at 11:14
• Is u positive? If so, is it greater than 1? This matters in the cancellations. – bbgodfrey Jan 18 '16 at 11:17
• People here generally like users to post code as Mathematica code instead of images or TeX, so they can copy-paste it, as @rhermans said. It makes it convenient for them and more likely you will get someone to help you. You may find this this meta Q&A helpful – Michael E2 Jan 18 '16 at 11:22
• @MichaelE2: OK. Thanks for the guide. I will do so. – H. R. Jan 18 '16 at 11:24
• Have you read the documentation about FullSimplify, esp. the parts that explain this summary, "FullSimplify[expr,assum] does simplification using assumptions."? – Michael E2 Jan 18 '16 at 11:24

Is this what you are seeking?

FullSimplify[f, u > 1]
(* 1/2 u (-3 + 4 u) Sqrt[2 + 1/u - u^2] *)


Response to edit in question

The LeafCount of this result is

LeafCount[%]
(* 24 *)


On the other hand, the LeafCount of the outcome desired by the OP is

g = 1/2  (-3 + 4 u) Sqrt[-u (u + 1) (u^2 - u - 1)]
LeafCount[%]
(* 27 *)


Note also that

FullSimplify[g, u > 1]
(* 1/2 (-3 + 4 u) Sqrt[u + 2 u^2 - u^4] *)
LeafCount[%]
(* 25 *)


which may be a more desirable result, if 1/u is not wanted in my first answer. I should add that most any transformation of f can be obtained with FullSimplify, but often not easily.

• Can you kindly see the updated question. I think it is not really fully simplified yet! $\sqrt{u}$ is not cancelled! – H. R. Jan 18 '16 at 11:31
• @@bbgodfrey, What is FullSimplify doing with these assumptions? The answer it comes out with does not depend on the assumptions, and seems to be true for any complex value of u: f2 = FullSimplify[f, u > 1]; Equal @@ {f, f2} /. u -> RandomComplex[{-10 - 10 I, 10 + 10 I}] – Jason B. Jan 18 '16 at 11:40
• @H.R. The issue is that your desired "simplified" result is less simple than mine as assessed by LeafCount. – bbgodfrey Jan 18 '16 at 11:49
• It's interesting that your form can be found by making the unnecessary assumption that u>1 (does that imply that Element[u,Reals]?), the OP's desired form is only true when u>1. – Jason B. Jan 18 '16 at 11:55
• @JasonB The two expressions seem to be equal in many but not all cases. Consider Equal @@ {f, f2} /. u -> .5 + .3 I, which is True. However, Equal @@ {f, f2} /. u -> .5 - .3 I is False. Interesting question, nonetheless. – bbgodfrey Jan 18 '16 at 12:06