Continuity vs Differentiability: Modulus and Floor Functions
Master continuity and differentiability at modulus corners and greatest-integer jumps with one-sided limits, solved examples and practice answers.
- 12th
- Study Advice
A graph reaches a sharp corner. Your pencil can follow it without leaving the paper, but its direction changes suddenly. Is the function continuous? Yes. Is it differentiable? That needs a different test.
This is where many continuity questions become confusing. We look at one feature of the graph and try to make it answer two separate questions.
Continuity asks whether the nearby function values meet the value at the point. Differentiability asks whether the difference quotient approaches one finite slope. A modulus corner can pass the first test and fail the second. A greatest-integer jump usually fails before the slope test even begins.
Let’s build a method you can use on both, including expressions where the obvious-looking answer turns out to be wrong.
The two tests you should keep separate
Throughout this guide, [x] means the greatest integer less than or equal to x, also called floor(x). It does not mean rounding to the nearest integer.
We first consider an interior point x = a, with the function defined on both sides nearby.
Test 1: Does the function meet at the correct height?
Calculate these three quantities separately:
- The left-hand limit, LHL = lim as x approaches a from the left of f(x).
- The right-hand limit, RHL = lim as x approaches a from the right of f(x).
- The actual value f(a).
Continuity requires:
LHL = RHL = f(a).
Equal side limits are not enough if the assigned value is different. This three-part definition is set out in OpenStax’s continuity chapter.
Test 2: Does one finite slope exist?
Use the actual point value in both difference quotients:
- LHD = lim as h approaches 0 from below of [f(a + h) - f(a)] / h.
- RHD = lim as h approaches 0 from above of [f(a + h) - f(a)] / h.
Differentiability requires LHD and RHD to exist as finite real numbers and be equal.
The square brackets in these two displayed expressions only group the numerator; floor notation will always appear directly around its input, such as [x] or [2x].
The implication works in one direction: differentiable implies continuous. Its converse is false. OpenStax’s derivative chapter explains this theorem and why a corner prevents a derivative.
Worked example 1: A shifted modulus corner
Consider f(x) = |x - 3| + 2 at x = 3.
First remove the modulus according to the sign of its inside expression:
- If x < 3, then x - 3 < 0, so f(x) = -(x - 3) + 2 = 5 - x.
- If x >= 3, then f(x) = x - 3 + 2 = x - 1.
Now compare heights. From the left, 5 - x approaches 2. From the right, x - 1 approaches 2. The actual value is |0| + 2 = 2.
Therefore, f is continuous at 3.
For the slopes, f(3) = 2. If h < 0, then f(3 + h) = 2 - h, so:
(f(3 + h) - f(3)) / h = -h/h = -1.
If h > 0, then f(3 + h) = 2 + h, giving a quotient of 1.
Thus LHD = -1 and RHD = 1. They differ, so f is not differentiable at 3.
Notice that the vertical shift of 2 changes the height of the corner but does not change its two slopes.
A zero inside a modulus is a candidate, not a verdict
For |g(x)|, begin by solving g(x) = 0. Those are points where you should investigate whether the formula changes.
However, do not write “not differentiable” beside every root automatically.
Worked example 2: |x² - 4| has two corners
The inside expression vanishes at x = -2 and x = 2. Its sign gives:
- x < -2: f(x) = x² - 4.
- -2 < x < 2: f(x) = 4 - x².
- x > 2: f(x) = x² - 4.
At either joining point, both expressions and the actual value give 0. Hence the function is continuous there.
Because these polynomial pieces join continuously, their endpoint slopes give the one-sided derivatives:
| Point | Left slope | Right slope | Conclusion |
|---|---|---|---|
| x = -2 | 2(-2) = -4 | -2(-2) = 4 | Not differentiable |
| x = 2 | -2(2) = -4 | 2(2) = 4 | Not differentiable |
Away from these two points, the relevant polynomial formula applies in a whole neighbourhood and is differentiable.
The final answer is precise: continuous for every real x; differentiable for every real x except -2 and 2.
Worked example 3: A modulus with no corner
For f(x) = |(x - 2)²|, the inside expression is never negative. Therefore:
f(x) = (x - 2)² for every real x.
At x = 2, the derivative is 0. There is no corner to remove.
A slightly more interesting example is f(x) = |x|³ at 0. Its difference quotient is |h|³/h.
- For h > 0, this is h², which approaches 0.
- For h < 0, this is -h², which also approaches 0.
So |x|³ is differentiable at 0, even though its piecewise formula changes there.
For a differentiable inner function g with g(a) = 0, there is a useful refinement: |g(x)| is differentiable at a exactly when g’(a) = 0. To see the zero-derivative case, take absolute values of its difference quotient. Its magnitude is |g(a + h)/h|, which tends to 0. If g’(a) is nonzero, the left and right quotients for the modulus approach opposite values, -|g’(a)| and |g’(a)|.
Use that shortcut only when the inner function really is differentiable at the point.
Why the greatest-integer function jumps
The Wolfram floor-function reference defines [x] as the largest integer no greater than x. Equivalently:
[x] = n whenever n <= x < n + 1, where n is an integer.
This explains both the flat pieces and the jumps. Each horizontal piece includes its left endpoint and excludes its right endpoint.
Negative inputs deserve care:
| Input | Greatest integer value | Reason |
|---|---|---|
| 2.8 | 2 | 2 <= 2.8 < 3 |
| 2 | 2 | An integer is its own floor |
| -0.2 | -1 | -1 <= -0.2 < 0 |
| -2.01 | -3 | -3 <= -2.01 < -2 |
If you need a picture before using limits, revisit our modulus, signum and greatest-integer graph guide.
Worked example 4: Test [x] at an integer n
For small h < 0, n + h lies just below n, so [n + h] = n - 1.
For small h > 0, n + h lies just above n, so [n + h] = n.
Therefore:
- LHL = n - 1.
- RHL = n.
- f(n) = n.
The limits disagree. Hence [x] is discontinuous and not differentiable at every integer.
It is right-continuous at an integer because its right-hand limit equals its value. That does not make it two-sided continuous there.
At a non-integer a, choose a sufficiently small interval around a that contains no integer. The floor is constant throughout that interval. Thus [x] is continuous and differentiable at every non-integer, with derivative 0.
Why “both flat pieces have slope zero” is not a proof
At an integer n, the left difference quotient uses f(n) = n, not the height of the lower step:
(f(n + h) - f(n)) / h = ((n - 1) - n)/h = -1/h, for small h < 0.
This grows without bound as h approaches 0 from below. The right quotient is 0.
The left horizontal segment has slope zero at its own interior points, but the slope measured from those points to the actual point (n, n) is very different. This is why differentiating neighbouring formulas without checking the join can produce a false answer.
Worked example 5: Transformed floor functions
Consider F(x) = [2x + 1].
Possible jumps occur when the input to the floor is an integer:
2x + 1 = n, so x = (n - 1)/2, for integer n.
These are all integer multiples of 1/2. They include …, -1, -0.5, 0, 0.5, 1, … .
At x = 1/2, the inside value is 2. Just to the left it is slightly below 2, while just to the right it is slightly above 2. Hence LHL = 1, RHL = 2 and F(1/2) = 2.
F is discontinuous and not differentiable there. The same reasoning applies at every candidate point. Elsewhere, it is locally constant and its derivative is 0.
Now consider G(x) = [1 - 2x] at x = 0. The negative coefficient reverses the direction in which the inside expression moves:
- As x approaches 0 from below, 1 - 2x is slightly above 1, so LHL = 1.
- As x approaches 0 from above, 1 - 2x is slightly below 1, so RHL = 0.
- G(0) = 1.
G is discontinuous at 0, but this time the value matches the left-hand limit.
For a nonlinear input, reaching an integer is only a candidate test. For example, [x²] is identically 0 when |x| < 1, including x = 0. It is therefore continuous and differentiable at 0, even though the input x² equals an integer there.
Worked example 6: Can multiplication remove a jump?
Yes, but continuity and differentiability still need separate checks.
Take p(x) = x[x] at 0.
Immediately to the left of 0, [x] = -1, so p(x) = -x. Immediately to the right, [x] = 0, so p(x) = 0. Also p(0) = 0.
Both side limits are 0, so p is continuous at 0. Yet its left slope is -1 and its right slope is 0. Therefore p is not differentiable at 0.
Next take q(x) = x²[x] at 0.
Near 0 its left formula is -x² and its right formula is 0. Both approach q(0) = 0. The left difference quotient is -h and the right quotient is 0, so both approach 0.
Thus q is continuous and differentiable at 0, with q’(0) = 0.
At a nonzero integer n, these functions still have jumps. For p, the right limit minus the left limit is n² - n(n - 1) = n. For q, it is n³ - n²(n - 1) = n². Neither difference is zero when n is nonzero.
The lesson is local: a multiplying factor may remove a particular jump where it vanishes. It does not automatically repair every integer break point.
Worked example 7: Find constants for a smooth join
Suppose a function is defined by:
- f(x) = x² + 1 when x <= 1.
- f(x) = ax + b when x > 1.
Find a and b so that f is differentiable at 1.
First impose continuity. The left value and f(1) are both 2. The right limit is a + b, so:
a + b = 2.
Then impose equal derivatives. The left slope is 2x evaluated at 1, which is 2. The right slope is a. Therefore a = 2 and b = 0.
Check the result directly: the right formula becomes 2x and reaches height 2 with slope 2. Both requirements are satisfied.
If the question asked only for continuity, every pair with a + b = 2 would work. For example, a = 0 and b = 2 gives a continuous join but slopes 2 and 0. Differentiability adds a requirement that continuity alone cannot supply.
A compact answer-writing checklist
For a function with modulus, floor or piecewise definitions:
- List candidate points. Solve inside-modulus expressions equal to zero; find where floor inputs reach integers; include stated joins and domain restrictions.
- Choose local formulas. Work immediately to the left and right of each candidate.
- Find the actual point value. Use the branch containing equality.
- Compare LHL, RHL and f(a). If they do not all agree, state that the function is neither continuous nor differentiable there.
- At continuous joins, compare one-sided difference quotients. For polynomial branches joined continuously, their endpoint derivatives give a convenient shortcut.
- State the complete set of points. Explain why the function is well behaved on the remaining intervals.
A table can organise a long answer, but include enough working to show how you chose each side’s formula.
| Observation at an interior point | Continuous? | Differentiable? |
|---|---|---|
| Side limits differ | No | No |
| Side limits agree but differ from f(a) | No | No |
| Heights agree but finite one-sided slopes differ | Yes | No |
| Heights agree and one-sided derivatives have the same finite value | Yes | Yes |
At an endpoint of a closed interval, continuity uses the limit from within the interval. Ordinary two-sided differentiability is considered at interior points; mention a one-sided derivative explicitly if that is what an endpoint question asks for.
Try these before looking at the answers
For each expression, determine continuity and differentiability at the stated point.
- |2x + 4| at x = -2.
- |x²| at x = 0.
- at x = -2.
- at x = -2.4.
- [3x] at x = 1/3.
- (x - 1)[x] at x = 1.
- (x - 1)²[x] at x = 1.
- f(x) = x² for x < 2, f(2) = k, and f(x) = 4x - 4 for x > 2. Find k for differentiability at 2.
Answers with the decisive step
- Continuous, not differentiable. The value and both limits are 0. Left derivative = -2; right derivative = 2.
- Continuous and differentiable. |x²| = x², so the derivative at 0 is 0.
- Neither. The left limit is -3, while the right limit and point value are -2.
- Both, with derivative 0. Near -2.4, the function is constantly -3.
- Neither. The floor input crosses 1. Left limit = 0, right limit = 1, point value = 1.
- Continuous, not differentiable. Near 1, the left formula is 0 and the right formula is x - 1. Both heights tend to 0, but the slopes are 0 and 1.
- Both, with derivative 0. The local pieces are 0 and (x - 1)². Heights and one-sided derivatives agree at 1.
- k = 4. Both side limits are 4, so this is required for continuity. The left slope is 2(2) = 4 and the right slope is 4, so differentiability follows.
Frequently asked questions
1. What is the difference between continuity and differentiability?
Continuity compares nearby function values with the actual value at a point. Differentiability checks whether the difference quotient has one finite limit there. A connected corner can satisfy continuity while failing differentiability.
2. Does differentiability always imply continuity?
Yes, at the point where the ordinary derivative exists. Therefore a discontinuity immediately rules out differentiability. The reverse implication is false, as |x| at 0 demonstrates.
3. Is every modulus function non-differentiable at zero?
No. The relevant point depends on the expression inside the modulus, and even a zero of that expression need not create a corner. For example, |x²| = x² and has derivative 0 at the origin.
4. Why is the greatest-integer function discontinuous at integers?
At an integer n, the left limit is n - 1 and the right limit is n. Since they differ, no two-sided limit exists. The value [n] = n cannot make those two limits agree.
5. What is the derivative of [x] between integers?
It is 0. On any open interval between consecutive integers, the function is constant. At integers, the derivative does not exist.
6. Can I differentiate both branches before checking continuity?
You can calculate their derivatives, but matching those numbers does not prove differentiability of the whole function. First establish that both branches meet the assigned point value, or use the actual one-sided difference quotients directly.
7. Can changing one point repair a floor-function jump?
No. Changing f(a) alone does not change either side limit, so unequal side limits remain unequal. A removable mismatch is different: when both limits already agree, assigning that common value can restore continuity.
8. Why does x²[x] have a derivative at zero when [x] does not?
The squared factor shrinks the jump sufficiently at that point. Near zero the product is -x² on the left and 0 on the right. Both difference quotients approach 0, so the derivative exists and equals 0.
9. How do I find break points in [ax + b]?
When a is nonzero, solve ax + b = n for every integer n. This gives x = (n - b)/a. Check the direction of approach, especially if a is negative. If a = 0, the expression is constant and has no jumps.
10. What if both one-sided slopes become infinite?
An ordinary derivative must be finite. Matching infinite behaviour does not give a finite derivative, although the graph may have a vertical tangent. Always state whether the relevant limit exists as a real number.
Looking for commerce tuitions?
Prachi is a gold-medalist commerce teacher with experience at Deloitte and KPMG. She focuses on fundamentals to build a strong foundation.