Automatic evaluation and transformations can sometimes be inconvenient: They act in only one direction and the result can be overly complicated. For example, almost everybody prefers using instead of the more complicated . Mathematica provides automatic transformation of the second expression into the first one. But compact expressions like should not be automatically expanded into more complicated . For these purposes Mathematica has special commands. Some are demonstrated in the next section.
The function TrigExpand expands out trigonometric and hyperbolic functions. In more detail, it splits up sums and integer multiples that appear in the arguments of trigonometric and hyperbolic functions, and then expands out the products of trigonometric and hyperbolic functions into sums of powers, using trigonometric and hyperbolic identities where possible. Here are some examples.
The function TrigFactor factors trigonometric and hyperbolic functions. In more detail, it splits up sums and integer multiples that appear in the arguments of trigonometric and hyperbolic functions, and then factors the resulting polynomials into trigonometric and hyperbolic functions, using trigonometric and hyperbolic identities where possible. Here are some examples.
The function TrigReduce rewrites the products and powers of trigonometric and hyperbolic functions in terms of trigonometric and hyperbolic functions with combined arguments. In more detail, it typically yields a linear expression involving trigonometric and hyperbolic functions with more complicated arguments. TrigReduce is approximately inverse to TrigExpand and TrigFactor. Here are some examples.
The function TrigToExp converts trigonometric and hyperbolic functions to exponentials. It tries, where possible, to give results that do not involve explicit complex numbers. Here are some examples.
The function ExpToTrig converts exponentials to trigonometric and hyperbolic functions. It is approximately inverse to TrigToExp. Here are some examples.
The function ComplexExpand expands expressions assuming that all the variables are real. The value option TargetFunctions is a list of functions from the set {Re, Im, Abs, Arg, Conjugate, Sign}. ComplexExpand tries to give results in terms of the functions specified. Here are some examples.
The function Simplify performs a sequence of algebraic transformations on its argument, and returns the simplest form it finds. Here are some examples.
Here is a large collection of identities involving hyperbolic functions. All are written as one large logical conjunction.
The function Simplify has the Assumption option. For example, Mathematica knows that for all real , and knows about the periodicity of hyperbolic functions for the symbolic integer coefficient of .
Mathematica also knows that the composition of the inverse and direct hyperbolic sine produces the value of the inner argument under the corresponding restriction.
While the hyperbolic sine function auto‐evaluates for simple fractions of , for more complicated cases it stays as a hyperbolic sine function to avoid the build up of large expressions. Using the function FunctionExpand, the hyperbolic sine function can sometimes be transformed into explicit radicals. Here are some examples.
If the denominator contains squares of integers other than 2, the results always contain complex numbers deeply inside of expression (meaning that the imaginary number appears unavoidably).
Here the function RootReduce is used to express the previous algebraic numbers as the roots of polynomial equations.
The function FunctionExpand also reduces hyperbolic expressions with compound arguments or compositions, including inverse hyperbolic functions, to simpler ones. Here are some examples.
Applying Simplify to the last expression gives a more compact result.
The function FullSimplify tries a wider range of transformations than Simplify and returns the simplest form it finds. Here are some examples that contrast the results of applying the functions Simplify and FullSimplify to the same expressions.
|