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

Online Help

simplify/constant

simplify constant expressions typically containing radicals and functions with exact numeric arguments

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

simplify(expr, constant)

Parameters

expr

-

expression

constant

-

literal name; constant

Description

• 

The simplify(expr, constant) calling sequence is used to simplify expressions that are of type,constant and typically contain radicals or mathematical functions having exact numeric arguments.

  

The approach used consists of applying a set of simplification procedures (SP) in two steps:

  

1) The constant objects, in the form of sums, products, or function calls, are simplified using SP, starting with the inner most one and composing simplifications at each step. The routines can handle with reasonable efficiency products of fractional powers, exponentials, and various functions calls together with their multiplicative inverses.

  

2) When the resulting expression still contains radicals, the simplification procedure applied to each object in the previous step is applied once more, this time to the whole expression.

• 

The simplification procedures SP used in the itemization above consist of analyzing the Real and Imaginary parts of the expression in order to conclude about possible cancellations or simpler representations. In addition, if the expression or subexpression can be evaluated numerically fast, using hardware floats, this information is used as a starting point to determine an exact rational value for the object, if that value exists.

  

The simplify/constant routines do take assumptions into account up to the point Re, Im, and abs take them.

  

The simplification of constant subexpressions entering input for simplify is performed automatically. However, to invoke this set of simplification routines, call simplify with the extra argument constant.

Examples

(1)

(2)

How it works.

(3)

The following example has a more complex step.

(4)

Here evalc determines that the expression is real but does not perform the full simplification.

(5)

simplify/constant is able to simplify further to obtain 0.

(6)

This example shows that these simple manipulations of the real and imaginary parts are not enough, but the expression is (in this case by construction) equal to a rational number.

(7)

(8)

The following example has nonelementary functions.

(9)

(10)

The following example has powers of trigonometric functions.

(11)

(12)

In cases as the following one (extracted from some integration problems):

(13)

The whole expression cannot be simplified to 0 by means of Re, Im

(14)

It cannot be evaluated using hardware floats.

Error, unsupported type `indexed` in evalhf

Some subexpressions of it can be simplified by properly manipulating these procedures and that suffices to collapse the original problem into something within the scope of these simpler manipulations, here leading to the following.

(15)

The simplification routines for constant expressions is also used by simplify to simplify certain type of constant subexpressions found inside non-constant expressions

(16)

(17)

(18)

See Also

abs

evalhf

Im

Re

simplify

 


Download Help Document