Legacy Documentation

Mathematica® Teacher's Edition (2002)

This is documentation for an obsolete product.
Current products and services
 Documentation /  Mathematica Teacher's Edition /  The Teacher's Book /  Basic Calculations /  Algebra /

6.5 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.

In[3]:= 1 / (1 + x) + 1 / (1 - x) + 2 / (1 + x^2)

Out[3]=

Simplify succeeds in getting a simpler form of the expression.

In[4]:= Simplify[%]

Out[4]=

For many simple algebraic calculations, you may find it convenient to use Simplify routinely on your results.
In more complicated calculations, however, you often need to exercise more control over the exact form of answer that you get. In addition, when your expressions are complicated, Simplify may spend a long time testing a large number of possible forms in its attempt to find the simplest one.

Expanding powers.

Mathematica TE does not automatically expand out expressions of the form (a b)^c except when c is an integer. In general it is only correct to do this expansion if a and b are positive reals. Nevertheless, the function PowerExpand does the expansion, effectively assuming that a and b are indeed positive reals.

Mathematica TE does not automatically expand out this expression.

In[5]:= (x y)^r

Out[5]=

PowerExpand does the expansion, effectively assuming that x and y are either zero or positive reals.

In[6]:= PowerExpand[%]

Out[6]=

Mathematica TE does not automatically expand this out either.

In[7]:= Sqrt[x y]

Out[7]=

PowerExpand forces the expansion.

In[8]:= PowerExpand[%]

Out[8]=

The expansion is guaranteed to be correct only if x and y are both nonnegative.

In[9]:= {Sqrt[x y], Sqrt[x] Sqrt[y]} /. {x -> -1, y -> -1}

Out[9]=

Other Mathematica functions related to formula manipulation. (See Section 3.2.)