Function Examples: 46 Problems with Answers

Worked examples of Function to try before you open each solution, then practice problems with answers.

Worked Examples

Example 1

easy
Determine whether the relation {(1,3),(2,5),(3,7),(4,9)} is a function.
Show solution

Answer

Yes, it is a function.

First step

1.
A relation is a function if every input (first element) maps to exactly one output (second element).

Full solution

  1. 2.
    List the inputs: 1,2,3,4. Each input appears exactly once, so each has a unique output.
  2. 3.
    Since no input is repeated with a different output, this relation is a function.
A function assigns exactly one output to each input. The vertical line test for graphs and the uniqueness of first elements in ordered pairs are equivalent ways to check this.

Example 2

medium
Does the equation x2+y2=25 define y as a function of x?

Example 3

medium
Given f(x)=2x2−3x+1, find f(4) and determine if g={(1,2),(3,4),(1,5)} is a function.

Example 4

medium
Decide whether y2=x defines y as a function of x.

Example 5

medium
If f(x)=2x+3 and f(a)=11, find a.

Example 6

hard
Given f(x)=x+1x−1, find f(f(2)).

Example 7

hard
A graph passes the vertical line test but two horizontal lines each cut it in 3 places. Is it a function? Is it one-to-one?

Example 8

hard
Let f(x)={x+1x<0x2x≥0. Find f(−3)+f(2).

Example 9

challenge
Find a function f:R→R such that f(f(x))=x for all x, other than f(x)=x.

Practice Problems

Try each one, then open the solution to compare your method.

Example 1

easy
Is the relation {(2,4),(3,6),(2,8)} a function? Explain.

Example 2

hard
A graph passes through the points (1,2), (2,5), (3,5), and (1,7). Does this graph represent a function? Explain using the vertical line test.

Example 3

easy
Does the rule 'add 3 to the input' define a function?

Example 4

easy
Is the set {(1,2),(2,3),(3,4)} a function?

Example 5

easy
Is the set {(1,2),(1,5),(3,4)} a function?

Example 6

easy
If f(x)=2x+1, find f(4).

Example 7

easy
If f(x)=x2, find f(−3).

Example 8

easy
Can a function defined by a table assign output 7 to input 2 and also output 7 to input 5?

Example 9

easy
Does x2+y2=1 define y as a function of x?

Example 10

easy
If f(x)=1x, what is f(0)?

Example 11

medium
A function f satisfies f(x)=3x−2. For which input is f(x)=10?

Example 12

medium
If f(x)=x2−x, compute f(3)−f(2).

Example 13

medium
Given f(x)=2x+1 and f(a)=f(3), find a.

Example 14

medium
A function is defined by f(x)={xx≥0−xx<0. Find f(−5).

Example 15

medium
If f(x+1)=2x+5, find f(x).

Example 16

medium
Does the graph that passes through (2,1) and (2,4) represent a function?

Example 17

medium
If f(x)=x2 and g(x)=x2 but with domains x≥0 and all reals, are f and g the same function?

Example 18

medium
If f(x)=3x and f(f(x))=18, find x.

Example 19

challenge
A function satisfies f(x)+2f(1−x)=3x for all x. Find f(x).

Example 20

challenge
f is defined on integers by f(1)=1 and f(n)=f(n−1)+n. Find f(5).

Example 21

challenge
If f(x)=ax+bx and f(1)=4, f(2)=3, find a+b.

Example 22

medium
A function satisfies f(2x)=4x+1. Find f(x).

Example 23

easy
Is the set {(0,1),(1,2),(2,3),(3,4)} a function?

Example 24

easy
If f(x)=3x−5, find f(0).

Example 25

easy
If g(x)=x2−1, find g(−2).

Example 26

easy
Does {(1,5),(2,5),(3,5),(4,5)} define a function?

Example 27

medium
If f(x)=x−4, find f(13).

Example 28

medium
If f(x)=1x−2, what value of x is not in the domain?

Example 29

medium
For f(x)=x2, find f(x+1)−f(x).

Example 30

medium
What is the domain of f(x)=9−x2?

Example 31

medium
For f(x)=∣x∣, find f(−7)+f(7).

Example 32

hard
State the domain of f(x)=x+2x−3.

Example 33

hard
If f(x)=ax+b, f(1)=5, and f(3)=11, find a and b.

Example 34

hard
If f(x)=x2−4x+1, find f(x+2), simplified.

Example 35

hard
Find the range of f(x)=x2+4 for x∈R.

Example 36

hard
For f(x)=x2, simplify f(x+h)−f(x)h assuming h≠0.

Example 37

challenge
How many functions f:{1,2,3,4}→{1,2,3,4} are one-to-one?

What to focus on

Core idea: A function is a rule that pairs each allowed input with one and only one output.

Common stuck point: The procedure for function is the easy part; the trap is calling any equation in x and y a function. Asking "Does every allowed input give exactly one output, never two?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Ask yourself: Does every allowed input give exactly one output, never two?

Concept recap

A function is a rule that assigns to each input in the domain exactly one output in the codomain — every input maps to precisely one output, never two.

A function works like a car-park ticket machine: enter how long you stayed and it prints one fee. Two different stays can cost the same, but the same stay never prints two different fees. Unlike the machine, a function's rule can be any formula, and its inputs need not be whole hours.

Read the full lesson on Function