simplify - Maple Programming Help

Home : Support : Online Help : Mathematics : Algebra : Expression Manipulation : Simplifying : simplify : simplify/details

simplify

apply simplification rules to an expression

 Calling Sequence simplify(expr, n1, n2, ..., opt) simplify(expr, side1, side2, ..., opt) simplify(expr, assume=prop, opt) simplify(expr, size, evaluate_known_functions = eval_boolean) simplify(expr, symbolic, opt)

Parameters

 expr - any expression n1, n2, ... - (optional) names; simplification procedures side1, side2, ... - (optional) sets or lists; side relations prop - (optional) any property evaluate_known_functions = eval_boolean - (optional) equation; left-hand side is the literal evaluate_known_functions and the right-hand side eval_boolean is true or false opt - (optional) size=false; disable simplification of expression size

Basic Information

 • This help page contains complete information about the simplify command. For basic information on the simplify command, see the simplify help page.

Description

 • The simplify command is used to apply simplification rules to an expression.
 • The simplify/expr calling sequence searches the expression, expr, for function calls, square roots, radicals, and powers. It then invokes the appropriate simplification procedures.

Options

Simplification procedures

 n1, n2, ...
 Invokes only the simplification procedures specified by the additional names.
 Further information on the simplification procedures supported is available in the help pages simplify/name where name is one of:

 You can extend the simplify function by defining a Maple procedure. If the procedure simplify/f is defined, then the function call simplify(a,f) invokes simplify/f(a).

Side relations

 side1, side2,...
 Performs simplification with respect to the side relations. For details, see simplify/siderels.

The assume option

 assume=prop
 When the last argument is assume=prop, all the indeterminates in expr are assumed to have the property prop when computing the simplified expression. This option is not necessary to simplify integrands and summands in definite integrals and sums taking into account the integration/summation range. For details, see the following Examples section.

Simplification with respect to size

 size
 There are two special calling sequences related to simplifying with respect to size: one involving the named option evaluate_known_functions, which controls whether known mathematical functions are re-evaluated after simplification, and one specifically disabling this simplification. They are discussed in greater detail on the simplify/size help page.

The symbolic option

 symbolic
 Specifies that formal symbolic manipulation of expressions is allowed without regard to the analytical issue of branches for multi-valued functions. For example, the expression sqrt(x^2) simplifies to x under the symbolic option. Without this option, the simplified result must take into account the different possible values of the (complex) sign of x.
 Note: When the symbolic option is specified, any branch of a multi-valued function can be chosen during the simplification process. The result of such an operation is in general not valid over the whole complex plane and can lead to incorrect results if you assume the expressions represent analytical functions.

Examples

Simple Example

 > $\mathrm{simplify}\left({4}^{\frac{1}{2}}+3\right)$
 ${5}$ (1)

Simplifying Trigonometric Expressions

 > $e≔{\mathrm{cos}\left(x\right)}^{5}+{\mathrm{sin}\left(x\right)}^{4}+2{\mathrm{cos}\left(x\right)}^{2}-2{\mathrm{sin}\left(x\right)}^{2}-\mathrm{cos}\left(2x\right):$
 > $\mathrm{simplify}\left(e\right)$
 ${{\mathrm{cos}}{}\left({x}\right)}^{{4}}{}\left({\mathrm{cos}}{}\left({x}\right){+}{1}\right)$ (2)

Simplifying Exponentials and Logarithms

 > $\mathrm{simplify}\left({ⅇ}^{a+\mathrm{ln}\left(b{ⅇ}^{c}\right)}\right)$
 ${b}{}{{ⅇ}}^{{a}{+}{c}}$ (3)

Controlling Simplification Rules

 > $\mathrm{simplify}\left({\mathrm{sin}\left(x\right)}^{2}+\mathrm{ln}\left(2x\right)+{\mathrm{cos}\left(x\right)}^{2}\right)$
 ${1}{+}{\mathrm{ln}}{}\left({2}\right){+}{\mathrm{ln}}{}\left({x}\right)$ (4)
 > $\mathrm{simplify}\left({\mathrm{sin}\left(x\right)}^{2}+\mathrm{ln}\left(2x\right)+{\mathrm{cos}\left(x\right)}^{2},\mathrm{trig}\right)$
 ${1}{+}{\mathrm{ln}}{}\left({2}{}{x}\right)$ (5)
 > $\mathrm{simplify}\left({\mathrm{sin}\left(x\right)}^{2}+\mathrm{ln}\left(2x\right)+{\mathrm{cos}\left(x\right)}^{2},\mathrm{ln}\right)$
 ${{\mathrm{sin}}{}\left({x}\right)}^{{2}}{+}{\mathrm{ln}}{}\left({2}\right){+}{\mathrm{ln}}{}\left({x}\right){+}{{\mathrm{cos}}{}\left({x}\right)}^{{2}}$ (6)

Simplifying with Respect to Side Relations

 > $f≔-\frac{1{x}^{5}y}{3}+{x}^{4}{y}^{2}+\frac{1x{y}^{3}}{3}+1:$
 > $\mathrm{simplify}\left(f,\left\{{x}^{3}=xy,{y}^{2}=x+1\right\}\right)$
 ${{x}}^{{4}}{+}{{x}}^{{2}}{+}{x}{+}{1}$ (7)

Using the assume Option

 > $g≔\sqrt{{x}^{2}}$
 ${g}{≔}\sqrt{{{x}}^{{2}}}$ (8)
 > $\mathrm{simplify}\left(g\right)$
 ${\mathrm{csgn}}{}\left({x}\right){}{x}$ (9)
 > $\mathrm{simplify}\left(g,\mathrm{assume}=\mathrm{real}\right)$
 $\left|{x}\right|$ (10)
 > $\mathrm{simplify}\left(g,\mathrm{assume}=\mathrm{positive}\right)$
 ${x}$ (11)
 > $\mathrm{simplify}\left(g,\mathrm{symbolic}\right)$
 ${x}$ (12)

Simplifying an Integral

 Integrands and summands are simplified taking into account the integration or sum ranges respectively. For more information, see assuming.
 > $\mathrm{expr}≔{{∫}}_{1}^{4}{\left(1+{\mathrm{sinh}\left(t\right)}^{2}\right)}^{\frac{1}{2}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}t$
 ${\mathrm{expr}}{≔}{{\int }}_{{1}}^{{4}}\sqrt{{1}{+}{{\mathrm{sinh}}{}\left({t}\right)}^{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}$ (13)
 > $\mathrm{simplify}\left(\mathrm{expr}\right)$
 ${{\int }}_{{1}}^{{4}}{\mathrm{cosh}}{}\left({t}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}$ (14)