Tutorials › Calculus I › Critical Numbers of Piecewise-Defined Functions

Critical Points and Monotonicity · Tutorial 757 of 1495

Critical Numbers of Piecewise-Defined Functions

Find critical numbers within each formula’s interval, then test every joining point for continuity and differentiability.

Intermediate 10 min read

What You'll Learn

  • Apply the critical-number definition to points in a piecewise function’s domain.
  • Differentiate each formula only on the interval where it applies.
  • Keep branch-derived candidates only when they belong to the relevant interval.
  • Check continuity and one-sided derivatives at every included joining point.
  • Distinguish smooth joins, corners, and discontinuities when identifying critical numbers.

Why Joining Points Need Special Attention

A piecewise-defined function uses different formulas on different parts of its domain. Within each part, finding critical numbers usually means differentiating the applicable formula and solving for where its derivative is zero. But a change of formula creates another possibility: the derivative may fail to exist at the joining point itself.

To find all critical numbers, therefore, we need to check two kinds of locations: points inside the intervals where each formula applies, and joining points that belong to the domain. A join can be smooth, have a corner, or be discontinuous. These cases have different effects on differentiability.

Key idea: Differentiate each formula on its own interval, keep only solutions in that interval, and then check continuity and differentiability separately at every included join.

Critical Numbers and Piecewise Definitions

A number \(c\) is a critical number of a function \(f\) if \(c\) is in the domain of \(f\) and either \(f'(c)=0\) or \(f'(c)\) does not exist. The requirement that \(c\) be in the domain matters: a point where the function is undefined cannot be a critical number.

For functions whose domain includes endpoints, the ordinary derivative is a two-sided limit, so it may not exist at an endpoint. Such endpoints are often listed separately when considering candidates for extrema. Here, the main concern is a joining point inside the domain, where values from both sides can be checked.

Definition: A piecewise-defined function is specified by different formulas on different subsets of its domain. A joining point is a point where the applicable formula changes. A joining point is a critical number if it belongs to the domain and the derivative there is zero or does not exist.

Suppose a formula applies on an interval \(I\). Its derivative can produce candidate critical numbers only in \(I\), and only where the function is defined. A solution of \(f'(x)=0\) outside the interval on which that formula applies is not a candidate from that branch. After checking each interval, test every joining point that belongs to the domain: evaluate the function there, compare its one-sided limits, and, if it is continuous, compare the one-sided derivatives.

A Test for Differentiability at a Join

At an interior joining point \(c\), the derivative is defined by the two-sided difference quotient. The left-hand derivative uses values with \(x<c\), and the right-hand derivative uses values with \(x>c\). If these one-sided derivatives both exist as finite numbers, the ordinary derivative exists precisely when they are equal.

Theorem: Suppose \(f(c)\) is defined and the finite left-hand and right-hand derivatives at \(c\) exist. Then \(f'(c)\) exists if and only if those two one-sided derivatives are equal. If they are equal to \(L\), then \(f'(c)=L\).

Continuity must also be checked. Differentiability at \(c\) implies continuity there: if \(f'(c)\) exists, then

$$ f(x)-f(c) = (x-c)\frac{f(x)-f(c)}{x-c}. $$

As \(x\) approaches \(c\), the quotient on the right approaches the finite number \(f'(c)\), while \(x-c\) approaches zero. Their product therefore approaches zero, so \(f(x)\) approaches \(f(c)\). Thus, if a function is discontinuous at an included join, it cannot be differentiable there.

Conversely, continuity alone does not guarantee differentiability. A continuous join can still have different one-sided slopes. The following examples show how to apply both checks.

Worked Examples

Worked Example: A Smooth Joining Point

Find the critical numbers of

$$ f(x)= \begin{cases} x^2, & x\leq 1,\\ 2x-1, & x>1. \end{cases} $$

The first formula applies for \(x<1\), and the second for \(x>1\). Differentiate within those intervals:

$$ \frac{d}{dx}(x^2)=2x \qquad (x<1), \qquad \frac{d}{dx}(2x-1)=2 \qquad (x>1). $$

On the first interval, \(2x=0\) gives \(x=0\), and \(0<1\), so it is a valid candidate. On the second interval, the derivative is \(2\), which is never zero. Thus there are no other interior candidates from the branches.

Now check the join \(x=1\). Its function value comes from the first branch:

$$ f(1)=1^2=1. $$

The left-hand limit is \(1\), and the right-hand limit is \(2(1)-1=1\), so the function is continuous at the join. The one-sided derivatives are

$$ f'_-(1)=2(1)=2, \qquad f'_+(1)=2. $$

They agree, so \(f'(1)=2\). The join is not a critical number. The only critical number is \(x=0\). Check: \(f(0)=0\), and in a neighborhood of \(0\), \(f(x)=x^2\), whose derivative is \(2x\); hence \(f'(0)=0\), as required.

Worked Example: A Continuous Join with Different Slopes

Find the critical numbers of

$$ g(x)= \begin{cases} x^2, & x<0,\\ x, & x\geq 0. \end{cases} $$

For \(x<0\), \(g'(x)=2x\). Its only zero is \(x=0\), but that point is not in this branch’s interval. For \(x>0\), \(g'(x)=1\), which has no zeros. Neither branch therefore supplies an interior critical number.

The join \(x=0\) is in the domain, and \(g(0)=0\). The left-hand limit is \(0^2=0\), while the right-hand limit is \(0\), so \(g\) is continuous there. The one-sided derivatives are

$$ g'_-(0)=\lim_{h\to 0^-}\frac{h^2-0}{h} =\lim_{h\to 0^-}h=0, \qquad g'_+(0)=\lim_{h\to 0^+}\frac{h-0}{h}=1. $$

Because \(0\ne 1\), the derivative at the join does not exist. Since \(0\) belongs to the domain, it is a critical number. Check: the left and right difference quotients approach different values, so there is no two-sided derivative at \(0\). Thus the only critical number is \(x=0\).

Worked Example: A Discontinuous Joining Point

Find the critical numbers of

$$ h(x)= \begin{cases} x, & x<1,\\ x+1, & x\geq 1. \end{cases} $$

On \(x<1\), the derivative is \(1\), so it has no zeros there. On \(x>1\), the derivative is also \(1\), so this branch has no interior zeros either.

At \(x=1\), the function is defined by the second branch, so \(h(1)=2\). The left-hand limit is \(1\), but the right-hand limit is \(2\). The function is discontinuous at \(1\). Since differentiability implies continuity, \(h'(1)\) does not exist. The point \(1\) is in the domain, so it is a critical number. Check: neither branch has a zero derivative, and the only join is \(1\); consequently, the complete list is \(x=1\).

A Reliable Procedure

For a piecewise-defined function with finitely many formulas, use the following process. It separates ordinary branch calculations from the additional analysis required at joins.

1
Record the intervals and joins.
Note which formula applies on each interval and whether each joining point belongs to the domain.
2
Differentiate on each interval.
Use the derivative of that interval’s formula. Solve for zeros and keep only solutions lying in the interval where the formula applies.
3
Check each included join for continuity.
Compare the one-sided limits with the function’s value at the join. A discontinuous included join is a point where the derivative does not exist.
4
Compare one-sided derivatives at continuous joins.
If both are finite and equal, the derivative exists there. If they differ, the derivative does not exist, so the join is a critical number.
5
Combine and verify the candidates.
Include only points in the domain where the derivative is zero or does not exist. Check that no branch root was retained outside its valid interval.

Common Pitfall: Checking Slopes Without Checking Values

A tempting shortcut is to compare the slopes of the two formulas and treat that comparison as the entire join test. It is not enough. In the discontinuous example, both branches have slope \(1\), but the function jumps at \(x=1\). Equal slopes of the branch formulas do not establish that the function is differentiable at the join.

Correction: First check that the function is continuous at the join. If it is not, its derivative does not exist there. If it is continuous, compare the one-sided derivatives; only matching, finite one-sided derivatives give a derivative at the join.

A related mistake is to solve a branch’s derivative equation and keep every numerical solution. The branch formula is valid only on its stated interval. In the continuous-corner example, the equation \(2x=0\) gives \(x=0\) for the left branch, but that branch applies only when \(x<0\). The point is not a critical number because of that equation; it is critical because the derivative fails to exist at the join.

Why This Analysis Matters

A piecewise function can change its local behavior not only where a branch derivative becomes zero, but also where the formula changes. A smooth join contributes no critical number unless its derivative is zero. A corner or a jump can contribute one because the derivative does not exist, provided the joining point belongs to the domain.

This is why checking only the derivative formulas on open intervals can miss critical numbers. The complete analysis accounts for every interval and every included join, while respecting the domain and the exact condition in the definition.

Check Your Understanding

For each question, explain which branch or joining-point check is needed.

  1. Why must a solution of a branch’s derivative equation lie in the interval where that branch applies?
  2. What must be checked at a joining point before comparing one-sided derivatives?
  3. If a function is continuous at a join but the one-sided derivatives are unequal, what follows about the derivative there?
  4. Can an included discontinuous joining point be a critical number? Explain why.
  5. In the function \(q(x)=x^2\) for \(x<2\) and \(q(x)=3x-2\) for \(x\geq 2\), what two checks determine whether \(x=2\) is critical?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon