>
|
|
| (1) |
>
|
|
How it works.
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.
>
|
|
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) |
>
|
|
The following example has nonelementary functions.
>
|
|
| (9) |
>
|
|
The following example has powers of trigonometric functions.
>
|
|
| (11) |
>
|
|
In cases as the following one (extracted from some integration problems):
>
|
|
| (13) |
The whole expression cannot be simplified by means of Re, Im
| (14) |
It cannot be evaluated using hardware floats.
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.
>
|
|
The simplification routines for constant expressions is also used by simplify to simplify certain type of constant subexpressions found inside non-constant expressions
>
|
|
| (16) |