# How to specify the domain of a variable?

How can I specify for every expression the domain of a variable without using assumptions everytime i have to simplify it?

AddAssumption[assumption_]:=$Assumptions=DeleteDuplicates[$Assumptions&&assumption]


You need to also check which functions use $Assumptions by default. Simplify, Refine and FullSimplify use it. To reset the assumptions use: $Assumptions=True


Example:

AddAssumption[x>0]
Simplify[Sqrt[x^2]]

Out: x

• So if x must be a real variable for every expression i write how can I do? – ame_math Feb 26 '15 at 17:41
• AddAssumption[Element[x, Reals]] – Giovanni F. Feb 26 '15 at 17:43
• Well, thank you it works very well – ame_math Feb 26 '15 at 17:54