Occasionally, you will need to make assumptions about variables to do certain calculations. For example, consider the following integral.
Evaluate
nx2n-1dx =
x2
+ 1
![]()
The limit on the right exists for n≥ 0, but fails to exist for n < 0.
You can evaluate this limit by applying the function
assume
to restrict possible values of n.
In this section, we discuss three functions
To compute the integral
nx2n-1dx
Tip Note thatassume,
about, and
additionally are mathematical functions, so you need to be in mathematics mode when you type these commands.
Evaluation of the expressions
assume(n,
positive) and
additionally(n,
integer), followed by evaluation of the expression
about(n), produces the following output.
Evaluate, Evaluate, Evaluate
assume(n,
positive)
additionally(n,
integer)
about(n) :
integer,
RealRange
1,∞
![]()
The following sequence of operations tests the equality Γ(n + 1) = n! under the assumption that n is a positive integer.
Evaluate, Evaluate, Check Equality
assume(n,
positive)
additionally(n,
integer)
Γ(n + 1) = n! is true
To clear the assumptions about a variable, select the variable and choose Define + Undefine
Define + Undefine
n
Evaluate
about(n) : No assumptions