%Factoring Expressions and Solving Equations (Sample Solution)
%Math263A
\documentclass[12pt]{article}
\usepackage{times}
\pagestyle{empty}
\addtolength{\textwidth}{1.2in}
\addtolength{\textheight}{1.2in}
\addtolength{\oddsidemargin}{-.58in}
\addtolength{\evensidemargin}{-.58in}
\renewcommand{\baselinestretch}{1.0}
\parindent = 0cm
\parskip = .1cm
\begin{document}
\begin{center}
{\Large
Factoring Expressions and Solving Equations\footnote{
Copyright \copyright 2002 Todd Young.
All rights reserved. Please address comments to young@math.ohiou.edu.}}
\end{center}
\textbf{Sample Solution}
\begin{enumerate}
\item The command \verb& clear & clears all variables.
The command \verb& syms x & declares \verb$ x $ to be a symbolic
variable.
The command \verb& expr1 = (x-1)*(x-2)*(x-3)*(x-4)*(x-5) & gives the
label \textsf{expr1} to the expression $(x-1)(x-2)(x-3)(x-4)(x-5)$.
The command \textsf{expand} is used to expand or multiply out an
expression. Expanding \textsf{expr1} yields
$$
x^5 - 15x^4 + 85x^3 - 225x^2 + 274x - 120
$$
The command \verb& factor & is used to factor an expression. Here we
factor the expression that results from expanding \verb&expr1&.
Thereby, we recover \textsf{expr1}, which is what one would expect.
Solving $expr2 = 0$ gives $x = 1, 2, 3, 4, 5$.
The relationship between solving and factoring is as follows: \\
Let $p(x)$ be any polynomial.
$x = x_0$ is a solution of $p(x) = 0$ if and only if
$x - x_0$ is a factor of $p(x)$.
\item \textsc{MatLab} is not able to factor
$x^4 + 3x^3 + 3x^2 + x + 3$.
\textsc{MatLab} \emph{is} able to solve
$x^4 + 3x^3 + 3x^2 + x + 3 = 0$ symbolically; however, the solutions it
gives are extremely long and complicated.
The command \verb& double(ans)& numerically evaluates \verb&ans&, in
this case the symbolic solutions to
$x^4 + 3x^3 + 3x^2 + x + 3 = 0$.
(Note. \verb&double(ans)& does not mean \verb$2 * ans$;
\verb&double& is short for double precision.) The numerical solutions we obtain
are
$$
x = 0.2289 \pm 0.8595i, -1.7289 \pm 0.8959i
$$
One reason an exact, symbolic solution may not be as useful as an approximation
is that when we measure things we usually use decimals or very simple
fractions.
\item Solving $expr3 - 3$ gives $x = 0, -1, -1, -1$.
The reason the answer is so nice is that $expr3 - 3$ is
$x^4 + 3x^3 + 3x^2 + x = x(x^3 + 3x^2 + 3x + 1) = x(x + 1)^3$.
\item \textsc{MatLab} is unable to factor $expr4$ or to solve
$expr4 = 0$, symbolically. \textsc{MatLab} gives the numerical
solutions (to four decimal places)
\[
x = 0.9615, 2.2093, 2.7342, 4.1510, 4.9541
\]
None of the algorithms \textsc{MatLab} uses to obtain symbolic solutions
to polynomial equations work for this equation, so \textsc{MatLab}
provides an approximate numerical solution.
It is known from higher mathematics that, for polynomial equations of
degree five or higher, a symbolic solution is not
always possible.
\end{enumerate}
\end{document}