0
$\begingroup$

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

$\endgroup$
3
$\begingroup$
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
$\endgroup$
  • $\begingroup$ So if x must be a real variable for every expression i write how can I do? $\endgroup$ – ame_math Feb 26 '15 at 17:41
  • $\begingroup$ AddAssumption[Element[x, Reals]] $\endgroup$ – Giovanni F. Feb 26 '15 at 17:43
  • $\begingroup$ Well, thank you it works very well $\endgroup$ – ame_math Feb 26 '15 at 17:54

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.