3.2.4: Evaluating Algebraic Expressions

Learning Outcomes

  • Evaluate algebraic expressions using the order of operations

 Evaluating Algebraic Expressions

Any variable in an algebraic expression may take on or be assigned different values. When that happens, the value of the algebraic expression changes. To evaluate an algebraic expression means to determine the value of the expression for a given value of each variable in the expression. Replace each variable in the expression with the given value then simplify the resulting expression using the order of operations. If the algebraic expression contains more than one variable, replace each variable with its assigned value and simplify the expression as before. In the next example we show how to substitute various types of numbers into a mathematical expression.

example

Evaluate [latex]x+7[/latex] when

  1. [latex]x=3[/latex]
  2. [latex]x=-12[/latex]

Solution:

1. To evaluate, substitute [latex]3[/latex] for [latex]x[/latex] in the expression, and then simplify.

[latex]x+7[/latex]
Substitute. [latex]\color{red}{3}+7[/latex]
Add. [latex]10[/latex]

When [latex]x=3[/latex], the expression [latex]x+7[/latex] has a value of [latex]10[/latex].

2. To evaluate, substitute [latex]-12[/latex] for [latex]x[/latex] in the expression, and then simplify.

[latex]x+7[/latex]
Substitute. [latex]\color{red}{(-12)}+7[/latex]
Add. [latex]-5[/latex]

When [latex]x=-12[/latex], the expression [latex]x+7[/latex] has a value of [latex]-5[/latex].

 

Notice that we got different results for parts 1 and 2 even though we started with the same expression. This is because the values used for [latex]x[/latex] were different. When we evaluate an expression, the value of the expression varies depending on the value used for the variable.

try it

 

example

Evaluate [latex]9x - 2[/latex] when

  1. [latex]x=5[/latex]
  2. [latex]x=\frac{1}{9}[/latex]

Solution

Remember [latex]ab[/latex] means [latex]a[/latex] times [latex]b[/latex], so [latex]9x[/latex] means [latex]9[/latex] times [latex]x[/latex].

1. To evaluate the expression when [latex]x=5[/latex], we substitute [latex]5[/latex] for [latex]x[/latex], and then simplify.

[latex]9x-2[/latex]
Substitute [latex]\color{red}{5}[/latex] for x. [latex]9\cdot\color{red}{5}-2[/latex]
Multiply. [latex]45-2[/latex]
Subtract. [latex]43[/latex]

2. To evaluate the expression when [latex]x=\frac{1}{9}[/latex], we substitute [latex]\frac{1}{9}[/latex] for [latex]x[/latex], and then simplify.

[latex]9x-2[/latex]
Substitute [latex]\color{red}{\frac{1}{9}}[/latex] for x. [latex]9\color{red}{\left (\frac{1}{9}\right )}-2[/latex]
Multiply. [latex]1-2[/latex]
Subtract. [latex]-1[/latex]

 

Notice that in part 1 that we wrote [latex]9\cdot 5[/latex] and in part 2 we wrote [latex]9\left(\frac{1}{9}\right)[/latex]. Both the dot and the parentheses tell us to multiply.

ExAMPLE

Evaluate the expression [latex]2x^3 + 7[/latex] for each value for [latex]x[/latex].
.

  1. [latex]x=0[/latex]
  2. [latex]x=-1[/latex]

Solution

  • Substitute [latex]0[/latex] for [latex]x[/latex].
    [latex]\begin{array}{ll}2x^3+7 \hfill& = 2\color{blue}{\left(0\right)}^3+7 \\ \hfill& =0+7 \\ \hfill& =7\end{array}[/latex]
  • Substitute [latex]-1[/latex] for [latex]x[/latex].
    [latex]\begin{array}{ll}2x^3+7 \hfill& = 2\color{blue}{\left(-1\right)}^3+7 \\ \hfill& =-2+7 \\ \hfill& =5\end{array}[/latex]

If we always put negative numbers inside parentheses when we substitute, we are more likely to follow the order of operations correctly.

try it

 

example

Evaluate [latex]{x}^{2}[/latex] when [latex]x=-10[/latex].

Solution

[latex]{x}^{2}=\,\color{blue}{(-10)}^2=100[/latex]

 

try it

 

example

[latex]\text{Evaluate }{2}^{x}\text{ when }x=5[/latex].

Solution

In this expression, the variable is an exponent.

[latex]2^x[/latex]
Substitute [latex]\color{red}{5}[/latex] for x. [latex]{2}^{\color{red}{5}}[/latex]
Use the definition of exponent. [latex]2\cdot2\cdot2\cdot2\cdot2[/latex]
Multiply. [latex]32[/latex]

When [latex]x=5[/latex], the expression [latex]{2}^{x}[/latex] has a value of [latex]32[/latex].

try it

 

example

[latex]\text{Evaluate }3x+4y - 6\text{ when }x=10\text{ and }y=-2[/latex].

Solution

[latex]\begin{array}{ll}3x+4y - 6 \hfill& = 3\color{blue}{(10)}+4\color{red}{(-2)}-6 \\ \hfill& = \color{blue}{30}\color{red}{-8}-6 \\ \hfill& =16\end{array}[/latex]

 

TRY IT

 

example

[latex]\text{Evaluate }-2{x}^{2}+3x+8\text{ when }x=-4[/latex].

Solution

[latex]-2x^2+3x+8[/latex]
Substitute [latex]\color{red}{4}[/latex] for each x. [latex]-2{(\color{red}{(-4)})}^{2}+3(\color{red}{4})+8[/latex]
Simplify [latex]{-4}^{2}[/latex] . [latex]-2(16)+3(-4)+8[/latex]
Multiply. [latex]-32-12+8[/latex]
Add. [latex]-36[/latex]

Example

[latex]\text{Evaluate }\frac{1}{x-3}\text{ when }x=5 \text{ and when }x=3[/latex].

Solution

  • If we substitute [latex]5[/latex] for [latex]x[/latex], the expression becomes [latex]\frac{1}{\color{blue}{5}-3}=\frac{1}{2}[/latex]. The answer is [latex]\frac{1}{2}[/latex]

 

  • If we substitute [latex]3[/latex] for [latex]x[/latex], the expression becomes [latex]\frac{1}{\color{blue}{3}-3}=\frac{1}{0}[/latex]. A fraction where the denominator is zero is  undefined.

Example

Evaluate: [latex]4\sqrt{x^2}-\sqrt{-6x}\text{ when } x=-3[/latex]

Solution

[latex]4\sqrt{x^2}-\sqrt{-6x}[/latex]
[latex]=4\sqrt{\color{blue}{(-3)}^2}-\sqrt{-6\color{blue}{(-3)}}[/latex]

[latex]=4\sqrt{\color{blue}{9}}-\sqrt{\color{blue}{(18)}}[/latex]

[latex]=4\cdot \color{blue}{3}-\sqrt{\color{blue}{(9\cdot 2)}}[/latex]

[latex]=\color{blue}{12}-\sqrt{\color{blue}{9}}\cdot\sqrt{2}[/latex]

[latex]=12-\color{blue}{3}\cdot\sqrt{2}[/latex]

[latex]=12-3\sqrt{2}[/latex]

try it

In the video below we show more examples of how to substitute a value for variable in an expression, then evaluate the expression.

Example

Evaluate [latex]\frac{x+y}{x}-\frac{x-y}{y}[/latex] when [latex]x=12[/latex] and [latex]y=-9[/latex].

Solution

[latex]\frac{x+y}{x}-\frac{x-y}{y}[/latex]                    Substitute [latex]x=\color{blue}{12}[/latex] and [latex]y=\color{red}{-9}[/latex]

[latex]=\frac{\color{blue}{12}+\color{red}{(-9)}}{\color{blue}{12}}-\frac{\color{blue}{12}-\color{red}{(-9)}}{\color{red}{(-9)}}[/latex]          Simplify the numerators.

[latex]=\frac{\color{purple}{3}}{12}-\frac{\color{purple}{21}}{-9}[/latex]                    Look for common factors between the numerator and denominator in each fraction.

[latex]=\frac{\color{green}{3}}{\color{green}{3}\cdot 4}-\frac{\color{green}{3}\cdot 7}{-3\cdot\color{green}{3}}[/latex]                    Cancel common factors.

[latex]=\frac{1}{4}\color{red}{-}\frac{7}{\color{red}{-3}}[/latex]                    Subtracting a negative is equivalent to adding a positive.

[latex]=\frac{1}{4}\color{red}{+}\frac{7}{3}[/latex]                    Build equivalent fractions with a common denominator of [latex]12[/latex].

[latex]=\frac{1\color{blue}{\cdot 3}}{4\color{blue}{\cdot 3}}+\frac{7\color{red}{\cdot 4}}{3\color{red}{\cdot 4}}[/latex]                    Multiply the numerators and denominators.

[latex]=\frac{3}{\color{purple}{12}}+\frac{28}{\color{purple}{12}}[/latex]                    Add the fractions by combining the numerators and keeping the common denominator.

[latex]=\frac{3+28}{\color{purple}{12}}[/latex]                    Add the numerators.

[latex]=\frac{31}{12}[/latex]

Try It

Evaluate [latex]\frac{x^2}{y}+\frac{y^2}{x}[/latex] when [latex]x=6[/latex] and [latex]y=-4[/latex].