This is documentation for Mathematica 4, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
Wolfram Research, Inc.

Transforming Algebraic ExpressionsAdvanced Topic: Putting Expressions into Different Forms

1.4.4 Simplifying Algebraic Expressions

There are many situations where you want to write a particular algebraic expression in the simplest possible form. Although it is difficult to know exactly what one means in all cases by the "simplest form", a worthwhile practical procedure is to look at many different forms of an expression, and pick out the one that involves the smallest number of parts.

Simplifying algebraic expressions.

Simplify writes in factored form.

In[1]:= Simplify[x^2 + 2x + 1]

Out[1]=

Simplify leaves in expanded form, since for this expression, the factored form is larger.

In[2]:= Simplify[x^10 - 1]

Out[2]=

You can often use Simplify to "clean up" complicated expressions that you get as the results of computations.

Here is the integral of . Integrals are discussed in more detail in Section 1.5.3.

In[3]:= Integrate[1/(x^4-1), x]

Out[3]=

Differentiating the result from Integrate should give back your original expression. In this case, as is common, you get a more complicated version of the expression.

In[4]:= D[%, x]

Out[4]=

Simplify succeeds in getting back the original, more simple, form of the expression.

In[5]:= Simplify[%]

Out[5]=

Simplify is set up to try various standard algebraic transformations on the expressions you give. Sometimes, however, it can take more sophisticated transformations to make progress in finding the simplest form of an expression.

FullSimplify tries a much wider range of transformations, involving not only algebraic functions, but also many other kinds of functions.

Simplify does nothing to this expression.

In[6]:= Simplify[Gamma[x] Gamma[1 - x]]

Out[6]=

FullSimplify, however, transforms it to a simpler form.

In[7]:= FullSimplify[Gamma[x] Gamma[1 - x]]

Out[7]=

For fairly small expressions, FullSimplify will often succeed in making some remarkable simplifications. But for larger expressions, it often becomes unmanageably slow.

The reason for this is that to do its job, FullSimplify effectively has to try combining every part of an expression with every other, and for large expressions the number of cases that it has to consider can be astronomically large.

Simplify also has a difficult task to do, but it is set up to avoid some of the most time-consuming transformations that are tried by FullSimplify. For simple algebraic calculations, therefore, you may often find it convenient to apply Simplify quite routinely to your results.

In more complicated calculations, however, even Simplify, let alone FullSimplify, may end up needing to try a very large number of different forms, and therefore taking a long time. In such cases, you typically need to do more controlled simplification, and use your knowledge of the form you want to get to guide the process.

Transforming Algebraic ExpressionsAdvanced Topic: Putting Expressions into Different Forms