Find the numerical value of an algebraic expression by substituting a given number for the variable.

Example

Substitute the variable value, then reduce by order of operations.

highlighted = computed this step

Step 1 — Set up

Set up the expression.

2x23x+1x=42x^{2} - 3x + 1 \quad x= 4
Start with the expression and the x value.expression2x^2 - 3x + 1x = 4value cardsubstitute--square first--multiply terms--result--final--

Step 2 — Substitute

Substitute x = 4: 2(4)^2 - 3(4) + 1.

2(4)23(4)+12 ( \hl{4} )^{ 2 }- 3 ( \hl{4} )+ 1
Substitute x = 4.expression2x^2 - 3x + 1x = 4value cardsubstitute2(4)^2 - 3(4) + 1square first--multiply terms--result--final--

Step 3 — Square first

Square first: 4^2 = 16.

42=164 ^{ 2 }= \hl{16}
Square first: 4^2 = 16.expression2x^2 - 3x + 1x = 4value cardsubstitute2(4)^2 - 3(4) + 1square first4^2 = 16multiply terms--result--final--

Step 4 — Multiply terms

Multiply terms: 2 x 16 = 32 and 3 x 4 = 12.

2×16=323×4=122 \times 16 = \hl{32} \quad 3 \times 4 = \hl{12}
Multiply the two terms.expression2x^2 - 3x + 1x = 4value cardsubstitute2(4)^2 - 3(4) + 1square first4^2 = 16multiply terms2 x 16 = 32 3 x 4 = 12result--final--

Step 5 — Result

Finish the arithmetic: 32 - 12 + 1 = 21.

3212+1=2132 - 12 + 1 = \hl{21}
Finish arithmetic: 32 - 12 + 1 = 21.expression2x^2 - 3x + 1x = 4value cardsubstitute2(4)^2 - 3(4) + 1square first4^2 = 16multiply terms2 x 16 = 32 3 x 4 = 12result32 - 12 + 1 = 21final21
evaluate-expression Replace every occurrence of the variable with the given value, then use order-of-operations to compute the result.