# Evaluate Expressions

## Definition

To evaluate expressions, you substitute specific values for variables. For example, to evaluate the expression $\sqrt{x+2}$ for $x=2$, you substitute $2$ in for $x$ to get $\sqrt{2+2} = 2$.

## Technique

Evaluating functions works similarly. For example, given a function $f(x) = \sqrt{x+2}$, then $f(2) = \sqrt{2+2}=2$.

For expressions and functions with multiple variables, the procedure is still the same. For example, given that $f(x,y)=x^2+2y-1$, $f(-4,1)=(-4)^2+2(1)-1=17$.

Sometimes you are given the value of an expression but not of the variables. In these cases, you may be asked to solve for variable values.

Here is a basic one-variable example:

### What value of $x$ satisfies $3x+7=46$?

Solving for $x$, we have: \begin{aligned} 3x + 7 &= 46\\ 3x &= 46-7\\ 3x &= 39\\ x &= 13\quad_\square\ \end{aligned}

Here is a two-variable example:

### For the function $f(x,y)=x^2+y$, how many ordered pairs of integers satisfy $f(x,y)=1$ if $-10 \leq x,y \leq 10$?

$f(x,y)=x^2+y=1$ can be rewritten as $y = 1 - x^2$, a parabola. Given the constraints on $x$ and $y$, our ordered pairs of integers are $(0,1)$, $(\pm 1,0)$, $(\pm 2,-3)$, and $(\pm 3,-8)$ for a total of $7$ pairs. $_\square$

## Application and Extensions

### What value of $n$ satisfies $(n+2)^2 - n^2 = 16$?

We can solve for $n$ after multiplying out and combining terms. \begin{aligned} n^2+4n+4 - n^2 &= 16 \\ 4n+4 &=16 \\ 4(n+1) &=16 \\ n+1 &= 4\\ n &= 3 \quad_\square\ \end{aligned}

### Given that $f(x)=\frac{6x^2 - 11x - 7}{2x+1}$, what is $f(7)$?

While we can substitute in $7$ in for $x$ right away, the function is easier to evaluate if we first simplify it via factoring. \begin{aligned} f(x) &= \frac{6x^2 - 11x - 7}{2x+1} \\ &= \frac{(2x+1)(3x-7)}{2x+1} \\ &= 3x-7 \\ f(7)&=3(7)-7 \\ f(7)&=14 \quad_\square\ \end{aligned} Note by Arron Kau
6 years, 7 months ago

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

• Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
• Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
• Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$ ... $$ or $ ... $ to ensure proper formatting.
2 \times 3 $2 \times 3$
2^{34} $2^{34}$
a_{i-1} $a_{i-1}$
\frac{2}{3} $\frac{2}{3}$
\sqrt{2} $\sqrt{2}$
\sum_{i=1}^3 $\sum_{i=1}^3$
\sin \theta $\sin \theta$
\boxed{123} $\boxed{123}$