TExcelTAD
Home › School Functions, Exponentials & Logarithms › Function Notation f(x), Piecewise Functions & Evaluation

Function Notation f(x)f(x), Piecewise Functions & Evaluation

Before the Swiss mathematician Leonhard Euler introduced the symbol f(x)f(x) in the 18th century, mathematicians wrote long descriptions to explain relationships between variables. Euler's notation compressed this into an elegant, unambiguous shorthand.

In this lesson, you will learn how to read, substitute, and manipulate function notation on paper—both for standard formulas and for multi-part piecewise functions.


What Does f(x)f(x) Really Mean?

The notation f(x)f(x) is read aloud as "ff of xx".

f⏟Function Name(x⏟Input Variable)=Formula in terms of x⏟Output Rule\underbrace{f}_{\text{Function Name}}(\underbrace{x}_{\text{Input Variable}}) = \underbrace{\text{Formula in terms of } x}_{\text{Output Rule}}

CRITICAL WARNING:
The parentheses in f(x)f(x) do NOT denote multiplication!
f(x)f(x) does not mean f×xf \times x.
Instead, the parentheses act like a container or envelope holding the input quantity that must be fed into the function's formula.

For example, if f(x)=3x+1f(x) = 3x + 1, then:

  • f(2)f(2) means: "Replace every xx in the formula with the number 22."
  • f(−5)f(-5) means: "Replace every xx in the formula with the number −5-5."
  • f(a+1)f(a + 1) means: "Replace every xx in the formula with the algebraic expression (a+1)(a + 1)."

The Paper "Empty Parentheses" Technique

The most frequent source of errors when evaluating functions on paper is forgetting negative signs or dropping exponents. To prevent this, always write an intermediate line with empty parentheses wherever the variable was:

Original Rule:f(x)=2x2−5x+3Empty Template:f()=2()2−5()+3Substitute x=−4:f(−4)=2(−4)2−5(−4)+3\begin{aligned} \text{Original Rule:} \quad &f(x) = 2x^2 - 5x + 3 \\ \text{Empty Template:} \quad &f(\quad) = 2(\quad)^2 - 5(\quad) + 3 \\ \text{Substitute } x = -4: \quad &f(-4) = 2(-4)^2 - 5(-4) + 3 \end{aligned}

Now you can compute line-by-line using standard order of operations (PEMDAS):

  1. Exponents first: (−4)2=+16(-4)^2 = +16.
  2. Multiplications: 2(16)=322(16) = 32 and −5(−4)=+20-5(-4) = +20.
  3. Addition: 32+20+3=5532 + 20 + 3 = 55.

Piecewise-Defined Functions on Paper

In real life, many rules change depending on the situation. For example, a postal service might charge one rate for letters weighing under 100 g100\text{ g} and a higher rate for letters weighing 100 g100\text{ g} or more.

A piecewise function is a function defined by different formulas on different sub-intervals of its domain.

f(x)={Formula 1,if x∈Region 1Formula 2,if x∈Region 2Formula 3,if x∈Region 3f(x) = \begin{cases} \text{Formula 1}, & \text{if } x \in \text{Region 1} \\ \text{Formula 2}, & \text{if } x \in \text{Region 2} \\ \text{Formula 3}, & \text{if } x \in \text{Region 3} \end{cases}

The Two-Step Paper Rule for Piecewise Functions:

  1. Locate the Branch: Look at your given input xx. Compare it against the domain conditions on the right side. Identify the one single branch where xx belongs.
  2. Evaluate Only That Branch: Plug xx exclusively into that branch's formula. Ignore all other branches completely!

Step-by-Step Paper Notebook Method

Evaluating Algebraic Inputs:

  1. Rewrite the formula, substituting (x+h)(x + h) or the given expression inside parentheses for every xx.
  2. Expand binomials carefully: (x+h)2=x2+2xh+h2(x + h)^2 = x^2 + 2xh + h^2.
  3. Distribute negative signs across parentheses: −(a+b)=−a−b-(a + b) = -a - b.
  4. Combine like terms vertically or horizontally.

Evaluating the Difference Quotient on Paper:

The difference quotient measures the average rate of change and forms the foundation of calculus:

f(x+h)−f(x)h,where h≠0\frac{f(x + h) - f(x)}{h}, \quad \text{where } h \neq 0
  • Line 1: Calculate and expand f(x+h)f(x + h) separately.
  • Line 2: Write f(x+h)−f(x)f(x + h) - f(x), using brackets around the original f(x)f(x) so the minus sign distributes to every term.
  • Line 3: Cancel all terms that do not contain hh in the numerator.
  • Line 4: Factor out hh and divide by the denominator hh.

Worked Examples

Example 1: Numerical and Algebraic Substitution

Problem: Given f(x)=3x2−4x+1f(x) = 3x^2 - 4x + 1, evaluate the following on paper:

  1. f(−2)f(-2)
  2. f(0)f(0)
  3. f(2a+1)f(2a + 1)

Step-by-Step Paper Calculations:

  1. Evaluate f(−2)f(-2):
f(−2)=3(−2)2−4(−2)+1=3(4)−(−8)+1=12+8+1=21\begin{aligned} f(-2) &= 3(-2)^2 - 4(-2) + 1 \\ &= 3(4) - (-8) + 1 \\ &= 12 + 8 + 1 \\ &= 21 \end{aligned}
  1. Evaluate f(0)f(0):
f(0)=3(0)2−4(0)+1=0−0+1=1\begin{aligned} f(0) &= 3(0)^2 - 4(0) + 1 \\ &= 0 - 0 + 1 \\ &= 1 \end{aligned}
  1. Evaluate f(2a+1)f(2a + 1):
f(2a+1)=3(2a+1)2−4(2a+1)+1\begin{aligned} f(2a + 1) &= 3(2a + 1)^2 - 4(2a + 1) + 1 \end{aligned}

Expand (2a+1)2=(2a)2+2(2a)(1)+12=4a2+4a+1(2a + 1)^2 = (2a)^2 + 2(2a)(1) + 1^2 = 4a^2 + 4a + 1:

f(2a+1)=3(4a2+4a+1)−4(2a+1)+1=(12a2+12a+3)−8a−4+1\begin{aligned} f(2a + 1) &= 3(4a^2 + 4a + 1) - 4(2a + 1) + 1 \\ &= (12a^2 + 12a + 3) - 8a - 4 + 1 \end{aligned}

Group like terms on paper:

f(2a+1)=12a2+(12a−8a)+(3−4+1)=12a2+4a+0=12a2+4a\begin{aligned} f(2a + 1) &= 12a^2 + (12a - 8a) + (3 - 4 + 1) \\ &= 12a^2 + 4a + 0 \\ &= 12a^2 + 4a \end{aligned}

Final Answers:

  1. f(−2)=21f(-2) = \mathbf{21}
  2. f(0)=1f(0) = \mathbf{1}
  3. f(2a+1)=12a2+4af(2a + 1) = \mathbf{12a^2 + 4a}

Example 2: Piecewise Function Evaluation

Problem: The piecewise function g(x)g(x) is defined by:

g(x)={2x+7,if x<−2x2−1,if −2≤x<34,if x≥3g(x) = \begin{cases} 2x + 7, & \text{if } x < -2 \\ x^2 - 1, & \text{if } -2 \le x < 3 \\ 4, & \text{if } x \ge 3 \end{cases}

Evaluate on paper: (a) g(−5)g(-5), (b) g(−2)g(-2), (c) g(1)g(1), and (d) g(5)g(5).

Step-by-Step Paper Solution:

  1. For x=−5x = -5:

    • Test condition: −5<−2-5 < -2 is True.
    • Use Branch 1 (2x+72x + 7):
      g(−5)=2(−5)+7=−10+7=−3g(-5) = 2(-5) + 7 = -10 + 7 = -3
  2. For x=−2x = -2:

    • Test conditions: Is −2<−2-2 < -2? No (strict inequality).
    • Is −2≤−2<3-2 \le -2 < 3? Yes (equality holds at −2≤−2-2 \le -2).
    • Use Branch 2 (x2−1x^2 - 1):
      g(−2)=(−2)2−1=4−1=3g(-2) = (-2)^2 - 1 = 4 - 1 = 3
  3. For x=1x = 1:

    • Test condition: −2≤1<3-2 \le 1 < 3 is True.
    • Use Branch 2 (x2−1x^2 - 1):
      g(1)=(1)2−1=1−1=0g(1) = (1)^2 - 1 = 1 - 1 = 0
  4. For x=5x = 5:

    • Test condition: 5≥35 \ge 3 is True.
    • Use Branch 3 (constant value 44):
      g(5)=4g(5) = 4

Final Answers: g(−5)=−3,g(−2)=3,g(1)=0,g(5)=4g(-5) = \mathbf{-3}, \quad g(-2) = \mathbf{3}, \quad g(1) = \mathbf{0}, \quad g(5) = \mathbf{4}.


Example 3: Simplifying the Difference Quotient on Paper

Problem: For the linear-quadratic function f(x)=x2+3xf(x) = x^2 + 3x, evaluate and simplify the difference quotient on paper:

f(x+h)−f(x)h,h≠0\frac{f(x + h) - f(x)}{h}, \quad h \neq 0

Step-by-Step Paper Solution:

  1. Step 1: Compute f(x+h)f(x + h):
f(x+h)=(x+h)2+3(x+h)=(x2+2xh+h2)+(3x+3h)=x2+2xh+h2+3x+3h\begin{aligned} f(x + h) &= (x + h)^2 + 3(x + h) \\ &= (x^2 + 2xh + h^2) + (3x + 3h) \\ &= x^2 + 2xh + h^2 + 3x + 3h \end{aligned}
  1. Step 2: Form the difference f(x+h)−f(x)f(x + h) - f(x):
f(x+h)−f(x)=[x2+2xh+h2+3x+3h]−[x2+3x]=x2+2xh+h2+3x+3h−x2−3x\begin{aligned} f(x + h) - f(x) &= [x^2 + 2xh + h^2 + 3x + 3h] - [x^2 + 3x] \\ &= x^2 + 2xh + h^2 + 3x + 3h - x^2 - 3x \end{aligned}

Notice how x2x^2 cancels with −x2-x^2, and 3x3x cancels with −3x-3x:

f(x+h)−f(x)=2xh+h2+3hf(x + h) - f(x) = 2xh + h^2 + 3h
  1. Step 3: Divide by hh:
f(x+h)−f(x)h=2xh+h2+3hh\begin{aligned} \frac{f(x + h) - f(x)}{h} &= \frac{2xh + h^2 + 3h}{h} \end{aligned}
  1. Step 4: Factor out hh from the numerator:
=h(2x+h+3)h=2x+h+3\begin{aligned} &= \frac{h(2x + h + 3)}{h} \\ &= 2x + h + 3 \end{aligned}

Final Answer: The simplified difference quotient is 2x+h+32x + h + 3.


Common Mistakes & Paper Traps

Paper Trap What Goes Wrong Correct Paper Habit
Linear Fallacy: f(a+b)=f(a)+f(b)f(a + b) = f(a) + f(b) Writing f(x+2)=f(x)+f(2)f(x + 2) = f(x) + f(2). Functions are generally non-linear! Plug the entire expression (x+2)(x + 2) into the formula.
Minus Sign Drop on Powers Writing −32=9-3^2 = 9 when evaluating f(−3)=x2f(-3) = x^2. −32=−9-3^2 = -9, but (−3)2=+9(-3)^2 = +9. Always write parentheses around negative inputs: (−3)2(-3)^2.
Evaluating Multiple Piecewise Branches Calculating g(−2)g(-2) in both branches and adding or averaging them. Check the boundary condition strictly: an input belongs to one branch only.
Dropping Brackets in f(x+h)−f(x)f(x+h) - f(x) Writing −x2+3x- x^2 + 3x instead of −(x2+3x)=−x2−3x-(x^2 + 3x) = -x^2 - 3x. Always put brackets around the second term: −[f(x)]- [f(x)].

Pencil & Paper Practice

Solve these problems in your notebook before reviewing the solutions.

Practice 1

Given h(x)=5−2x2h(x) = 5 - 2x^2, calculate h(−3)h(-3) and h(12)h(\frac{1}{2}) on paper.

Practice 2

For the piecewise function:

P(t)={10−3t,t≤1t2+4,t>1P(t) = \begin{cases} 10 - 3t, & t \le 1 \\ t^2 + 4, & t > 1 \end{cases}

Evaluate P(1)P(1) and P(3)P(3).

Practice 3

Given f(x)=4x−7f(x) = 4x - 7, simplify the difference quotient f(x+h)−f(x)h\frac{f(x + h) - f(x)}{h} on paper.


Worked Solutions

Solution 1

  1. For x=−3x = -3:
h(−3)=5−2(−3)2=5−2(9)=5−18=−13h(-3) = 5 - 2(-3)^2 = 5 - 2(9) = 5 - 18 = -13
  1. For x=12x = \frac{1}{2}:
h(12)=5−2(12)2=5−2(14)=5−12=92h\left(\frac{1}{2}\right) = 5 - 2\left(\frac{1}{2}\right)^2 = 5 - 2\left(\frac{1}{4}\right) = 5 - \frac{1}{2} = \frac{9}{2}

Result: h(−3)=−13,h(12)=92h(-3) = \mathbf{-13}, \quad h\left(\frac{1}{2}\right) = \mathbf{\frac{9}{2}}.

Solution 2

  1. For t=1t = 1:
    • The condition t≤1t \le 1 includes equality at 11.
    • Use the first formula:
      P(1)=10−3(1)=7P(1) = 10 - 3(1) = 7
  2. For t=3t = 3:
    • Since 3>13 > 1, use the second formula:
      P(3)=(3)2+4=9+4=13P(3) = (3)^2 + 4 = 9 + 4 = 13

Result: P(1)=7,P(3)=13P(1) = \mathbf{7}, \quad P(3) = \mathbf{13}.

Solution 3

  1. Calculate f(x+h)=4(x+h)−7=4x+4h−7f(x + h) = 4(x + h) - 7 = 4x + 4h - 7.
  2. Form the difference:
f(x+h)−f(x)=(4x+4h−7)−(4x−7)=4x+4h−7−4x+7=4hf(x + h) - f(x) = (4x + 4h - 7) - (4x - 7) = 4x + 4h - 7 - 4x + 7 = 4h
  1. Divide by hh:
4hh=4\frac{4h}{h} = 4

Result: The difference quotient equals the constant slope 44.


Test yourself

If f(x)=3−2x2f(x) = 3 - 2x^2, what is the exact value of f(−4)f(-4)?

  1. −29-29
  2. 3535
  3. −13-13
  4. 1919

For the piecewise function f(x)={x+5,x<23x−1,x≥2f(x) = \begin{cases} x + 5, & x < 2 \\ 3x - 1, & x \ge 2 \end{cases}, what is f(2)f(2)?

  1. 77
  2. 55
  3. 66
  4. 1212

If f(x)=5x+2f(x) = 5x + 2, what is the simplified algebraic expression for f(x+3)f(x + 3)?

  1. 5x+55x + 5
  2. 5x+175x + 17
  3. 5x+65x + 6
  4. 5x2+155x^2 + 15