## Evaluating Variable Expressions with Integers

Contents

Remember that to evaluate an expression means to substitute a number for the **variable** in the expression. Now we can use negative numbers as well as positive numbers when evaluating **expressions**.

## Example

Evaluate \(x+7\phantom{\rule{0.2em}{0ex}}\text{when}\phantom{\rule{0.2em}{0ex}}\)

- \(\phantom{\rule{0.2em}{0ex}}x=-2\phantom{\rule{0.2em}{0ex}}\)
- \(\phantom{\rule{0.2em}{0ex}}\phantom{\rule{0.2em}{0ex}}x=-11.\)

### Solution

Evaluate \(x+7\) when \(x=-2\) | |

Simplify. |

Evaluate \(x+7\) when \(x=-11\) | |

Simplify. |

## Example

When \(n=-5,\) evaluate \(\)

- \(\phantom{\rule{0.2em}{0ex}}n+1\phantom{\rule{0.2em}{0ex}}\)
- \(\phantom{\rule{0.2em}{0ex}}-n+1.\)

### Solution

Evaluate \(n+1\) when \(n=-5\) | |

Simplify. |

Evaluate \(-n+1\) when \(n=-5\) | |

Simplify. | |

Add. |

Next we’ll evaluate an expression with two variables.

## Example

Evaluate \(3a+b\) when \(a=12\) and \(b=-30.\)

### Solution

Multiply. | |

Add. |

## Example

Evaluate \({\left(x+y\right)}^{2}\) when \(x=-18\) and \(y=24.\)

### Solution

This expression has two variables. Substitute \(-18\) for \(x\) and \(24\) for \(y.\)

\({\left(x+y\right)}^{2}\) | |

\({\left(-18+24\right)}^{2}\) | |

Add inside the parentheses. | \({\left(6\right)}^{2}\) |

Simplify | \(36\) |