Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to pass an assumption to FullSimplify so whenever it gets a function that is squared and square rooted would return me only the function body, without Abs[f] (I've tried assumption _Symbol ∈ Reals && _Symbol > 0 but it gives Abs[f] instead of f.

f[x_] := a x^2;
FullSimplify[Sqrt[f[x]^2], _Symbol ∈ Reals && _Symbol > 0]
x^2 Abs[a]
share|improve this question
FullSimplify[Sqrt[f[x]^2], _Symbol \[Element] Reals] /. Abs[v_] -> v – george2079 May 23 '14 at 19:07
up vote 1 down vote accepted

Try this:

FullSimplify[Sqrt[f[x]^2], TransformationFunctions -> {Automatic, PowerExpand}]
share|improve this answer
That's exactly the kind of fix I've been looking for! Big thanks! – Ranza May 30 '14 at 22:23

I'm not sure about the syntax you have used in the second argument of FullSimplify. How about the following

f[x_] := a x^2;
 x \[Element] Reals && x > 0 && a \[Element] Reals && a > 0]
a x^2
share|improve this answer
I'd like it to work with any function, not just a function with "a" and "x" – Ranza May 23 '14 at 16:08

Try this (for any symbols):

SetAttributes[Greater, {Listable}];
f[x_] := b a x^2;
list = Cases[f[x], _Symbol];
 Sqrt[f[x]^2], _Symbol \[Element] Reals && And @@ Greater[list, 0]]

(*   a b x^2      *)
share|improve this answer
Nice, but could have unpredictable consequences.. – Ranza May 30 '14 at 22:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.