Symbolics > Symbolic Evaluation > Making Assumptions about Variables
Making Assumptions about Variables
Use the keyword assume and one or more modifying expressions to make assumptions about the domain of a variable in a symbolic expression, such as restricting it to be a real number. The types of modifying expressions you can insert after assume follow:
Modifying Expression
Assumption
x=real
x is a real number.
x=complex
x is a complex number
x=integer
x is an integer.
x>a
x is a real number greater than a.
x≥a
x is a real number greater than or equal to a.
x<b
x is a real number less than b.
x≤b
x is a real number less than or equal to b.
x=RealRange(a, b)
x is a real number in the range a<x<b, where a<b.
n=even
n is an even integer.
n=odd
n is an odd integer.
Use the Boolean equal operator to specify the equalities in the preceding list.
The following rules apply for variables:
If you insert assume after another keyword, the assumption on the variables applies to the operation performed by the first keyword.
The keyword assume does not make an assignment or substitution. Use a variable definition or the keyword substitute for this purpose.
To exclude or substitute numerically defined variables, use the keyword explicit. The keyword assume merely constrains the region over which PTC Mathcad finds a result, and is primarily useful for simplification and symbolic integration.
By default, all variables in Mathcad are real. Use the complex modifier to indicate that a variable is complex:
Mathcad assumes that only the variable t outside the function is complex.
Use the All modifier to indicate that all t variables, including the one inside the function, are complex:
Examples
To restrict the domain of x to real numbers use this expression:
To restrict the domain of x to complex numbers use this expression:
To restrict the domain of more than one variable in the expression, insert a comma-separated list of modifying expressions after the assume keyword:
To restrict the domain of all variables in the expression, insert the modifier ALL in the modifying expression:
Was this helpful?