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
    $\begingroup$ $Assumptions = Flatten@{Thread[vars > 0], Element[vars, Reals]} $\endgroup$ – Kuba Mar 22 '18 at 11:09
  • 3
    $\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$ – J. M.'s technical difficulties Mar 22 '18 at 11:18
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
| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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