Simplification Rules

Next: Derive Packages Up: A Tour of Previous: Recursion

# Simplification Rules

Derive provides the menu items S`implify`, E`xpand`, and F`actor` to simplify expressions in which special functions like trigonometric functions, logarithm, and exponential occur. Derive is very precise in checking whether transformations of formulae are valid or not on the domain of computation. If necessary, you have to issue the D`eclare` V`ariable` command and restrict the domain of a variable. For functions with simplification rules in two directions such as the rule you also have to specify the direction via the M`anage` menu item. Examples show best what can be achieved.

Let us consider the transformation in both directions. It is only valid when is real or complex and is nonnegative (or with the roles of and interchanged). Derive refuses to do the transformation unless the necessary condition is satisfied. So, let us first issue the D`eclare` V`ariable` command and specify `x` as a nonnegative number. Next, we issue the M`anage` L`ogarithm` command to control the direction of simplification and choose the `Expand` option.

```1:   x :epsilon Real [0,inf)

2:   Logarithm := Expand```
The expression
`3:   LN(x y)`
is now S`implified` to
`4:   LN(x) + LN(y)`
The `Collect` option in the M`anage` L`ogarithm` menu must be chosen to S`implify` in the opposite direction and combine sum of logarithms into the logarithm of a product.
```5:   Logarithm := Collect

6:   LN(x y)```
In order to illustrate that Derive only does those simplifications about which it is sure that the transformations are valid, we enter under the above circumstances the following sum of logarithms.
`7:   LN(x) + LN(y) + LN(z)`
Simplification only partly combines logarithms.
`8:   LN(x y) + LN(z)`
You can get the simplification
`9:   LN(x z) + LN(y)`
by choosing in the M`anage` O`rdering` command the , , order of variables.

Trigonometric simplification is another highlight of Derive. Use the M`anage` T`rigonometry` menu and choose the direction of simplification and the preference of simplification of powers of sines or cosines. The `Auto` option can be chosen when you leave it up to Derive to make a heuristic choice. For example, in the `Auto` mode, Derive simplifies

```           2           2
10:  COS(x)  + 2 SIN(x)```
into
```           2
11:  SIN(x)  + 1```
But if you prefer cosines over sines, you select M`anage` T`rigonometry` `Toward: Cosines` and get
```12:  Trigpower := Cosines

2
13:  2 - COS(x)```
When you enter
`14:  SIN(x + y)`
and select M`anage` T`rigonometry` `Direction: Expand`,
`15:  Trigonometry := Expand`
then simplification yields
`16:  COS(x) SIN(y) + SIN(x) COS(y)`
On its turn, choosing the `Collect` direction, gives back the original expression upon simplification.

Next: Derive Packages Up: A Tour of Previous: Recursion

Andre Heck
Thu Mar 23 17:40:24 MET 1995