Piecewise Functions

Question 11 mark

A function f is given by

\begin{aligned}\mathrm{f}(x)&=x^2-1 &&x\leqslant 3\\&=14-2x &&x>3\end{aligned}

Work out \mathrm{f}(5)

Hint

Decide which part of the domain contains x=5 before you substitute.

Worked solution
  1. 5>3, so use the second expression, 14-2x
  2. \mathrm{f}(5)=14-2\times5
  3. Answer: 4

Question 21 mark

A function f is given by

\begin{aligned}\mathrm{f}(x)&=9-\tfrac{1}{2}x &&0\leqslant x\leqslant 4\\&=k(x-6)^2 &&4<x\leqslant 6\end{aligned}

k is a constant.

The two parts of the graph of y=\mathrm{f}(x) join at the point P, where x=4

Write down the coordinates of P.

Write your answer as (x, y)

Hint

You don't know k, so use the other part of f to find the y-coordinate at x=4.

Worked solution
  1. x=4 is in the domain 0\leqslant x\leqslant 4 of the first part
  2. \mathrm{f}(4)=9-\tfrac12\times4=9-2=7
  3. Answer: P=(4,\ 7)

Question 31 mark

A function f is given by

\begin{aligned}\mathrm{f}(x)&=2x+6 &&-3\leqslant x<0\\&=6-x^2 &&0\leqslant x<2\\&=4-x &&2\leqslant x\leqslant 5\end{aligned}

Write down the domain of f.

Give your answer as an inequality.

Type powers with ^ and fractions with /, for example x^2 or (x+1)/3

Hint

The domain is every value of x for which f is defined, so put the three parts of the domain together.

Worked solution
  1. The three parts cover -3\leqslant x<0, then 0\leqslant x<2, then 2\leqslant x\leqslant 5
  2. Together they run from -3 to 5 with no gaps, and both ends are included
  3. Answer: -3\leqslant x\leqslant 5

Question 41 mark

A function f has domain 0\leqslant x\leqslant 6

\mathrm{f}(x)=x+1 on the first part of the domain and \mathrm{f}(x)=7-x on the second part.

Which pair of inequalities gives a correct definition of f, with exactly one value of \mathrm{f}(x) for every x in the domain?

Choose one answer
Hint

Check the values x=0, x=2 and x=6: each must be in exactly one of the two parts.

Worked solution
  1. Every x from 0 to 6 must be in exactly one part
  2. 0\leqslant x\leqslant 2 and 2\leqslant x\leqslant 6 both contain x=2, giving two values (3 and 5)
  3. 0\leqslant x<2 and 2<x\leqslant 6 leave out x=2
  4. 0\leqslant x<2 and 2\leqslant x<6 leave out x=6
  5. Answer: 0\leqslant x<2 and 2\leqslant x\leqslant 6

Question 52 marks

A function f is given by

\begin{aligned}\mathrm{f}(x)&=2x+5 &&x<1\\&=x^2+3 &&1\leqslant x<3\\&=15-2x &&x\geqslant 3\end{aligned}

Work out \mathrm{f}(1)+\mathrm{f}(3)

Hint

At a boundary, look carefully at the inequality signs to decide which piece includes that value of x.

Worked solution
  1. x=1 satisfies 1\leqslant x<3, so use x^2+3: \mathrm{f}(1)=1+3=4
  2. x=3 satisfies x\geqslant3, so use 15-2x: \mathrm{f}(3)=15-6=9
  3. \mathrm{f}(1)+\mathrm{f}(3)=4+9=13

Question 62 marks

A function f is given by

\begin{aligned}\mathrm{f}(x)&=x+3 &&-3\leqslant x<-1\\&=x^2+1 &&-1\leqslant x<1\\&=3-x &&1\leqslant x\leqslant 3\end{aligned}

Which graph, A, B, C or D, shows y=\mathrm{f}(x)?

Choose one answer
Hint

Work out \mathrm{f}(-3), \mathrm{f}(0) and \mathrm{f}(3) and compare them with each graph.

Worked solution
  1. x+3 rises from (-3,\ 0) to (-1,\ 2)
  2. x^2+1 is a U-shaped curve with its lowest point at (0,\ 1)
  3. 3-x falls from (1,\ 2) to (3,\ 0)
  4. A has a \cap-shaped middle, B falls on the left and D rises on the right
  5. Answer: Graph C

Question 72 marks

The graph of y=\mathrm{f}(x) for 0\leqslant x\leqslant 8 is drawn on the grid.

Use the graph to work out \mathrm{ff}(7)

Hint

\mathrm{ff}(7) means f of \mathrm{f}(7): read \mathrm{f}(7) from the graph first.

Worked solution
  1. From the graph, \mathrm{f}(7)=5
  2. So \mathrm{ff}(7)=\mathrm{f}(5)
  3. From the graph, \mathrm{f}(5)=6
  4. Answer: 6

Question 82 marks

A function f is given by

\begin{aligned}\mathrm{f}(x)&=2x+3 &&x<1\\&=7-2x &&x\geqslant 1\end{aligned}

Work out all the values of x for which \mathrm{f}(x)=1

Give every value, separated by commas

Hint

Solve \mathrm{f}(x)=1 for each part separately, then check each answer is in that part's domain.

Worked solution
  1. First part: 2x+3=1 gives x=-1, and -1<1 ✓
  2. Second part: 7-2x=1 gives x=3, and 3\geqslant1 ✓
  3. Answer: x=-1 or x=3

Question 92 marks

The graph of y=\mathrm{f}(x) for 0\leqslant x\leqslant 8 is made of three straight-line parts.

Work out an expression for \mathrm{f}(x) for 4\leqslant x\leqslant 8

Type powers with ^ and fractions with /, for example x^2 or (x+1)/3

Hint

Read two points on that part of the graph and work out its gradient first.

Worked solution
  1. The part goes from (4,\ 4) to (8,\ 1)
  2. Gradient =\dfrac{1-4}{8-4}=-\dfrac34
  3. y-4=-\tfrac34(x-4), so y=-\tfrac34x+3+4
  4. Answer: \mathrm{f}(x)=7-\tfrac34x

Question 102 marks

A function f is given by

\begin{aligned}\mathrm{f}(x)&=ax^2-3 &&x\leqslant 2\\&=3x+a &&x>2\end{aligned}

a is a constant.

The two parts of the graph of y=\mathrm{f}(x) join where x=2

Work out the value of a.

Hint

The pieces join, so both expressions give the same value when x=2

Worked solution
  1. Substitute x=2 into both pieces.
  2. First piece: 4a-3
  3. Second piece: 6+a
  4. They join, so 4a-3=6+a
  5. 3a=9
  6. a=3

Question 113 marks

A function f is given by

\begin{aligned}\mathrm{f}(x)&=5-2x &&x<2\\&=2x-3 &&x\geqslant 2\end{aligned}

Solve \mathrm{f}(x)\leqslant 3

Give your answer as an inequality.

Type powers with ^ and fractions with /, for example x^2 or (x+1)/3

Hint

Solve the inequality for each part, keep only the values inside that part's domain, then join the two sets of values together.

Worked solution
  1. First part: 5-2x\leqslant3 gives x\geqslant1
  2. With x<2 this gives 1\leqslant x<2
  3. Second part: 2x-3\leqslant3 gives x\leqslant3
  4. With x\geqslant2 this gives 2\leqslant x\leqslant3
  5. Together: 1\leqslant x<2 and 2\leqslant x\leqslant 3
  6. Answer: 1\leqslant x\leqslant 3

Question 123 marks

A cyclist starts from rest.

Her speed, v m/s, t seconds after she starts is given by

\begin{aligned}v&=2t &&0\leqslant t<4\\&=8 &&4\leqslant t<10\\&=18-t &&10\leqslant t\leqslant 18\end{aligned}

Work out the total distance she travels in the 18 seconds.

Hint

The distance travelled is the area under the speed–time graph: sketch the graph and split the area into simple shapes.

Worked solution
  1. The graph rises from (0,\ 0) to (4,\ 8), is flat to (10,\ 8), then falls to (18,\ 0)
  2. Triangle: \tfrac12\times4\times8=16
  3. Rectangle: 6\times8=48
  4. Triangle: \tfrac12\times8\times8=32
  5. 16+48+32=96
  6. Answer: 96 m

Question 133 marks

A function f is given by

\begin{aligned}\mathrm{f}(x)&=x+6 &&x<a\\&=x^2 &&x\geqslant a\end{aligned}

a is a positive constant.

The two parts of the graph of y=\mathrm{f}(x) join where x=a

Work out the value of a.

Hint

Substitute x=a into both expressions and set them equal: this gives a quadratic equation in a.

Worked solution
  1. The parts join where x=a, so a+6=a^2
  2. a^2-a-6=0
  3. (a-3)(a+2)=0, so a=3 or a=-2
  4. a is positive, so reject a=-2
  5. Answer: a=3

Question 143 marks

A function f is given by

\begin{aligned}\mathrm{f}(x)&=x^2-2x &&x\leqslant 3\\&=12-3x &&x>3\end{aligned}

Work out all the values of x for which \mathrm{f}(x)=8

Give every value, separated by commas

Hint

Solve \mathrm{f}(x)=8 for each part and reject any solution that is not in that part's domain.

Worked solution
  1. First part: x^2-2x=8, so x^2-2x-8=0
  2. (x-4)(x+2)=0, so x=4 or x=-2
  3. This part needs x\leqslant3: keep x=-2, reject x=4
  4. Second part: 12-3x=8 gives x=\tfrac43
  5. This part needs x>3, so reject x=\tfrac43
  6. Answer: x=-2 only

Question 153 marks

A function f is given by

\begin{aligned}\mathrm{f}(x)&=x^2+2x-3 &&-3\leqslant x\leqslant 1\\&=2x-2 &&1<x\leqslant 4\end{aligned}

Work out the range of f.

Give your answer as an inequality.

Type powers with ^ and fractions with /, for example x^2 or (x+1)/3

Hint

The lowest point of the quadratic part is not at an end of its domain: complete the square to find it.

Worked solution
  1. x^2+2x-3=(x+1)^2-4, so its minimum is -4, at x=-1 (inside -3\leqslant x\leqslant1)
  2. At the ends: \mathrm{f}(-3)=0 and \mathrm{f}(1)=0, so this part gives -4\leqslant \mathrm{f}(x)\leqslant0
  3. 2x-2 increases from 0 (not included) to \mathrm{f}(4)=6
  4. So this part gives 0<\mathrm{f}(x)\leqslant6
  5. Smallest value -4, largest value 6
  6. Answer: -4\leqslant \mathrm{f}(x)\leqslant 6

Question 16Challenge5 marks

A function f is given by

\begin{aligned}\mathrm{f}(x)&=2x+8 &&x<-2\\&=x^2 &&-2\leqslant x\leqslant 2\\&=8-2x &&x>2\end{aligned}

The graph of y=\mathrm{f}(x) is shown.

(a)

Work out all the values of x for which \mathrm{f}(x)=3

Give your answers as exact values.

3 marks

Give every value, separated by commas

(b)

The equation \mathrm{f}(x)=k has exactly three solutions.

Work out the value of k.

1 mark

(c)

How many solutions does the equation \mathrm{f}(x)=4 have?

1 mark

Hint

Solve each part separately and keep only the solutions that lie in that part's domain; the graph shows how many to expect.

Worked solution

Part (a)

  1. First part: 2x+8=3 gives x=-2.5, and -2.5<-2 ✓
  2. Second part: x^2=3 gives x=\pm\sqrt3
  3. \sqrt3=1.73\ldots, so both \pm\sqrt3 are in -2\leqslant x\leqslant2 ✓
  4. Third part: 8-2x=3 gives x=2.5, and 2.5>2 ✓
  5. Answer: x=-2.5,\ -\sqrt3,\ \sqrt3,\ 2.5

Part (b)

  1. A horizontal line y=k meets the graph three times only when it touches the bottom of the curve
  2. The lowest point of x^2 is (0,\ 0)
  3. \mathrm{f}(x)=0 gives x=-4, x=0 and x=4
  4. Answer: k=0

Part (c)

  1. First part: 2x+8=4 gives x=-2, but this part needs x<-2, so reject
  2. Second part: x^2=4 gives x=-2 and x=2 ✓
  3. Third part: 8-2x=4 gives x=2, but this part needs x>2, so reject
  4. Answer: 2 solutions

Question 17Challenge5 marks

A function f is given by

\begin{aligned}\mathrm{f}(x)&=2x+4 &&x<-1\\&=3-x^2 &&-1\leqslant x\leqslant 2\\&=11-6x &&x>2\end{aligned}

The line y=6-4x meets the graph of y=\mathrm{f}(x) at two points.

(a)

Work out the coordinates of the point with the smaller x-coordinate.

3 marks

Write your answer as (x, y)

(b)

Work out the coordinates of the other point.

2 marks

Write your answer as (x, y)

Hint

Set each part of f equal to 6-4x in turn, and reject any solution that is not in that part's domain.

Worked solution

Part (a)

  1. First part: 2x+4=6-4x gives x=\tfrac13, but this part needs x<-1, so reject
  2. Second part: 3-x^2=6-4x, so x^2-4x+3=0
  3. (x-1)(x-3)=0, so x=1 or x=3
  4. This part needs -1\leqslant x\leqslant2: keep x=1, reject x=3
  5. At x=1: y=6-4=2
  6. Answer: (1,\ 2)

Part (b)

  1. Third part: 11-6x=6-4x
  2. 5=2x, so x=2.5, and 2.5>2 ✓
  3. At x=2.5: y=6-4\times2.5=-4
  4. Answer: (2.5,\ -4)

Question 18Challenge6 marks

A function f is given by

\begin{aligned}\mathrm{f}(x)&=ax^2+bx &&0\leqslant x\leqslant 4\\&=20-2x &&4<x\leqslant 10\end{aligned}

a and b are constants.

The two parts of the graph of y=\mathrm{f}(x) join where x=4

The graph passes through the point (2,\ 10)

The graph of y=\mathrm{f}(x) is shown.

(a)

Work out the value of a.

3 marks

(b)

Work out the value of b.

1 mark

(c)

Work out the range of f.

Give your answer as an inequality.

2 marks

Type powers with ^ and fractions with /, for example x^2 or (x+1)/3

Hint

Use the second part to find the y-coordinate where the parts join, then substitute both known points into ax^2+bx. Answer part (a) before attempting part (b).

Worked solution

Part (a)

  1. At x=4 the second part gives 20-2\times4=12, so the parts join at (4,\ 12)
  2. (4,\ 12): 16a+4b=12, so 4a+b=3
  3. (2,\ 10): 4a+2b=10, so 2a+b=5
  4. Subtract: 2a=-2
  5. Answer: a=-1

Part (b)

  1. Substitute a=-1 into 2a+b=5
  2. -2+b=5
  3. Answer: b=7

Part (c)

  1. 7x-x^2=\tfrac{49}{4}-(x-\tfrac72)^2, so the curve has its maximum \tfrac{49}{4}=12.25 at x=3.5
  2. x=3.5 is inside 0\leqslant x\leqslant 4, so the highest value is 12.25, not 12
  3. The lowest values are \mathrm{f}(0)=0 and \mathrm{f}(10)=0
  4. Answer: 0\leqslant \mathrm{f}(x)\leqslant \dfrac{49}{4}

Question 19Challenge6 marks

A function f is given by

\begin{aligned}\mathrm{f}(x)&=x^2+ax+b &&0\leqslant x\leqslant 5\\&=3x-11 &&x>5\end{aligned}

a and b are constants.

The first part of the graph of y=\mathrm{f}(x) has a turning point where x=3

The two parts of the graph join where x=5

(a)

Work out the value of a.

2 marks

(b)

Work out the value of b.

2 marks

(c)

Work out the equation of the tangent to the graph of y=\mathrm{f}(x) at the point where x=1

Give your answer in the form y=mx+c

2 marks

Type powers with ^ and fractions with /, for example x^2 or (x+1)/3

Hint

At a turning point the gradient is zero, so differentiate the first part. Answer part (a) before attempting part (b).

Worked solution

Part (a)

  1. For the first part, \dfrac{\mathrm{d}y}{\mathrm{d}x}=2x+a
  2. At the turning point the gradient is 0: 2\times3+a=0
  3. Answer: a=-6

Part (b)

  1. At x=5 the second part gives 3\times5-11=4
  2. First part at x=5: 25-30+b=4
  3. Answer: b=9

Part (c)

  1. \mathrm{f}(1)=1-6+9=4, so the point is (1,\ 4)
  2. Gradient: 2\times1-6=-4
  3. y-4=-4(x-1)
  4. Answer: y=-4x+8

Question 20Challenge6 marks

A function f is given by

\begin{aligned}\mathrm{f}(x)&=4-x &&x<1\\&=x^2+px+q &&1\leqslant x\leqslant 5\\&=2x-15 &&x>5\end{aligned}

p and q are constants.

The three parts of the graph of y=\mathrm{f}(x) join where x=1 and where x=5

A sketch of y=\mathrm{f}(x) is shown.

(a)

Work out the value of p.

2 marks

(b)

Work out the value of q.

1 mark

(c)

Solve \mathrm{f}(x)=-1

Give any non-integer answers to 2 decimal places.

3 marks

Give every value, separated by commas

Hint

Use each linear piece to find the y-coordinate of the joining point, then substitute both joining points into x^2+px+q

Worked solution

Part (a)

  1. At x=1 the first piece gives 4-1=3, so 1+p+q=3
  2. At x=5 the third piece gives 2\times5-15=-5, so 25+5p+q=-5
  3. Subtract the first equation from the second: 24+4p=-8
  4. 4p=-32, so p=-8

Part (b)

  1. Substitute p=-8 into 1+p+q=3
  2. 1-8+q=3
  3. q=10

Part (c)

  1. 4-x=-1 gives x=5, but this piece needs x<1, so reject.
  2. x^2-8x+10=-1 gives x^2-8x+11=0
  3. x=\dfrac{8\pm\sqrt{64-44}}{2}=\dfrac{8\pm\sqrt{20}}{2}=4\pm\sqrt5
  4. 4-\sqrt5=1.763\ldots is in 1\leqslant x\leqslant5 ✓; 4+\sqrt5=6.236\ldots is not, so reject.
  5. 2x-15=-1 gives x=7, which satisfies x>5 ✓
  6. x=1.76 or x=7