The Student's Introduction to MATHEMATICA: A Handbook for Precalculus, Calculus, and Linear Algebra

A polynomial in the variable x is a function of the form:
where the coefficients a 0, a 1, , a n are real numbers. Polynomials may be expressed in expanded or in factored form. Without a computer algebra system, moving from one form to the other is a tedious and often difficult process. With Mathematica, it is quite easy; the commands needed to transform a polynomial are called Expand and Factor.
In[1]:= <b class="bold">Clear[f, x];</b><b class="bold"> f[x_] := 12 <span class="unicode">?</span> 3x <span class="unicode">?</span> 12x</b><sup<b class="bold">3 </b></sup><b class="bold">+ 3x</b><sup<b class="bold">4</b></sup> In[3]:= <b class="bold">Plot[f[x], {x, <span class="unicode">?</span>2, 5}]</b><span class="inlinemediaobject"><a NAME="IMG_299"> href="portalcontent.asp?bkid=31099&image_src=https://images.books24x7.com/bookimages/id_31099/fig159%5F01%5F0%2Ejpg&image_id=299&previd=IMG_299"> target="_parent"><img alt="Image from book"> border="0"> height="150"> id="IMG_299"> src="https://images.books24x7.com/bookimages/id_31099/fig159_01.jpg"> title="Click To expand"> width="290"></a></span> Here we see the graph of a polynomial that appears to have roots at x = 1 and x = 4 (that is, the function appears to assume the value 0 when x = 1 and x = 4). We can confirm this by factoring the polynomial:
In[4]:= <b class="bold">Factor[f[x]]</b>Out[4]= 3(<span class="unicode">?</span>4 + x)(<span class="unicode">?</span>1 + x)(1 + x + x<sup2</sup>)
Observe that when x assumes the value 4, the linear factor ( ?4 + x) is zero, making the entire product equal to zero. Similarly, if x = 1, the linear factor ( ?