1
$\begingroup$

I read a lot of old posts but still couldn't make it work. Hope someone could help me out. I am trying to simplify a square root expression with an assumption that all variables are positive reals. However, why the result sitll has Abssymbol?

vars = {Ao, C1, p, R}; 
$Assumptions = {vars > 0, Element[vars, Reals]}; 
FullSimplify[Sqrt[(1 + (1 + Ao)*C1*p*R)^2]]
$Assumptions = True; 

Output:

Abs[1 + (1 + Ao)*C1*p*R]

Expected output:

1 + (1 + Ao)*C1*p*R
$\endgroup$
2
  • 4
    $\begingroup$ $Assumptions = Flatten@{Thread[vars > 0], Element[vars, Reals]} $\endgroup$
    – Kuba
    Mar 22, 2018 at 11:09
  • 5
    $\begingroup$ Note that the assumptions mechanism is smart enough to know that if you're using inequality relations, the variables are already assumed real. Thus: Assuming[Thread[{Ao, C1, p, R} > 0], FullSimplify[Sqrt[(1 + (1 + Ao)*C1*p*R)^2]]] $\endgroup$ Mar 22, 2018 at 11:18

1 Answer 1

4
$\begingroup$

Try to rewrite the $Assumptions in the following form

vars = {Ao, C1, p, R};
$Assumptions = And @@ Thread[vars > 0] && Element[vars, Reals];
FullSimplify[Sqrt[(1 + (1 + Ao)*C1*p*R)^2]]
$Assumptions = True;

Output (as expected):

1 + (1 + Ao) C1 p R
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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