MathsReadCompetitive mathematics

Piecewise functions and domain restrictions

Build graphs from intervals, test endpoints, and distinguish corners from jumps and holes.

Core concepts and method

A piecewise function uses different expressions on different parts of its domain. Each x must receive at most one value. Overlapping conditions are only safe when their formulas agree where they overlap.

At a breakpoint c, compare the values approaching from the left and right. An included endpoint uses ≤ or ≥; an excluded endpoint uses < or > and is not automatically part of the function.

Continuity requires the two one-sided limits to agree with the actual function value. Differentiability is stronger: slopes must also agree. A V can be continuous but have a sharp corner.

Worked example

Build a ramp that stays at height 0 for x<0, rises with slope 2 until x=3, and remains at height 6 thereafter.

  1. Choose y=0 on x<0 and y=2x on 0≤x<3.
  2. Set y=6 when x≥3. The first junction has both limits 0; the second has both limits 6.
  3. Try x=−2, 0, 2, 3 and 4: the values are 0, 0, 4, 6 and 6. The graph is continuous but its slope changes at 0 and 3.

Try it yourself

Define f(x)=x+2 for x<1 and f(x)=4−x for x≥1. Is f continuous at x=1?

Show a hint

Compute the left limit and the value from the included right branch.

Check your reasoning

Both are 3, and f(1)=3. It is continuous but not differentiable because the slopes are +1 and −1.

Practice the technique

These competition questions use related mathematical ideas. You can check your answers as a guest; sign in to save your progress.

Experiment in the free graph calculator.

About the editorial approach · Report a mistake in this lesson

Continue learning