# How do you evaluate f(x)=2x^3-x^4+5x^2-x at x=3 using direct substitution and synthetic division?

Jan 10, 2017

$f \left(x\right) = 15$.

#### Explanation:

Direct substitution is probably the easiest to understand. All we're doing is plugging in the $x$-value of $\textcolor{b l u e}{3}$ into $f \left(x\right)$. In other words:
If

$f \left(x\right) = 2 {x}^{3} - {x}^{4} + 5 {x}^{2} - x$

then

$f \left(\textcolor{b l u e}{3}\right) = 2 {\left(\textcolor{b l u e}{3}\right)}^{3} - {\left(\textcolor{b l u e}{3}\right)}^{4} + 5 {\left(\textcolor{b l u e}{3}\right)}^{2} - \textcolor{b l u e}{3}$
$\textcolor{w h i t e}{f \left(3\right)} = 2 \left(27\right) - \text{ "81" "+" "5(9)" } - 3$
$\textcolor{w h i t e}{f \left(3\right)} = 54 - 81 + 45 - 3$
$\textcolor{w h i t e}{f \left(3\right)} = 15$

To use synthetic division, we are going to "factor out" $\left(x - 3\right)$ from $f \left(x\right)$; the remainder of this division will be our answer.

First: arrange the coefficients of the polynomial in decreasing order in an "L" frame, including $0$'s where necessary:

$\text{ "| " -"1" "2" "5" ""-"1" } 0$
"       |"ul("                                      ")

Next, attempt to factor out $\left(x - 3\right)$: add a column, multiply the sum by 3, place the product in the next cell diagonally up; repeat:

$\text{ 3 "| " -"1" "2" "5" ""-"1" } 0$
"       |"ul("         -3    -3     6    15")
"           ""-"1"   ""-"1"     "2"     "5"  |"ul(" "15)

The remainder of $15$ is our value of $f \left(3\right)$.

## Bonus:

I'll admit, I don't remember learning to evaluate polynomials with synthetic division when I was in high school, but I can see why this works. The above synthetic division yields the following "factored" version of $f \left(x\right)$:

$f \left(x\right) = \left(x - 3\right) \left(\text{-} {x}^{3} - {x}^{2} + 2 x + 5 + \frac{15}{x - 3}\right)$

This can be (partially) re-distributed as:

$f \left(x\right) = \left(x - 3\right) \left(\text{-} {x}^{3} - {x}^{2} + 2 x + 5\right) + \frac{15 \left(x - 3\right)}{x - 3}$

$\textcolor{w h i t e}{f \left(x\right)} = \left(x - 3\right) \left(\text{-} {x}^{3} - {x}^{2} + 2 x + 5\right) + 15$

(Cancelling the $\left(x - 3\right)$'s in the last term is okay, because $x = 3$ is in the domain of the original $f \left(x\right)$).

From here, it is easy to see that when $\textcolor{red}{x = 3}$, we get

$f \left(\textcolor{red}{3}\right) = \left(\textcolor{red}{3} - 3\right) \left(\ldots \text{ "..." "..." } \ldots\right) + 15$
$\textcolor{w h i t e}{f \left(3\right)} = \left(\text{ "0" ")(..." "..." "..." } \ldots\right) + 15$
$\textcolor{w h i t e}{f \left(3\right)} = 15$.