Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Piecewise-continuous functions and one-sided limits, revisited

~12 min

A square wave is nothing exotic. It's a perfectly ordinary piecewise function, flat at one height, then flat at another, jumping between them. Whether a Fourier series can represent a function like that at all is a question chapter 4 answers precisely. So is what it actually converges to sitting right on top of a jump. Answering both requires the vocabulary this section sharpens: what counts as a "jump" in the first place, and what a function is doing on either side of one.

Walk toward a specific milepost on a road from the west, and separately from the east. The "left-hand limit" is where the road's elevation is heading as you approach from the west. The "right-hand limit" is the same thing approaching from the east. Suppose both approaches lead to the same elevation. Then the road has one well-defined height there, jump or no jump. Suppose instead they lead to two different elevations. Then there's an actual step in the road at that milepost, a genuine jump. No single number describes "the" elevation at that exact point, no matter which side you glue the milepost's own marker to.

The trap is treating "the function has a value at a" and "the limit exists at a" as the same question. They aren't. A road can have a sign at the milepost claiming an elevation that matches neither side's approach. The sign is real, and so is the jump. They just aren't describing the same thing. A one-sided limit only ever asks what's happening on approach, never what a marker at the destination claims.

The left-hand limit \lim_{x\to a^-} f(x) is the value f(x) approaches as x approaches a through values less than a only. The right-hand limit \lim_{x\to a^+} f(x) approaches through values greater than a only. The two-sided limit \lim_{x\to a} f(x) exists exactly when both one-sided limits exist and agree, and when they do, it equals their common value. A one-sided limit is defined independently of f(a) itself. f can be undefined at a, or defined to some third value entirely, without changing either one-sided limit.

A discontinuity at a falls into one of three cases, told apart entirely by what the one-sided limits are doing. It's removable when both one-sided limits exist, are finite, and agree with each other, but either disagree with f(a) or f is undefined at a. It's a jump when both one-sided limits exist and are finite, but disagree with each other. It's infinite when at least one one-sided limit fails to exist because it's unbounded. A function is piecewise continuous on an interval if it's continuous there except at finitely many points, and at every one of those points both one-sided limits exist and are finite. Jump discontinuities are allowed; infinite ones are not. That distinction is precisely the hypothesis chapter 4's convergence theorem for Fourier series requires.

A genuine jump: the two sides disagree

Drag both gliders toward x=2. The left approach and the right approach settle at two different heights.

Loading interactive…

Worked example

Reading one-sided limits off a piecewise rule

  1. 1

    For \displaystyle f(x) = \begin{cases} x^2 & x<2 \\ x+1 & x\ge 2\end{cases}, find \lim_{x\to 2^-}f(x) and \lim_{x\to 2^+}f(x), and state whether \lim_{x\to 2}f(x) exists.

  2. 2

    For x<2, f(x)=x^2, so \lim_{x\to 2^-}f(x) = 2^2 = 4.

  3. 3

    For x\ge 2, f(x)=x+1, so \lim_{x\to 2^+}f(x) = 2+1 = 5.

  4. 4

    The one-sided limits are 4 and 5. They disagree, so \boxed{\lim_{x\to 2}f(x)\text{ does not exist}}, and f has a jump discontinuity at x=2 (the same jump the widget above traces).

A removable discontinuity: the sides agree, the point is missing

Drag both gliders toward x=2. The left and right approaches meet at the SAME height, even though there's no dot marking a value there.

Loading interactive…

Worked example

Classifying three discontinuities at a glance

  1. 1

    Classify the discontinuity at x=a in each case, given only the one-sided limits.

    Recognition. No formula is given here on purpose. The classification comes entirely from what the one-sided limits are doing, which is the actual skill.

  2. 2

    (i) \lim_{x\to a^-}f(x) = 3, \lim_{x\to a^+}f(x) = 3, f(a) undefined. Both sides agree with each other but f(a) doesn't exist: removable.

  3. 3

    (ii) \lim_{x\to a^-}f(x) = -1, \lim_{x\to a^+}f(x) = 4. Both limits exist and are finite, but disagree with each other: jump.

  4. 4

    (iii) \lim_{x\to a^-}f(x) = 2, \lim_{x\to a^+}f(x) = \infty. The right side is unbounded: infinite.

  5. 5

    \boxed{\text{removable, jump, infinite}}. Only the first two are ever allowed at a point of a piecewise-continuous function; the third disqualifies it.

Confirming a one-sided limit numerically

Watch f(x)=x^2 evaluated at x-values marching toward 2 from the left only. The table is the one-sided limit made concrete, one number at a time.

Loading interactive…

Worked example

A common trap: assuming continuity from existing limits

  1. 1

    \displaystyle g(x) = \begin{cases} x+3 & x<1 \\ 1 & x=1 \\ x+3 & x>1\end{cases}. Is g continuous at x=1?

    Common trap. Both one-sided limits obviously exist here, since the formula is the same on both sides. That makes it tempting to declare g continuous without checking g(1) itself against them.

  2. 2

    \lim_{x\to 1^-}g(x) = 1+3=4 and \lim_{x\to 1^+}g(x)=1+3=4. The two-sided limit exists and equals 4.

  3. 3

    But g(1) is defined to be 1, not 4.

  4. 4

    \boxed{g\text{ is not continuous at }x=1}, a removable discontinuity, since patching the single value g(1)=4 would fix it. Existing, agreeing one-sided limits are necessary for continuity, never sufficient on their own.

Where this goes next

Dirichlet's convergence conditions, chapter 4

A square wave, a sawtooth, and every other classic waveform this course builds a Fourier series for is piecewise continuous in exactly the sense defined here: finitely many jumps, no infinite discontinuities. Dirichlet's conditions are the hypotheses chapter 4 needs to guarantee a Fourier series actually converges. They're stated directly in this vocabulary. The theorem's most striking conclusion is that the series converges to the average of the two one-sided limits sitting on top of a jump. That conclusion only makes sense once "the two one-sided limits" is already a familiar object.

Check your understanding (counts toward your progress)

At x=a, both one-sided limits equal 2, but f(a) is undefined. Classify the discontinuity.

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

A jump needs the two one-sided limits to DISAGREE with each other — these agree.

Both one-sided limits are finite here, so nothing is unbounded.

f isn't even defined at a, so it can't be continuous there.

Why

Both one-sided limits exist, are finite, and agree, but f(a) doesn't exist — exactly the removable case.

Check whether the two one-sided limits agree with EACH OTHER first, before worrying about f(a).

Using the same f as above, find \lim_{x\to1^+}f(x).

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

For x\ge1, f(x)=3x, so the right-hand limit is 3(1)=3.

Correct answer

Also accepted:

Why

For f(x)=x^2 (x<1) and f(x)=3x (x\ge1), find \lim_{x\to1^-}f(x).

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

For x<1, f(x)=x^2, so the left-hand limit is 1^2=1.

Correct answer

Also accepted:

Why

Practice: Read the discontinuity type off the one-sided limits (4 problems · doesn’t affect your progress)

\lim_{x\to a^-}f(x)=-2, \lim_{x\to a^+}f(x)=-2, and f(a)=-2. What's true at a?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

Both one-sided limits agree with each other AND with f(a) — nothing is broken here, so f is simply continuous.

f is continuous at a

\lim_{x\to a^-}f(x)=5, \lim_{x\to a^+}f(x)=-1. Classify the discontinuity at a.

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

Both one-sided limits are finite but disagree with each other — the definition of a jump discontinuity.

Jump

\lim_{x\to a^-}f(x)=4, \lim_{x\to a^+}f(x)=\infty. Classify the discontinuity at a.

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Removable needs BOTH one-sided limits to exist and be finite — the right-hand side is unbounded here.

A jump needs both one-sided limits finite but disagreeing — one of them isn't even finite here.

Why

One of the one-sided limits fails to exist because it's unbounded, which is exactly the infinite case, not a jump or a removable gap.

Infinite

Both one-sided limits at x=6 equal 9, and f(6)=9 as well. What's true at x=6?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Removable means the one-sided limits agree with EACH OTHER but disagree with (or are missing from) f(a) — here they agree with f(6) too, so nothing is broken.

Why

Both one-sided limits agree with each other and with f(6) itself, so there's no discontinuity to classify at all.

f is continuous at 6

Feeling good about this section?

Take the section quiz

Every answer gets a full explanation at the end.

Graph settings

Calculator

Sign in to save highlights

Insert an equation

  • No matches.