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

Online Help

All Products    Maple    MapleSim


Physics[Assume] - place assumptions without redefining the variables receiving assumptions - suitable for working with the Physics, VectorCalculus, DifferentialGeometry and MathematicalFunctions packages

Physics[Vectors][Assume] - synonym of Physics[Assume]

Calling Sequence

Assume(assumption1, assumption2, ...)

Assume(additionally, assumption1, ...)

Assume(clear = {x1, x2})

Parameters

assumption

-

assumption on variables x1, ..., expressed as boolean structures constructed using the boolean functions And, Or or Not, or the corresponding boolean operators and, or, not; they can be arbitrarily nested

additionally

-

the keyword additionally, to place assumptions on variables in addition to previously existing assumptions on the same variables

x1, x2, ...

-

names or functions, the variables receiving assumptions

Description

• 

In almost any mathematical formulation in Physics or when working with MathematicalFunctions, there are variables that are real, positive, or represent angles that have a restricted range. For example: Planck's constant, time, the mass and position of particles, spherical coordinates, the domain of some special function parameters, etc. One typically perform algebraic computations with these variables, and at some point wants to place assumptions on them, because the results appear somewhat unsimplified, under the generic assumption that every name represents a complex variable defined over the whole complex plane.

• 

Assume is a command for placing these assumptions on variables and is the preferred command for this purpose when working with the Physics and MathematicalFunctions packages. Assume also includes the functionality of the additionally command. All the assumptions placed using Assume are taken into account by the commands coulditbe, is, getassumptions and assuming (with option additionally), and through them by the whole Maple library, in exactly the same way they are taken into account when placed using assume.

• 

To understand the motivation for Assume note that when placing assumptions using the assume command, expressions entered before placing the assumptions cannot be reused and results involving assumed variables, obtained after placing the assumptions, cannot be reused in case the assumptions are removed, or more or different assumptions are placed on the same variables. This is so because assume redefines the variables receiving assumptions each time you place assumptions on them.

  

These restrictions do not exist when placing assumptions with Assume, because it does not redefine the variables receiving assumptions - it only places the assumptions - and in that way allows for reusing expressions entered before placing assumptions, or reusing results that involve assumed variables after removing or changing the assumptions to something more precise/appropriate. This is a typical situation when working on Physics problems or performing algebraic exploration with mathematical functions.

  

More important, when using assume, because the variables receiving assumptions get redefined, geometrical coordinates (spacetime, Cartesian, cylindrical and spherical) loss their identity and are not recognized anymore by the Physics package commands or those from the VectorCalculus package. This is not an issue when placing assumptions with Assume because it does not redefine the variables, they remain the same, before, during and after removing the assumptions placed, in some way implementing the concept of an assuming command of extended action.

Examples

withPhysics:

Setupmathematicalnotation=true

mathematicalnotation=true

(1)

To understand what Assume does it is necessary to concisely review what assume does and focus the difference. Consider a generic variable x. Nothing is known about it

aboutx

x:
  nothing known about this object

Each variable has associated a number that depends on the session, and the computer (internally) uses this number to refer to the variable:

addressofx

36893628512123923548

(2)

When using the assume command to place assumptions on a variable, this number, associated to it, changes, for example:

assume0<xandx<12π

addressofx

36893628512000574044

(3)

Indeed, the variable x got redefined and renamed, it is not anymore the variable x referenced in (2):

aboutx

Originally x, renamed x~:
  is assumed to be: RealRange(Open(0),Open(1/2*Pi))

To undo assumptions placed using the assume command one reassigns the variable x to itself:

xx

xx

(4)

Check the numerical address: it is again equal to (2):

addressofx

36893628512123923548

(5)

The key observation here is that variables that receive assumptions using assume get redefined each time you place assumptions on them. Although this redefinition of variables is convenient in some contexts, it also means two things:

1. 

All the equations/expressions, entered before placing the assumptions on x using assume, involve a variable x that is different than the one that exists after placing the assumptions. So, these previous expressions cannot be reused, because they involve a different variable.

2. 

Because, after placing the assumptions using assume, x refers to a different variable, programs that depend on the x that existed before placing the assumptions (e.g. the spacetime metric g_, general relativity tensors, Physics:-Vectors and VectorCalculus commands) do not recognize the new x redefined by assume.

To addressed these issues, Assume places the assumptions without redefining the variables, and allows for placing assumptions in addition to previously placed assumptions also without redefining the variables. For example, before placing assumptions this simplification attempt accomplishes nothing:

simplifyarccoscosx

arccoscosx

(6)

Let's assume now that 0<x<π2

Assume0<xandx<12π

x::0&comma;π2

(7)

For convenience, the Assume command also echoes the assumptions you place. Now, the address of x is still the same as in (2) before placing the assumption

addressofx

36893628512123923548

(8)

So the variable did not get redefined. The system however knows about the assumption - Assume uses all the machinery of the assume command:

aboutx

Originally x, renamed x:
  is assumed to be: RealRange(Open(0),Open(1/2*Pi))

Hence, expressions entered before placing assumptions can be reused. For example, you can reuse (6), we now have

simplify

x

(9)

To clear the assumptions on x, you can use Assume(x = x), or Assume(clear = {x, ..}) in the case of many variables being cleared in one go or, in the case of a single variable being cleared, also

Assumeclear=x

(10)

aboutx

x:
  nothing known about this object

In summary, the Assume implements the concept of an assuming of extended action, where assumptions can be turned ON and OFF at any moment without changing the variables involved.

Assume includes the functionality of the additionally command, also without redefining the variables receiving additional assumptions. For that purpose add the keyword additionally anywhere in the calling sequence. For example:

Assumex::positive

x::0&comma;

(11)

aboutx

Originally x, renamed x:
  is assumed to be: RealRange(Open(0),infinity)

Assumeadditionally&comma;x<1

x::0&comma;1

(12)

aboutx

Originally x, renamed x:
  is assumed to be: RealRange(Open(0),Open(1))

The variable x always refer to the same object, itself, the same as in (2) before placing any assumption

addressofx

36893628512123923548

(13)

See Also

about, additionally, assume, assuming, MathematicalFunctions, Physics, Physics conventions, Physics examples, Physics Updates, Tensors - a complete guide, Mini-Course Computer Algebra for Physicists, Setup