Tutorials › Calculus I › Choosing Parameters to Join Piecewise Formulas

Continuity and the Intermediate Value Theorem · Tutorial 267 of 1495

Choosing Parameters to Join Piecewise Formulas

Use continuity conditions at each breakpoint to form equations for unknown parameters, solve them, and determine whether a continuous choice exists.

Beginner 10 min read

What You'll Learn

  • Identify the one-sided limits and defined function value that must agree at a breakpoint.
  • Translate continuity requirements into equations for unknown parameters.
  • Solve and verify parameter equations at one or more breakpoints.
  • Recognize when the conditions leave choices open or have no solution.
  • Avoid confusing a branch’s limiting value with the value assigned at the breakpoint.

Why Choose Parameters at a Join?

Piecewise formulas can describe different rules on different parts of the real line. Their parameters can be chosen so the formulas meet continuously at a boundary. The task is to determine which values make that happen, rather than to assume that the formulas automatically agree.

At a breakpoint, continuity requires more than a visual impression that two formulas “meet.” The limit from the left, the limit from the right, and the function’s defined value must all agree. These requirements become equations in the unknown parameters.

Key idea: At every breakpoint, write down the one-sided limits and the function value. Equate them as required for continuity, solve the resulting equations, and check that the chosen parameters satisfy every condition.

Turning Continuity into an Equation

Recall the continuity criterion at a point \(c\): the function must be defined at \(c\), its left-hand and right-hand limits at \(c\) must exist as finite numbers, and both limits must equal \(f(c)\). This tutorial uses that criterion to find parameters in the branch formulas.

For example, suppose the function is defined by \(g(x)\) for \(x<c\) and by \(h(x)\) for \(x\ge c\). The value at the breakpoint is supplied by the second branch, so \(f(c)=h(c)\). If the branch formulas have finite limits there, continuity requires

$$ \lim_{x\to c^-}g(x)=h(c) \qquad\text{and}\qquad \lim_{x\to c^+}h(x)=h(c). $$

If \(g\) and \(h\) are continuous formulas at \(c\), these conditions reduce to \(g(c)=h(c)\). This substitution is justified only when the relevant branch formulas are defined and continuous at the breakpoint. If the formula has a hole or an unbounded behavior there, evaluate its one-sided limit instead of substituting automatically.

The choice of which branch includes \(c\) matters because it determines \(f(c)\). The one-sided limit from the branch that does not include \(c\) still matters, even though that branch does not assign the function value at \(c\).

A Short Derivation of the Matching Rule

Here is why the matching equations express exactly the continuity requirement. Suppose \(f(x)=g(x)\) for \(x<c\) and \(f(x)=h(x)\) for \(x\ge c\), and assume both branch expressions have finite limits at \(c\). Since the second branch includes \(c\), \(f(c)=h(c)\). The left-hand limit is determined by \(g\), and the right-hand limit is determined by \(h\). Therefore the continuity criterion says that \(f\) is continuous at \(c\) precisely when

$$ \lim_{x\to c^-}g(x)=h(c) \qquad\text{and}\qquad \lim_{x\to c^+}h(x)=h(c). $$

In the common case where \(h\) is continuous at \(c\), its right-hand limit equals \(h(c)\) already. The remaining condition is then that the left-hand limit of \(g\) equal \(h(c)\). If \(g\) is also continuous at \(c\), this is simply \(g(c)=h(c)\). Thus equating the branch values is not a separate rule: it follows from the continuity criterion and the value assigned at the breakpoint.

Worked Examples

Worked Example: Choosing One Parameter at a Breakpoint

Choose \(k\) so that the function

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

is continuous at \(x=1\).

The second branch includes \(x=1\), so first compute the function value:

$$ f(1)=2(1)+1=3. $$

The left-hand limit comes from the first branch. Substituting \(x=1\) in that polynomial gives

$$ \lim_{x\to1^-}f(x)=1^2+k=1+k. $$

The right-hand limit comes from the second branch:

$$ \lim_{x\to1^+}f(x)=2(1)+1=3. $$

For continuity, both one-sided limits must equal \(f(1)=3\). The right-hand condition already holds, and the left-hand condition gives

$$ 1+k=3, \qquad k=2. $$

Check: with \(k=2\), the left-hand limit is \(1+2=3\), the right-hand limit is \(3\), and the defined value is \(f(1)=3\). All three agree, so \(f\) is continuous at \(1\).

Worked Example: Matching Three Pieces at Two Breakpoints

Find \(a\) and \(b\) so that

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

is continuous at both breakpoints, \(x=0\) and \(x=2\).

At \(x=0\), the middle branch includes the breakpoint. Its value is \(f(0)=a(0)+b=b\). The left-hand limit is given by the first branch:

$$ \lim_{x\to0^-}f(x)=0^2+1=1. $$

The right-hand limit comes from the middle branch and equals \(a(0)+b=b\). Continuity at zero therefore requires \(1=b\), so \(b=1\).

At \(x=2\), the third branch includes the breakpoint. The defined value is

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

The left-hand limit uses the middle branch, giving \(2a+b\). The right-hand limit uses the last branch, giving \(2^2+1=5\). Continuity at two requires

$$ 2a+b=5. $$

Substitute \(b=1\):

$$ 2a+1=5, \qquad 2a=4, \qquad a=2. $$

Check at zero: the left-hand limit is \(1\), the middle-branch value is \(b=1\), and the right-hand limit is \(1\). Check at two: the middle-branch limit is \(2(2)+1=5\), the defined value is \(5\), and the right-hand limit is \(5\). Thus \(a=2\) and \(b=1\) make the function continuous at both breakpoints.

Worked Example: A Constraint That Leaves More Than One Choice

Find all pairs \(a,b\) that make

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

continuous at \(x=1\), and then find the pair satisfying the additional condition \(a+b=5\).

The second branch supplies \(f(1)\):

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

The left-hand limit is the value approached by the first branch:

$$ \lim_{x\to1^-}f(x)=a(1)+2=a+2. $$

The right-hand limit is

$$ \lim_{x\to1^+}f(x)=1^2+b=1+b. $$

Continuity requires the left-hand limit to equal the defined value, so

$$ a+2=1+b, \qquad a-b=-1. $$

This is one equation in two unknowns, so it does not determine a unique pair. It describes every continuous choice: \(a=b-1\). Apply the additional condition \(a+b=5\). Substituting \(a=b-1\) gives

$$ (b-1)+b=5, \qquad 2b=6, \qquad b=3. $$

Then \(a=b-1=2\). Check: the left-hand limit is \(2+2=4\), and the right-hand limit and defined value are \(1+3=4\). The extra condition also holds, since \(2+3=5\).

Several Breakpoints Mean Several Conditions

For a function with three pieces and two breakpoints, continuity must be checked separately at each breakpoint. Each check compares the appropriate branch limits with the value assigned there. Do not compare only the first and last formulas: the middle formula participates in the join at each of its endpoints.

The resulting equations may have:

  • a unique solution, as in the three-piece example;
  • many solutions, if the continuity conditions do not determine every parameter; or
  • no solution, if the conditions contradict one another.

When there are several parameters, count the independent equations as well as the unknowns. The count is useful for anticipating whether a unique choice is possible, but it does not by itself establish existence or uniqueness. Solve the equations and check their consistency.

Common Pitfall: Ignoring the Defined Value

A frequent error is to match the two one-sided limits but forget to check that they equal the function’s actual value at the breakpoint. Here is a concrete example:

$$ f(x)= \begin{cases} x, & x<0,\\ k, & x=0,\\ x, & x>0. \end{cases} $$

Both one-sided limits at zero equal \(0\). But if \(k=4\), then \(f(0)=4\), so the limits do not equal the function value and the function is not continuous there. Continuity requires \(k=0\).

Correction: At every breakpoint, check all three quantities: the left-hand limit, the right-hand limit, and the defined value. Equal one-sided limits alone do not guarantee continuity if the assigned value differs.

A related mistake is to substitute the breakpoint into a branch that is not defined there without checking that its formula has a finite limit. In the examples above, the branch formulas were polynomials, so their limits could be found by substitution. In general, use the one-sided limits specified by the continuity criterion, and do not assume they equal a direct substitution when that substitution is not valid.

Why the Method Is Useful

Choosing parameters to join formulas is a practical way to design a function with a desired behavior. It appears when different formulas are used in different ranges, but a sharp break at the boundary would be undesirable. The equations make the design requirement precise and expose whether the chosen family of formulas can meet it.

The method also encourages a reliable habit: treat each breakpoint as its own continuity problem. Write the value at the point first, identify which branch supplies each one-sided limit, then form and solve the equations. This keeps the branch definitions, rather than an informal picture, in control of the reasoning.

Check Your Understanding

For each question, identify the needed continuity conditions before solving.

  1. For \(f(x)=x+k\) when \(x<2\) and \(f(x)=3x-1\) when \(x\ge2\), what value of \(k\) makes \(f\) continuous at \(2\)?
  2. In a piecewise definition with \(x<c\) in the first branch and \(x\ge c\) in the second, which branch determines \(f(c)\)?
  3. For a function with two breakpoints and unknown parameters, why must continuity be checked separately at both points?
  4. Can matching the two one-sided limits be sufficient if the defined value at the breakpoint differs from them? Explain.
  5. What does it mean for the continuity equations to have many solutions, and what does it mean for them to have no solution?

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