Detailed 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 : Detailed Information

assuming

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

 

Calling Sequence

Parameters

Basic Information

Description

Examples

Compatibility

Calling Sequence

expression assuming property

expression assuming x1::property1, x2::property2, ...

expression assuming additionally, x1::property1, x2::property2, ...

expression %assuming ...

Parameters

expression

-

valid expression or Maple input to be evaluated

property

-

name: property

x1, x2, ...

-

names; names in or referenced by expression

property1, property2, ...

-

names; property1 is the property assumed on x1, property2 is the property assumed on x2, ...

additionally

-

(optional); computes placing the received assumptions on x1, x2, ... without discarding previous assumptions on these variables

Basic Information

• 

This help page contains complete information about the assuming command. For basic information on the assuming command, see the assuming help page.

Description

• 

The expression assuming property calling sequence evaluates the expression under the assumption property on all names in expression. This is similar to the assume=property option of the simplify command.

• 

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 expression assuming x1::property1, x2::property2, ... calling sequence evaluates the expression under the assumption(s) property1, property2, ... on the name(s) x1, x2, ..., respectively. By default, previously existing assumptions on x1, x2, and so forth, if any, are ignored when computing the result. To override this behavior use the optional argument 'additionally', which can be placed anywhere to the right of assuming - see the Examples section of this help page.

• 

The output is the same as that received by successively doing the following (exceptions noted further below).

  

1. Calling assume (to enter assumptions on names).

  

2. Entering (and so evaluating under the assumptions) the expression depending on these names.

  

3. Removing the assumptions.

  

The use of the assuming routine simplifies the process to one step. Thus, it facilitates experiments concerning the value of the expression under different assumptions.

• 

To perform computations under assumptions, the assuming routine identifies the names that are assumed to have special properties, then replaces them with equivalent names that have these properties. The evaluation uses these new names in the computation, then restores the original names before returning the output. This process ensures that no assumptions are made to the original names in the expression. Therefore, the computations performed using assuming do not affect computations performed before or after calling assuming.

• 

assuming is a left-associative operator with precedence between `, ` and `:=`.

  

Notes: The assuming command does not place assumptions on constants like π, nor on integration or summation dummy variables in definite integrals and sums, nor in limit or product dummy variables, because all these variables already have their domain restricted by the integration, summation or product range or by the method used to compute a limit. To obtain the simplification of the expression being summed, integrated or subject to a product taking into account the restriction on the values of the dummy variable implicit in the integration/summation/product range, use the simplify command -- see the Examples section of this help page.

  

The assuming command does not scan Maple programs regarding the potential presence of assumed variables. To compute taking into account assumptions on variables found in the bodies of programs, use assume -- see the Examples section.

Examples

e1lnexpk1t

e1lnⅇk1t

(1)

e1assumingreal

k1t

(2)

Matrix2,2,e1,1,1,0

lnⅇk1t110

(3)

assumingt::negative,k1::positive

k1t110

(4)

e2lnaxlna+lnx

e2lnaxlna+lnx

(5)

simplifye2assumingx::positive

0

(6)

simplifye2assuminga::positive

ln1x+lnx

(7)

simplifysubsx=x,e2assumingx::posint,a::posint

2Iπ

(8)

e3sink1π2

e3sink1π2

(9)

e3assumingk1::even

0

(10)

e3assumingk1::odd

−1k1212

(11)

e4ax1nn+1nnn1kxn

e4ax1nn+1nnn1kxn

(12)

simplifye4assumingn::integer,0<x

an+1nnn1kn

(13)

The simplify command can be called with assumptions.

simplifye4&comma;assume=n&comma;integer&comma;0<x

an+1nnn1kn

(14)

e5Intexpuxx13&comma;x=0..

e50&ExponentialE;uxx13&DifferentialD;x

(15)

valuee5assuming0u

2π39Γ23u43

(16)

valuee5assumingu<0

(17)

The following is an example of the optional argument 'additionally'.

assumex<1

aboutx

Originally x, renamed x~:
  is assumed to be: RealRange(-infinity,Open(1))

As default behavior, the existing assumption x<1 is disregarded when computing using `assuming` with assumptions on x.

is1x2&comma;positiveassuming1<x

false

(18)

Using 'additionally', −1<x is taken into account in addition to the already existing assumption x<1, leading to:

is1x2&comma;positiveassumingadditionally,1<x

true

(19)

With or without the optional argument 'additionally', any assumptions previously existing on the variables are preserved.

aboutx

Originally x, renamed x~:
  is assumed to be: RealRange(-infinity,Open(1))

odediffyt&comma;t=21t+2abstabs1&comma;t

ode&DifferentialD;&DifferentialD;tyt=2t+2tabs1&comma;t

(20)

Without assumptions, the ODE above is solved in terms of a piecewise function. Assuming t is positive:

odeassumingpositive

&DifferentialD;&DifferentialD;tyt=2t+2t

(21)

Assuming t is positive, the ODE has the following solution.

dsolveodeassumingpositive

yt=t2+2lnt+c__1

(22)

This solution can be tested (see odetest) under assumptions.

odetest&comma;odeassumingpositive

0

(23)

x1x2

x1x~2

(24)

abssqrtx1assumingpositive

x~

(25)

Computing with quoted objects under assuming occurs normally. If quotation marks are placed around x, the information that x1=x2 is ignored.

abssqrtx1assumingpositive

x1

(26)

The assuming command does not place assumptions on integration or summation variables in definite integrals and sums. So, in

expressionInt1+sinht212&comma;t=1..4assumingtinRealRange1&comma;4

expression141+sinht2&DifferentialD;t

(27)

no assumptions are placed on the dummy variable t.

dependsexpression&comma;t

false

(28)

To obtain the simplification of the integrand taking into account that t1&comma;4 use simplify.

simplifyexpression

14cosht&DifferentialD;t

(29)

You can call assuming with assuming as argument (nested computation under different assumptions). In doing so, note assuming is left-associative, so for instance in

simplifysqrtr2s2t2assumingrealassuming0<r,0<s

rst

(30)

first simplify(sqrt(r^2*s^2*t^2)) assuming real is computed then the result evaluated assuming 0<r,0<s.

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

(31)

value

a

(32)

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

(33)

value

0

(34)

The assuming command does not scan programs regarding the presence of assumed variables; for that purpose use assume. Consider

fxsqrta2+x

fxa2+x

(35)

The variable a is inside the body of f; the assumption that 0<a is not effectively used when computing f1.

f1assuming0<a

a2+1

(36)

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

(37)

f1assuming0<a

a+1

(38)

Alternatively,

Physics:-SetupassumingusesAssume=false

assumingusesAssume=false

(39)

f1assuming0<a

a2+1

(40)

assume0<a

f1

a~+1

(41)

Compatibility

• 

The assuming command was updated in Maple 2017.

See Also

about

abs

assume

assuming

diff

dsolve

Int

irem

limit

ln

Maple initialization file

odetest

operators/precedence

Physics[Assume]

Physics[Setup]

proc

simplify

sin

sqrt

type

value