Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Previous section-----Next section

1.4.3 Transforming Algebraic Expressions

There are often many different ways to write the same algebraic expression. As one example, the expression  can be written as  . Mathematica provides a large collection of functions for converting between different forms of algebraic expressions.

Expand[expr] multiply out products and powers, writing the result as a sum of terms
Factor[expr] write expr as a product of minimal factors

Two common functions for transforming algebraic expressions.
Expand gives the "expanded form", with products and powers multiplied out.

In[1]:=  Expand[ (1 + x)^2 ]

Out[1]=

Factor recovers the original form.

In[2]:=  Factor[ % ]

Out[2]=

It is easy to generate complicated expressions with Expand.

In[3]:=  Expand[ (1 + x + 3 y)^4 ]

Out[3]=

Factor often gives you simpler expressions.

In[4]:=  Factor[ % ]

Out[4]=

There are some cases, though, where Factor can give you more complicated expressions.

In[5]:=  Factor[ x^10 - 1 ]

Out[5]=

In this case, Expand gives the "simpler" form.

In[6]:=  Expand[ % ]

Out[6]=


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: