compute the value of an expression under assumptions - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Evaluation : assume : assuming : assuming/details

assuming - compute the value of an expression under assumptions

Calling Sequence

expression assuming property

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

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

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 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 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

e1:=lnⅇk1t

e1:=lnⅇk1t

(1)

e1assumingreal

k1t

(2)

Matrix2,2,e1,1,1,0

lnⅇk1t110

(3)

assumingt::negative,k1::positive

k1t110

(4)

e2:=lnaxlna+lnx

e2:=lnaxlna+lnx

(5)

simplifye2assumingx::positive

0

(6)

simplifye2assuminga::positive

ln1x+lnx

(7)

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

2Iπ

(8)

e3:=sink1π2

e3:=sin12k1π

(9)

e3assumingk1::even

0

(10)

e3assumingk1::odd

112k112

(11)

e4:=ax1nn+1nnn1kxn

e4:=ax1nn+1nnn1kxn

(12)

simplifye4assumingn::integer&comma;0<x

an&plus;1nnn1kn

(13)

The simplify command can be called with assumptions.

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

an&plus;1nnn1kn

(14)

e5:=&int;0&infin;&ExponentialE;uxx13&DifferentialD;x

e5:=&int;0&infin;&ExponentialE;uxx1&sol;3&DifferentialD;x

(15)

valuee5assuming0u

29&pi;3&Gamma;23u4&sol;3

(16)

valuee5assumingu<0

&infin;

(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&comma;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))

ode:=&DifferentialD;&DifferentialD;tyt&equals;21t&plus;2tabs1&comma;t

ode:=&DifferentialD;&DifferentialD;tyt&equals;2t&plus;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&equals;2t&plus;2t

(21)

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

dsolveodeassumingpositive

yt&equals;t2&plus;2lnt&plus;_C1

(22)

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

odetest&comma;odeassumingpositive

0

(23)

x1:=x2

x1:=x~2

(24)

x1assumingpositive

x~

(25)

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

&apos;x1&apos;assumingpositive

x1

(26)

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

expression:=&int;141&plus;sinht212&DifferentialD;tassumingt&in;RealRange1&comma;4

expression:=&int;141&plus;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 tRealRange1&comma;4 use simplify.

simplifyexpression

&int;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

simplifyr2s2t2assumingrealassuming0<r&comma;0<s

rst

(30)

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

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

f := proc(x) sqrt(a^2)+x end proc;    # a Maple procedure (program)

f:=procxsqrta&Hat;2&plus;xend proc

(31)

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

f1assuming0<a

a2&plus;1

(32)

For these purposes, use assume.

assume0<a

f1

a~&plus;1

(33)

See Also

about, abs, assume, assuming, diff, dsolve, Int, irem, limit, ln, Maple initialization file, odetest, operators/precedence, Physics[Assume], proc, simplify, sin, sqrt, type, value


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam