Making Assumptions About Variables

Occasionally, you will need to make assumptions about variables to do certain calculations. For example, consider the following integral.

$\blacktriangleright$ Evaluate

$\dint_{{0}}^{{1}}$nx2n-1dx = ${\dfrac{{1}}{{2}}}$$\lim\limits_{{x\rightarrow 0+}}^{}$$\left(\vphantom{ \left( x^{2}\right)
^{n}+1}\right.$$\left(\vphantom{ x^{2}}\right.$x2$\left.\vphantom{ x^{2}}\right)^{{n}}_{}$ + 1$\left.\vphantom{ \left( x^{2}\right)
^{n}+1}\right)$

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 $\func$assume to restrict possible values of n.

In this section, we discuss three functions

$\displaystyle \func$assume        $\displaystyle \func$additionally        $\displaystyle \func$about

These functions place restraints on specific variables, or provide information on the restraints. The function assume enables you to place a restraint on a variable. The function additionally allows you to place additional restraints; and the function about returns information on the restraints.

$\blacktriangleright$ To compute the integral $\dint_{{0}}^{{1}}$nx2n-1dx

1.
Enter the expression

$\displaystyle \func$assume(n,$\displaystyle \func$positive)


in mathematics mode. (The two terms— $\func$assume and $\func$positive—will automatically turn gray when they are typed.)

2.
With the insertion point in the expression $\func$assume(n,$\func$positive), choose Evaluate.

3.
Place the insertion point in the integral $\int_{{0}}^{{1}}$nx2n-1dx and choose Evaluate.

$\displaystyle \int_{{0}}^{{1}}$nx2n-1dx = $\displaystyle {\frac{{1}}{{2}}}$

Tip    Note that $\func$assume, $\func$about, and $\func$additionally are mathematical functions, so you need to be in mathematics mode when you type these commands.

Evaluation of the expressions $\func$assume(n,$\func$positive) and $\func$additionally(n,$\func$integer), followed by evaluation of the expression $\func$about(n), produces the following output.

$\blacktriangleright$ Evaluate, Evaluate, Evaluate

$\func$assume(n,$\func$positive)

$\func$additionally(n,$\func$integer)

$\func$about(n) : $\func$integer,$\func$RealRange$\left(\vphantom{ 1,\infty }\right.$1,∞$\left.\vphantom{ 1,\infty }\right)$

The following sequence of operations tests the equality Γ(n + 1) = n! under the assumption that n is a positive integer.

$\blacktriangleright$ Evaluate, Evaluate, Check Equality

$\func$assume(n,$\func$positive)

$\func$additionally(n,$\func$integer)

Γ(n + 1) = n! is true


To clear the assumptions about a variable, select the variable and choose Define + Undefine

$\blacktriangleright$ Define + Undefine

n

$\blacktriangleright$ Evaluate

$\func$about(n) : No assumptions