Limits of Piecewise Functions: Steps and Examples

#Calculus
TL;DR
At a break point, compare the left and right pieces: equal one-sided limits mean the limit exists. This guide covers limits of piecewise functions, missing constants, absolute value cases and six examples.
BT
Bhanzu TeamLast updated on October 11, 202614 min read

What Is The Limit Of A Piecewise Function?

The limit of a piecewise function at x=ax = a is the value the function approaches as xx gets close to aa, worked out from whichever piece (or pieces) apply near aa. Away from a break point only one piece matters. At a break point, the xx-value where one formula hands over to the next, a different piece acts on each side, so you have to check both sides separately.

The rule that decides every case is the one-sided limit test:

lim⁡x→af(x)=Lexactly whenlim⁡x→a−f(x)=L  and  lim⁡x→a+f(x)=L\lim_{x \to a} f(x) = L \quad \text{exactly when} \quad \lim_{x \to a^{-}} f(x) = L \ \text{ and } \ \lim_{x \to a^{+}} f(x) = L

Here x→a−x \to a^{-} means xx approaches aa through values smaller than aa (the left-hand limit), and x→a+x \to a^{+} means through values larger than aa (the right-hand limit). OpenStax states the same result as Theorem 2.2 in Calculus Volume 1, Section 2.2.

This article is about the limits, not the functions themselves. For reading the notation, graphing pieces and evaluating ff at a point, start with piecewise functions. For the general idea of a limit, see limit of a function.

How Do Limits Behave For Piecewise Functions At Specific Points?

That Physics Forums thread title asks the right question, and the answer splits into two cases. If aa is not a break point, only one piece applies on both sides of aa, so the limit is just the limit of that piece. If aa is a break point, the left and right pieces can disagree, and that is where every interesting question lives.

For a point away from any break, find the piece whose condition covers a small open interval around aa, then evaluate that piece's limit. For polynomial pieces, direct substitution works. Take

f(x)={x2−1,x<2 4x−5,x≥2f(x) = \begin{cases} x^2 - 1, & x < 2 \ 4x - 5, & x \geq 2 \end{cases}

At x=−1x = -1 only the first piece is in play, so lim⁡x→−1f(x)=(−1)2−1=0\lim_{x \to -1} f(x) = (-1)^2 - 1 = 0. At x=3x = 3 only the second piece is in play, so the limit is 4(3)−5=74(3) - 5 = 7.

How Do You Find The Limit At A Break Point?

At a break point, compute the left-hand limit with the left piece and the right-hand limit with the right piece, then compare. The steps are always the same:

  1. Locate the break. Read the conditions and find the xx-value where the formula changes.

  2. Assign the pieces. Decide which formula covers values just below aa and which covers values just above aa. The point aa itself can belong to either piece, and that choice does not affect the limit.

  3. Take the left-hand limit using only the left piece.

  4. Take the right-hand limit using only the right piece.

  5. Compare. If the two one-sided limits are equal, that common value is the limit. If they differ, the two-sided limit does not exist.

A Quora reader asks this in one line: "If the right hand limit and left hand limit for a piecewise function are not equal, do limits at that point exist?" The two one-sided limits still exist separately and can be reported. Only the two-sided limit fails. On a graph, that disagreement is a jump discontinuity.

Does The Function's Value At The Break Point Change The Limit?

No. The limit describes the heights near aa, not the height at aa. A Quora question captures the confusion well: "If a limit of a piecewise function approaches the same value of y from both sides of x, but at f(x), the value of y is different, does the limit exist?" Yes, it does.

Piecewise definitions make this easy to build on purpose. For example:

g(x)={x2,x≠1 5,x=1g(x) = \begin{cases} x^2, & x \neq 1 \ 5, & x = 1 \end{cases}

Both sides approach 12=11^2 = 1, so lim⁡x→1g(x)=1\lim_{x \to 1} g(x) = 1, even though g(1)=5g(1) = 5. The limit exists, but gg is not continuous at 1. This mismatch is a removable discontinuity: redefine one point and the break disappears.

How Do You Find A Constant That Makes A Piecewise Function Continuous?

To find a missing constant, set the left-hand limit equal to the right-hand limit at the break point and solve. Brainly titles like "Find the value of k which makes the following piecewise function continuous for all values of x" are exactly this problem. One thing changes the setup: whether the question asks for the limit to exist, or for the function to be continuous.

  • "Make the limit exist": you only need the left-hand limit to equal the right-hand limit.

  • "Make the function continuous": you also need that common value to equal f(a)f(a), as in continuity of a function.

When the point aa belongs to one of the two pieces (the usual setup, with ≤\leq or ≥\geq in a condition), f(a)f(a) is automatically that piece's value, so matching the two one-sided limits is enough. When f(a)f(a) is defined by a separate line, it needs its own check.

With two unknown constants you need two equations. That usually means two break points, and each break point gives one equation. Example 5 below works through one.

How Do Absolute Value And Greatest Integer Functions Fit In?

Absolute value and greatest integer functions are piecewise functions in disguise, so their limits use exactly the same method. Rewrite them in pieces first, then take one-sided limits.

  • Absolute value. Since ∣x−3∣=−(x−3)\lvert x - 3 \rvert = -(x - 3) for x<3x < 3 and x−3x - 3 for x≥3x \geq 3, the quotient ∣x−3∣x−3\frac{\lvert x - 3 \rvert}{x - 3} equals −1-1 on the left and 11 on the right. Its limit at 3 does not exist. See absolute value functions for the graph.

  • Greatest integer (floor). ⌊x⌋\lfloor x \rfloor is constant between integers and jumps at each integer. At x=2x = 2, the left-hand limit is 1 and the right-hand limit is 2, so the limit does not exist. At x=2.5x = 2.5, it is simply 2. The greatest integer function page has the full staircase graph.

The second-guesser often stalls here, convinced that these "aren't really piecewise". Writing the cases out by hand removes the doubt in one line.

Examples Of Limits Of Piecewise Functions

Example 1

For f(x)=x2−1f(x) = x^2 - 1 when x<2x < 2 and f(x)=4x−5f(x) = 4x - 5 when x≥2x \geq 2, find lim⁡x→2f(x)\lim_{x \to 2} f(x).

Left piece:

lim⁡x→2−(x2−1)=4−1=3\lim_{x \to 2^{-}} (x^2 - 1) = 4 - 1 = 3

Right piece:

lim⁡x→2+(4x−5)=8−5=3\lim_{x \to 2^{+}} (4x - 5) = 8 - 5 = 3

Both one-sided limits equal 3.

Final answer: lim⁡x→2f(x)=3\lim_{x \to 2} f(x) = 3 (and since f(2)=3f(2) = 3, ff is also continuous at 2).

Example 2

For f(x)=x+3f(x) = x + 3 when x<1x < 1 and f(x)=x2+1f(x) = x^2 + 1 when x≥1x \geq 1, find lim⁡x→1f(x)\lim_{x \to 1} f(x).

The tempting move is to look up which piece owns x=1x = 1, see the ≥\geq sign, and substitute into x2+1x^2 + 1.

f(1)=12+1=2so the limit is 2?f(1) = 1^2 + 1 = 2 \quad \text{so the limit is } 2\text{?}

Check the left side before trusting that. Values like x=0.99x = 0.99 use the other formula, x+3x + 3, which gives about 3.993.99, nowhere near 2. The answer of 2 only described the right side.

The correct method takes each side with its own piece:

lim⁡x→1−(x+3)=4\lim_{x \to 1^{-}} (x + 3) = 4

lim⁡x→1+(x2+1)=2\lim_{x \to 1^{+}} (x^2 + 1) = 2

The one-sided limits differ.

Final answer: lim⁡x→1f(x)\lim_{x \to 1} f(x) does not exist. (The left-hand limit is 4, the right-hand limit is 2, and f(1)=2f(1) = 2.)

Example 3

For g(x)=x2−9x−3g(x) = \frac{x^2 - 9}{x - 3} when x≠3x \neq 3 and g(3)=2g(3) = 2, find lim⁡x→3g(x)\lim_{x \to 3} g(x).

Near 3 (but not at 3) only the first rule applies. Factor and cancel:

x2−9x−3=(x−3)(x+3)x−3=x+3,x≠3\frac{x^2 - 9}{x - 3} = \frac{(x - 3)(x + 3)}{x - 3} = x + 3, \quad x \neq 3

lim⁡x→3(x+3)=6\lim_{x \to 3} (x + 3) = 6

Final answer: lim⁡x→3g(x)=6\lim_{x \to 3} g(x) = 6, even though g(3)=2g(3) = 2.

Example 4

For h(x)=x2−x−2x−2h(x) = \frac{x^2 - x - 2}{x - 2} when x<2x < 2 and h(x)=x+7h(x) = \sqrt{x + 7} when x≥2x \geq 2, find lim⁡x→2h(x)\lim_{x \to 2} h(x).

The left piece gives 00\frac{0}{0} on direct substitution, so simplify first:

x2−x−2x−2=(x−2)(x+1)x−2=x+1\frac{x^2 - x - 2}{x - 2} = \frac{(x - 2)(x + 1)}{x - 2} = x + 1

lim⁡x→2−(x+1)=3\lim_{x \to 2^{-}} (x + 1) = 3

Right piece:

lim⁡x→2+x+7=9=3\lim_{x \to 2^{+}} \sqrt{x + 7} = \sqrt{9} = 3

Final answer: lim⁡x→2h(x)=3\lim_{x \to 2} h(x) = 3. Since h(2)=9=3h(2) = \sqrt{9} = 3 as well, hh is continuous at 2.

The first instinct on this one is to stop at 00\frac{0}{0} and write "does not exist". A 00\frac{0}{0} result is a signal to simplify, not an answer.

Example 5

Find aa and bb so that ff is continuous everywhere, where f(x)=ax+1f(x) = ax + 1 for x<1x < 1, f(x)=x2+bf(x) = x^2 + b for 1≤x<31 \leq x < 3, and f(x)=2x+5f(x) = 2x + 5 for x≥3x \geq 3.

Each piece is a polynomial, so only the break points x=1x = 1 and x=3x = 3 need checking.

At x=3x = 3, the left piece is x2+bx^2 + b and the right piece is 2x+52x + 5:

lim⁡x→3−(x2+b)=9+b\lim_{x \to 3^{-}} (x^2 + b) = 9 + b

lim⁡x→3+(2x+5)=11\lim_{x \to 3^{+}} (2x + 5) = 11

9+b=119 + b = 11

b=2b = 2

At x=1x = 1, the left piece is ax+1ax + 1 and the right piece is x2+bx^2 + b:

lim⁡x→1−(ax+1)=a+1\lim_{x \to 1^{-}} (ax + 1) = a + 1

lim⁡x→1+(x2+2)=3\lim_{x \to 1^{+}} (x^2 + 2) = 3

a+1=3a + 1 = 3

a=2a = 2

Final answer: a=2a = 2 and b=2b = 2. (Solving the break point with only one unknown first saves a step.)

Example 6

Find lim⁡x→2x2−4∣x−2∣\lim_{x \to 2} \frac{x^2 - 4}{\lvert x - 2 \rvert}.

Rewrite the absolute value in pieces. For x<2x < 2, ∣x−2∣=−(x−2)\lvert x - 2 \rvert = -(x - 2):

(x−2)(x+2)−(x−2)=−(x+2)\frac{(x - 2)(x + 2)}{-(x - 2)} = -(x + 2)

lim⁡x→2−(−(x+2))=−4\lim_{x \to 2^{-}} \left(-(x + 2)\right) = -4

For x>2x > 2, ∣x−2∣=x−2\lvert x - 2 \rvert = x - 2:

(x−2)(x+2)x−2=x+2\frac{(x - 2)(x + 2)}{x - 2} = x + 2

lim⁡x→2+(x+2)=4\lim_{x \to 2^{+}} (x + 2) = 4

Final answer: The limit does not exist (the left-hand limit is −4-4 and the right-hand limit is 44).

Why Do Limits Of Piecewise Functions Matter?

Limits of piecewise functions matter because real rules change at thresholds, and the limit is the tool that tells you whether the outcome jumps when you cross one. In short, the limit at a break point decides whether a rule is fair at the boundary. A formula that changes at a threshold can still give a smooth outcome, but only if the pieces agree there.

  • Fair tax schedules. For tax year 2025, a single filer pays 10% on taxable income up to 11,925 dollars and 12% on the next band, up to 48,475 dollars. Written as tax owed, T(x)=0.10xT(x) = 0.10x for 0≤x≤11,9250 \leq x \leq 11{,}925 and T(x)=1192.50+0.12(x−11,925)T(x) = 1192.50 + 0.12(x - 11{,}925) above it. Both pieces give 1,192.50 dollars at the boundary, so TT is continuous there and earning more never lowers your take-home pay.

  • Derivatives at a corner. Whether a piecewise function has a slope at its break point is decided by comparing one-sided limits of the difference quotient, the same move used throughout this article. That is the route into differentiability of a function.

  • Models that switch regimes. A spring that stiffens past a certain stretch, or a pricing plan that changes per-unit cost after a usage cap: the model is safe to use across the threshold only if its limit from each side matches.

The tax example is worth a second look, because it is the cleanest real case of "limit exists, rate does not". The tax owed has a corner at 11,925 dollars, not a jump. In calculus terms, that is a continuous function whose derivative (the marginal rate) has a jump.

Common Errors When Working With Limits Of Piecewise Functions

Almost every lost mark comes from using the wrong piece on one side of a break point. These three errors cover most of them.

Mistake 1: Using The Piece That Owns The Point For Both Sides

Where it slips in:

Any break point where one condition uses ≥\geq or ≤\leq, so one piece "owns" x=ax = a.

Don't do this:

Do not substitute aa into the owning piece and call that the limit. That gives f(a)f(a), which may not even match the other side.

The correct way:

Take the left-hand limit with the left piece and the right-hand limit with the right piece, whoever owns the point.

The rusher makes this one: they spot the ≥\geq, plug in, and move on without noticing the other side ever existed. The habit that fixes it is writing both one-sided limits as two separate lines before computing either one.

Mistake 2: Treating "The Limit Exists" As "The Function Is Continuous"

Where it slips in:

Problems where f(a)f(a) is defined by a separate line, such as g(3)=2g(3) = 2 in Example 3.

Don't do this:

Do not conclude "continuous at 3" just because both one-sided limits agree.

The correct way:

Continuity needs three things: the limit exists, f(a)f(a) is defined, and they are equal. A matching pair of one-sided limits only proves the first.

The memorizer is most likely to blur these: they have learned "left equals right means good" as a single rule, and never separated the limit question from the continuity question.

Mistake 3: Stopping At 0/0 Inside A Piece

Where it slips in:

Rational pieces, such as the left piece in Example 4.

Don't do this:

Do not write "undefined, so the limit does not exist" after direct substitution returns 00\frac{0}{0}.

The correct way:

Factor and cancel (or rationalise), then take the one-sided limit of the simplified piece. 00\frac{0}{0} is an indeterminate form, not a verdict.

Mistake 1 has a famous real-world twin. Many people believe that moving into a higher tax bracket taxes their whole income at the higher rate, which is the "use one piece for everything" error. The IRS explains that the higher rate applies only to the income inside the new bracket. Each band of income uses its own piece, just as each side of a break point does.

Practice Problems On Limits Of Piecewise Functions

  1. For f(x)=3x−2f(x) = 3x - 2 when x<4x < 4 and f(x)=x2−6f(x) = x^2 - 6 when x≥4x \geq 4, find lim⁡x→4f(x)\lim_{x \to 4} f(x).

  2. For f(x)=x2f(x) = x^2 when x<−1x < -1 and f(x)=2x+5f(x) = 2x + 5 when x≥−1x \geq -1, find both one-sided limits at x=−1x = -1. Does the limit exist?

  3. Find kk so that f(x)=kx−1f(x) = kx - 1 for x<2x < 2 and f(x)=x2+kf(x) = x^2 + k for x≥2x \geq 2 is continuous at x=2x = 2.

  4. For f(x)=x2+x−6x−2f(x) = \frac{x^2 + x - 6}{x - 2} when x≠2x \neq 2 and f(2)=1f(2) = 1, find lim⁡x→2f(x)\lim_{x \to 2} f(x). Is ff continuous at 2?

  5. Let f(x)=⌊x⌋+⌊−x⌋f(x) = \lfloor x \rfloor + \lfloor -x \rfloor. Find lim⁡x→3f(x)\lim_{x \to 3} f(x) and compare it with f(3)f(3).

Answer to Problem 1: Both one-sided limits equal 10 (3(4)−2=103(4) - 2 = 10 and 16−6=1016 - 6 = 10), so the limit is 10.

Answer to Problem 2: The left-hand limit is 1 and the right-hand limit is 3, so the limit does not exist.

Answer to Problem 3: 2k−1=4+k2k - 1 = 4 + k, so k=5k = 5.

Answer to Problem 4: The limit is 5 (the expression simplifies to x+3x + 3), but f(2)=1f(2) = 1, so ff is not continuous at 2.

Answer to Problem 5: Just left of 3, ⌊x⌋=2\lfloor x \rfloor = 2 and ⌊−x⌋=−3\lfloor -x \rfloor = -3, giving −1-1; just right of 3, they are 33 and −4-4, again giving −1-1. So the limit is −1-1, but f(3)=3+(−3)=0f(3) = 3 + (-3) = 0.

Key Takeaways

  • For limits of piecewise functions, only one piece matters away from a break point, and both neighbouring pieces matter at a break point.

  • The limit at a break point exists exactly when the left-hand limit (left piece) equals the right-hand limit (right piece).

  • The value f(a)f(a) never changes the limit, but it does decide continuity.

  • To find a missing constant, set the one-sided limits equal at each break point, one equation per break.

  • Absolute value and greatest integer expressions are piecewise functions and follow the same method.

Where To Go From Here

Work through practice problems 1 to 5; if Problem 2 or Problem 5 trips you up, return to the section on finding the limit at a break point and redo Example 2.

Want a live Bhanzu trainer to walk through more piecewise limit problems with you? Book a free demo class

Read More

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

If the left hand limit and right hand limit are equal but the function is not defined at that point, is there a limit?
Yes. The limit only depends on values near the point, so a missing f(a)f(a) does not stop it from existing. The function just is not continuous there.
How do you determine whether a piecewise function is continuous at a point c?
Check three things in order: the two one-sided limits at cc agree, f(c)f(c) is defined, and f(c)f(c) equals that common limit. Any failure means a discontinuity, and the types of discontinuity tell you which kind.
Can you prove limits of piecewise functions with epsilon-delta?
Yes, and the proof splits the same way the method does. You choose a δ\delta that works for the left piece, another for the right piece, and use the smaller one. Most courses only ask for this once, as a first exercise in rigorous limits.
With removable discontinuities, does the limit of the piecewise function exist?
It does. A removable discontinuity is exactly a point where the limit exists and is finite, but f(a)f(a) is missing or different. Example 3 above is one.
How do you find left and right limits of a piecewise function at x = 2?
Look at the conditions to see which formula covers xx just below 2 and which covers xx just above 2. Substitute (or simplify, then substitute) into each. Example 4 shows a case where one side needs factoring first.
Do limits of piecewise functions always exist away from the break points?
No. Away from the breaks, the limit is whatever the active piece does, and a piece can have its own problem, such as 1x\frac{1}{x} at x=0x = 0. Check each piece on its own domain, as with any rational functions problem.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →