Basic Information - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Evaluation : assume : assuming : Basic Information

assuming

compute the value of an expression under assumptions, or represent that computation using the inert form '%assuming'

 

Calling Sequence

Parameters

Description

Examples

Details

Compatibility

Calling Sequence

expression assuming property

expression %assuming property

Parameters

expression

-

expression or input to be evaluated

property

-

name; property

Description

• 

The expression assuming property calling sequence evaluates the expression under the assumption property on all names in expression.

• 

The expression %assuming property is the inert form of assuming and returns unevaluated, with the expression and the related assumptions encapsulated within the %assuming structure. This permits, for instance, to compute with different conditions on the same variable or expression, all appearing within the same worksheet, each of them represented by %assuming structures with different conditions. All of is, coulditbe, simplify, diff and int commands know about these %assuming structures, that can be activated when desired using the value command.

• 

The property parameter can be a type, inequation, or other property to be assumed on a name or expression involving names.

  

Note: Computations performed using assuming do not affect computations performed before or after calling assuming.

  

An assuming clause can be included in the condition of an if, elif, while, or until clause. In the latter case, to avoid a syntactic ambiguity, the entire condition, including the assuming clause, must be enclosed in parentheses.

Examples

Find the square root of a2 under the assumption that a is a positive, real constant.

sqrta2assuming0<a

a

(1)

sqrta2

a2

(2)

You can determine the value of an expression under the assumption that all its variables are real.

e1lnexpk1t

e1ln&ExponentialE;k1t

(3)

e1assumingreal

k1t

(4)

Using the assuming command does not update e1.

e1

ln&ExponentialE;k1t

(5)

The assumptions are valid only during the computation of one input statement, and no assumptions are placed on the variables.

e2lnyxlny+lnx

e2lnyxlny+lnx

(6)

simplifye2assumingx::positive

0

(7)

simplifye2assumingy::positive

ln1x+lnx

(8)

simplifysubsx=x&comma;e2assumingx::posint,y::posint

2Iπ

(9)

aboutx&colon;

x:
  nothing known about this object

abouty

y:
  nothing known about this object

Using the value command, you can evaluate an inert integral. This evaluation can be performed under assumptions.

e3Intexpuxx13&comma;x=0..

e30&ExponentialE;uxx13&DifferentialD;x

(10)

valuee3assuming0u

2π39Γ23u43

(11)

valuee3assumingu<0

(12)

It is sometimes useful to place an assumption on a variable or expression, encapsulated, independent of the rest of the computations on the worksheet. One example of that is when the value of expressions depend on where are some variables being evaluated. For this purpose you can use the inert form %assuming. For example,

%assumingsqrt`^`a&comma;2&comma;`<`0&comma;a

a2assuming0<a

(13)

value

a

(14)

When using %assuming attention should be given to the order of precedence of operations: assuming and %assuming have higher precedence than the arithmetic operators.

%assumingsqrt`^`a&comma;2&comma;`<`0&comma;a+%assumingsqrt`^`a&comma;2&comma;`<`a&comma;0

a2assuming0<a+a2assuminga<0

(15)

value

0

(16)

The variable a is inside the body of f; the assumption that a > 0 is not effectively used when computing f(1).

fxsqrta2+x

fxa2+x

(17)

f1assuming0<a

a2+1

(18)

For these purposes, you can use the Physics:-Setup command with its assuminguseseAssume keyword, or use assume itself. For example

Physics:-SetupassumingusesAssume=true

assumingusesAssume=true

(19)

f1assuming0<a

a+1

(20)

Alternatively,

Physics:-SetupassumingusesAssume=false

assumingusesAssume=false

(21)

f1assuming0<a

a2+1

(22)

assume0<a

f1

a~+1

(23)

Details

  

For detailed information including:

• 

How to evaluate expressions under assumptions applied to specific variables

• 

Detailed information on how the assuming command computes under assumptions

• 

How to use the assuming command in conjunction with the assume command

  

see the assuming/details help page.

Compatibility

• 

The assuming command was updated in Maple 2017.

See Also

assume

Physics[Assume]

Physics[Setup]

type

value