Tutorials › AP Calculus › Continuity Parameter Values in Piecewise Functions

Infinite Limits and Continuity · Tutorial 75 of 999

Continuity Parameter Values in Piecewise Functions

Use the continuity conditions at each joining point to form equations for unknown constants, solve them, and verify the one-sided limits and function values.

Intermediate 10 min read

What You'll Learn

  • Identify every joining point where a continuity condition must be imposed.
  • Translate continuity at a join into equations involving the piecewise parameters.
  • Solve simultaneous conditions from multiple joining points.
  • Check each solution using both one-sided limits and the function value.
  • Recognize when a parameter choice cannot make a piecewise function continuous.

Why continuity determines the parameters

A piecewise function can use a different formula on each part of its domain. At the point where two parts meet, the formulas must fit together if the whole function is to be continuous there. Unknown constants in those formulas can often be found by requiring that the left-hand limit, right-hand limit, and function value agree at every join.

The essential work is to treat each joining point separately. Write down what the function approaches from each side, identify the formula that actually defines the function at the point, and then impose equality. With more than one join, each point contributes its own condition.

Continuity condition at a join: A function \(f\) is continuous at \(x=c\) if and only if the left-hand limit and right-hand limit both exist as finite numbers and \[ \lim_{x\to c^-}f(x)=\lim_{x\to c^+}f(x)=f(c). \]

In this tutorial, the unknown constants appear in the formulas defining \(f\). The conditions above turn continuity into equations for those constants. Solving the equations finds candidate values; checking each limit and the function value confirms whether those values work.

How to translate a join into an equation

Suppose the formula to the left of \(c\) is \(L(x)\), and the formula to the right is \(R(x)\). If the left-hand and right-hand limits exist, continuity at \(c\) requires both limits to equal the value assigned at \(c\). The branch containing the equality sign tells you which formula supplies \(f(c)\), but it does not change either one-sided limit.

When each branch formula is continuous up to the relevant side of the boundary, the one-sided limits can be found by substituting \(c\) into those formulas. For example, if \(x<c\) uses \(L(x)\), then \(\lim_{x\to c^-}f(x)=\lim_{x\to c^-}L(x)\). Do not substitute into a formula outside its branch or confuse the value at the point with a limit from one side.

1
List the joining points.
Every boundary between adjacent pieces is a possible point where continuity must be checked.
2
Find both one-sided limits.
Use the formula valid on each side and evaluate its limit as \(x\) approaches the boundary.
3
Find the function value.
Use the branch that includes the boundary point.
4
Set the quantities equal and solve.
Repeat at every join, then check the resulting parameter values in all three quantities.

Worked Example: One unknown at one join

Worked Example: One unknown at one join

Find \(a\) so that the function is continuous at \(x=2\):

$$ f(x)= \begin{cases} x^2+1, & x<2,\\ ax+3, & x\ge 2. \end{cases} $$

For the left-hand limit, use the first branch. As \(x\) approaches 2 from below, \(x^2+1\) approaches \(2^2+1=5\). Thus \(\lim_{x\to2^-}f(x)=5\).

For the right-hand limit, use the second branch. As \(x\) approaches 2 from above, \(ax+3\) approaches \(2a+3\). The point \(x=2\) is included in this branch, so \(f(2)=2a+3\) as well.

Continuity requires the left-hand limit to equal the right-hand limit and the function value. Therefore, solve:

$$ 5=2a+3 \qquad\Longrightarrow\qquad 2=2a \qquad\Longrightarrow\qquad a=1. $$

Check: With \(a=1\), the left-hand limit is \(5\), the right-hand limit is \(2(1)+3=5\), and the function value is \(f(2)=2(1)+3=5\). All three agree, so the function is continuous at \(x=2\).

More than one join means more than one condition

A piecewise function with three branches usually has two joining points. Continuity at the first join gives one condition, and continuity at the second gives another. If the same unknowns appear in both conditions, solve them as a system rather than treating the joins independently.

Worked Example: Two parameters and two joining points

Find \(a\) and \(b\) so that \(f\) is continuous at both \(x=0\) and \(x=2\):

$$ f(x)= \begin{cases} x^2+1, & x<0,\\ ax+b, & 0\le x<2,\\ 3x, & x\ge2. \end{cases} $$

At \(x=0\): From the left, \(x^2+1\) approaches \(1\). From the right, \(ax+b\) approaches \(b\). Since the middle branch includes \(0\), the function value is \(f(0)=b\). Continuity at zero therefore requires \(1=b\), so \(b=1\).

At \(x=2\): From the left, the middle branch approaches \(2a+b\). From the right, the last branch approaches \(3(2)=6\). Since the last branch includes \(2\), \(f(2)=3(2)=6\). Continuity at two requires \(2a+b=6\).

Substitute \(b=1\) into the second condition:

$$ 2a+1=6 \qquad\Longrightarrow\qquad 2a=5 \qquad\Longrightarrow\qquad a=\frac{5}{2}. $$

Check at \(x=0\): The left-hand limit is \(1\). The right-hand limit is \(a(0)+b=0+1=1\). Also, \(f(0)=1\).

Check at \(x=2\): The left-hand limit is \(2a+b=2\left(\frac52\right)+1=5+1=6\). The right-hand limit is \(3(2)=6\), and \(f(2)=6\). Both joins satisfy the continuity condition.

Why matching the limits is the right test

The one-sided limits describe the values of the function arbitrarily close to the boundary from each side. A two-sided limit at \(c\) exists exactly when those one-sided limits exist and are equal. Continuity additionally requires that this common limit equal the actual value \(f(c)\). This explains why parameter equations must match all three quantities, not just the two formulas’ outputs at a convenient nearby point.

For piecewise formulas whose relevant one-sided limits can be evaluated, the condition can be expressed directly as equations. At a boundary \(c\), if the left and right expressions are \(L(x)\) and \(R(x)\), the conditions are:

$$ \lim_{x\to c^-}L(x) = \lim_{x\to c^+}R(x) = f(c). $$

This criterion is both necessary and sufficient. If \(f\) is continuous at \(c\), its limit equals \(f(c)\); approaching from either side must therefore give that same value. Conversely, if both one-sided limits exist and equal \(f(c)\), the two-sided limit exists with value \(f(c)\), which is precisely continuity at \(c\).

Worked Example: A rational branch and two joins

Worked Example: A rational branch and two joins

Find \(a\) and \(b\) so that the function below is continuous at \(x=1\) and \(x=3\):

$$ f(x)= \begin{cases} \dfrac{x^2-1}{x-1}, & x<1,\\ ax+b, & 1\le x<3,\\ 2x+1, & x\ge3. \end{cases} $$

At \(x=1\): The left branch is defined for \(x<1\), so its limit is evaluated as \(x\) approaches 1, not by substituting \(x=1\) into the original fraction. For \(x\ne1\), factor the numerator and simplify:

$$ \frac{x^2-1}{x-1} = \frac{(x-1)(x+1)}{x-1} = x+1. $$

Therefore the left-hand limit at 1 is \(1+1=2\). The middle branch gives the right-hand limit \(a+b\), and it also defines \(f(1)=a+b\). Continuity at 1 requires \(a+b=2\).

At \(x=3\): The middle branch approaches \(3a+b\) from the left. The last branch approaches \(2(3)+1=7\) from the right, and it defines \(f(3)=7\). Continuity at 3 requires \(3a+b=7\).

Solve the two equations. Subtract the first equation from the second:

$$ (3a+b)-(a+b)=7-2 \qquad\Longrightarrow\qquad 2a=5 \qquad\Longrightarrow\qquad a=\frac52. $$

Substitute this value into \(a+b=2\):

$$ \frac52+b=2 \qquad\Longrightarrow\qquad b=2-\frac52=-\frac12. $$

Check at \(x=1\): The left-hand limit is \(2\). The middle branch gives \(a+b=\frac52-\frac12=2\), so the right-hand limit and \(f(1)\) are both \(2\).

Check at \(x=3\): The left-hand limit is \(3a+b=3\left(\frac52\right)-\frac12=\frac{15}{2}-\frac12=\frac{14}{2}=7\). The right-hand limit is \(2(3)+1=7\), and \(f(3)=7\). The function is continuous at both joins.

Common mistake: substituting into a formula that is undefined

In the last example, a tempting but incorrect calculation is to substitute \(x=1\) into the left-hand fraction and claim that the limit is \(0/0\), so continuity cannot be achieved. The expression \(\frac{0}{0}\) is undefined, but that does not determine the limit. A limit concerns values near the point, and the fraction simplifies to \(x+1\) for \(x\ne1\). Its left-hand limit is \(2\).

Correction: Use the formula on the relevant side and evaluate its limit. Do not require a branch expression to be defined at the boundary if that boundary is excluded from its interval.

When the conditions cannot be satisfied

Not every piecewise function can be made continuous by choosing its parameters. If the required equations contradict each other, there is no parameter choice that produces continuity at all the specified joins. It is important to report that conclusion rather than forcing a value from just one of the conditions.

Worked Example: A boundary that no parameter can repair

Can any value of \(a\) make the following function continuous at \(x=0\)?

$$ f(x)= \begin{cases} x+1, & x<0,\\ ax+2, & x\ge0. \end{cases} $$

From the left, \(x+1\) approaches \(1\), so \(\lim_{x\to0^-}f(x)=1\). From the right, \(ax+2\) approaches \(2\), regardless of \(a\), since \(a(0)+2=2\). The second branch includes zero, so \(f(0)=2\).

Continuity would require \(1=2\), which is false. The parameter \(a\) cannot change either one-sided limit at zero. Therefore, no value of \(a\) makes the function continuous there.

Check: For every real \(a\), the one-sided limits remain \(1\) and \(2\), while the function value remains \(2\). The disagreement persists for all choices of \(a\).

A reliable final check

After solving the equations, verify each join from the original piecewise definition. For every boundary \(c\), record the left-hand limit, the right-hand limit, and \(f(c)\). A solution is valid only if all three are finite and equal at every join being tested. Also check that the formulas themselves are defined on the intervals where they are used; continuity equations at joins do not fix a formula that is undefined elsewhere in its stated domain.

Key takeaway: Each joining point contributes a continuity condition. Find both one-sided limits, use the correct branch for the function value, solve the resulting equations together, and check all three quantities at every join.

Check Your Understanding

For each question, set up the continuity conditions before solving or deciding whether a solution exists.

  1. Find \(k\) so that \(f(x)=x+4\) for \(x<2\) and \(f(x)=kx\) for \(x\ge2\) is continuous at \(x=2\).
  2. For \(f(x)=x^2\) when \(x<1\) and \(f(x)=ax+b\) when \(x\ge1\), what equation must \(a\) and \(b\) satisfy for continuity at \(x=1\)?
  3. Find \(a\) and \(b\) so that \(f(x)=2x+1\) for \(x<0\), \(f(x)=ax+b\) for \(0\le x<2\), and \(f(x)=x+5\) for \(x\ge2\) is continuous at both joins.
  4. Why is substituting the boundary into a branch that excludes that boundary not necessarily a valid way to find the one-sided limit?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: 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