Class 12 Maths, Worked in Full Past papersGet updates
Chapter 5 · Continuity and Differentiability

Exercise 5.1 · Q19: x−[x]x-[x] is discontinuous at every integer

Exercise 5.1Continuity at a point · Section 5.2
The question

19. Show that the function defined by g(x)=x−[x]g(x)=x-[x] is discontinuous at all integral points. Here [x][x] denotes the greatest integer less than or equal to xx⁠.

Exam answer

Let nn be any integer and 0<h<10 < h < 1⁠. Then [n−h]=n−1[n - h] = n - 1 and [n+h]=n[n + h] = n⁠.

g(n)=n−[n]=n−n=0LHL=lim⁡h→0g(n−h)=lim⁡h→0{(n−h)−(n−1)}=lim⁡h→0(1−h)=1RHL=lim⁡h→0g(n+h)=lim⁡h→0{(n+h)−n}=0\begin{aligned} g(n) &= n - [n] = n - n = 0 \\ \text{LHL} &= \lim_{h\to0}g(n - h) \\ &= \lim_{h\to0}\{(n - h) - (n - 1)\} \\ &= \lim_{h\to0}(1 - h) = 1 \\ \text{RHL} &= \lim_{h\to0}g(n + h) \\ &= \lim_{h\to0}\{(n + h) - n\} = 0 \end{aligned}

Since LHL≠RHL\text{LHL} \ne \text{RHL}⁠, gg is not continuous at x=nx = n⁠. As nn is any integer, gg is discontinuous at all integral points. Hence proved.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

g(x)=x−[x]g(x)=x-[x] is the fractional part of xx⁠: how far xx is above the integer just below it (or equal to it). Just before an integer nn⁠, xx is almost a whole step above n−1n-1⁠, so g(x)g(x) is almost 11⁠. At nn and just after it, xx is at or barely above nn⁠, so g(x)g(x) is 00 or almost 00⁠. That drop from nearly 11 to 00 is a jump, at every integer.

Given, to show, and the plan
Given
g(x)=x−[x]g(x)=x-[x] for every real xx⁠, where [x][x] is the greatest integer ≤x\le x⁠.
To show
For every integer nn⁠, gg is not continuous at nn⁠.
Plan
Fix an arbitrary integer nn⁠. (1) Pin down [x][x] just left of nn⁠, at nn⁠, and just right of nn⁠. (2) Compute g(n)g(n)⁠, the left-hand limit and the right-hand limit separately. (3) Show the limits differ. (4) A second, shorter proof from Theorem 1 and Example 15.

Basics you need

1The greatest integer function

[x][x] is the integer mm with m≤x<m+1m\le x\lt m+1⁠. So [2.7]=2[2.7]=2⁠, [2]=2[2]=2⁠, [−0.4]=−1[-0.4]=-1 (not 00⁠: 00 is bigger than −0.4-0.4⁠), [−1.5]=−2[-1.5]=-2⁠. Basics: piecewise functions

2Continuity at a point

gg is continuous at cc when the left-hand limit, the right-hand limit and g(c)g(c) exist and are equal. If the two one-sided limits differ, gg is discontinuous at cc (Definition 1, Section 5.2). Basics: what a limit is

3One-sided limits with hh

Left of nn⁠: x=n−hx=n-h⁠; right of nn⁠: x=n+hx=n+h⁠; with h>0h\gt0⁠, h→0h\to0⁠. Since only small hh matter, we may assume h<1h\lt1⁠. Basics: left-hand and right-hand limits

4Proving a "for every" statement

"At all integral points" is a claim about infinitely many points. We prove it for a letter nn that stands for any integer, positive, negative or zero.

Solution

  1. The domain, and an arbitrary integer

    [x][x] is defined for every real xx⁠, so g(x)=x−[x]g(x)=x-[x] is defined on all of R\R⁠. In particular every integer is in the domain, so it makes sense to ask about continuity there. Fix an arbitrary integer nn⁠.

    Continuity is only discussed at points of the domain. Working with a general nn⁠, not n=1n=1 or n=2n=2⁠, is what turns the argument into a proof for all integers at once.
    An arbitrary element proves a "for all" statement; examples do not. Lesson: continuity at a point
  2. Pin down [x][x] near nn

    Let 0<h<10\lt h\lt1⁠.

    Left of nn⁠: n−1<n−h<nn-1\lt n-h\lt n⁠. The number n−1n-1 is an integer ≤n−h\le n-h⁠, and the next integer, nn⁠, is bigger than n−hn-h⁠. So

    [ n−h ]=n−1.[\,n-h\,]=n-1.

    At nn⁠: nn is itself an integer ≤n\le n⁠, so [n]=n[n]=n⁠.

    Right of nn⁠: n<n+h<n+1n\lt n+h\lt n+1⁠, so n≤n+h<n+1n\le n+h\lt n+1 and

    [ n+h ]=n.[\,n+h\,]=n.
    This is exactly the definition m≤x<m+1m\le x\lt m+1 applied with m=n−1m=n-1 and with m=nm=n⁠. For example, with n=−1n=-1 and h=0.1h=0.1⁠: [−1.1]=−2[-1.1]=-2 and [−0.9]=−1[-0.9]=-1⁠. The value of [x][x] drops by 11 as soon as xx goes below an integer.
    The same reasoning appears in Example 15, Case 2, for the function [x][x] itself. Example 15
  3. The value g(n)g(n)

    g(n)=n−[n]=n−n=0.g(n)=n-[n]=n-n=0.
    At an integer, xx sits exactly on the integer below-or-equal to it, so its fractional part is 00⁠.
  4. The left-hand limit at nn

    Using [n−h]=n−1[n-h]=n-1 from Step 2:

    g(n−h)=(n−h)−(n−1)=1−h.g(n-h)=(n-h)-(n-1)=1-h. lim⁡x→n−g(x)=lim⁡h→0 (1−h)=1.\lim_{x\to n^-}g(x)=\lim_{h\to0}\,(1-h)=1.
    The nn's cancel, so the answer is the same for every integer: just left of any integer, the fractional part is 1−h1-h⁠, close to 11⁠.
    Left-hand limit: x=n−hx=n-h⁠, h>0h\gt0⁠, h→0h\to0⁠. Basics: left-hand and right-hand limits
  5. The right-hand limit at nn

    Using [n+h]=n[n+h]=n from Step 2:

    g(n+h)=(n+h)−n=h.g(n+h)=(n+h)-n=h. lim⁡x→n+g(x)=lim⁡h→0h=0.\lim_{x\to n^+}g(x)=\lim_{h\to0}h=0.
    Just right of an integer the fractional part is the small distance hh past it, which shrinks to 00⁠.
  6. Compare: a jump at every integer

    From Steps 3 to 5:

    lim⁡x→n−g(x)=1,g(n)=0,lim⁡x→n+g(x)=0.\begin{aligned} \lim_{x\to n^-}g(x)&=1,\\ g(n)&=0,\\ \lim_{x\to n^+}g(x)&=0. \end{aligned}

    The two one-sided limits are different (1≠01\ne0⁠), so lim⁡x→ng(x)\lim_{x\to n}g(x) does not exist and gg is not continuous at nn⁠. Since nn was an arbitrary integer, gg is discontinuous at every integral point.

    Definition 1 needs the limit at nn to exist and equal g(n)g(n)⁠. A limit exists only when the left-hand and right-hand limits agree, and here they never do. (The right-hand limit does equal g(n)g(n)⁠: the graph is continuous from the right at each integer, and the break is on the left.)
    Different one-sided limits mean the limit does not exist. Basics: left-hand and right-hand limits
  7. A second proof, from Theorem 1

    Suppose, to reach a contradiction, that gg were continuous at some integer nn⁠. The identity function xx is continuous everywhere (Example 6). Then by Theorem 1 (2), the difference

    x−g(x)=x−(x−[x])=[x]x-g(x)=x-\left(x-[x]\right)=[x]

    would be continuous at nn⁠. But Example 15 shows that [x][x] is discontinuous at every integer. This contradiction shows gg is discontinuous at nn⁠.

    Theorem 1 says "continuous minus continuous is continuous". If gg were continuous at nn⁠, we could rebuild [x][x] from two continuous pieces, which is impossible. This proof is shorter but relies on Example 15; the direct proof in Steps 2 to 6 does not.
    Theorem 1 (2): if ff and gg are continuous at cc⁠, so is f−gf-g⁠. Lesson: algebra of continuous functions
  8. For completeness: what happens between integers

    The question asks only about integers, but the picture is clearer with the rest. If cc is not an integer, let m=[c]m=[c]⁠, so m<c<m+1m\lt c\lt m+1⁠. For all xx in the open interval (m,m+1)(m,m+1) around cc⁠, [x]=m[x]=m⁠, so there

    g(x)=x−m,g(x)=x-m,

    a polynomial. Hence lim⁡x→cg(x)=c−m=g(c)\lim_{x\to c}g(x)=c-m=g(c)⁠, and gg is continuous at every non-integer.

    This matches Example 15, Case 1: [x][x] is constant near a non-integer. So the integers are exactly the points of discontinuity of gg⁠.
−2 −1 1 2 3 x y y = 1 g(n) = 0 at each integer n (attained) height 1 approached from the left of n, never reached
The sawtooth graph of g(x)=x−[x]g(x)=x-[x]⁠. Each tooth rises with slope 11 from the filled point (n,0)(n,0) towards height 11⁠, but the open point at its top end is never reached: at x=n+1x=n+1 the graph drops back to (n+1,0)(n+1,0)⁠. The left-hand limit 11 and the value 00 differ at every integer.
Result

For every integer nn⁠: g(n)=0g(n)=0⁠, lim⁡x→n−g(x)=1\lim_{x\to n^-}g(x)=1 and lim⁡x→n+g(x)=0\lim_{x\to n^+}g(x)=0⁠. The one-sided limits differ, so g(x)=x−[x]g(x)=x-[x] is discontinuous at every integral point. (It is continuous at every non-integer.)

(The answer key prints no answer for this "show that" question.)

Check it with numbers

n=3n=3⁠: g(2.999)=2.999−2=0.999g(2.999)=2.999-2=0.999⁠, g(3)=3−3=0g(3)=3-3=0⁠, g(3.001)=3.001−3=0.001g(3.001)=3.001-3=0.001⁠. Left values near 11⁠, right values near 00⁠. ✓

n=−2n=-2⁠: g(−2.001)=−2.001−(−3)=0.999g(-2.001)=-2.001-(-3)=0.999⁠, g(−2)=0g(-2)=0⁠, g(−1.999)=−1.999−(−2)=0.001g(-1.999)=-1.999-(-2)=0.001⁠. The same jump, for a negative integer. ✓

n=0n=0⁠: g(−0.001)=−0.001−(−1)=0.999g(-0.001)=-0.001-(-1)=0.999⁠, g(0)=0g(0)=0⁠, g(0.001)=0.001g(0.001)=0.001⁠. ✓

Common mistakes
  1. Getting [x][x] wrong for negative numbers. [−1.5]=−2[-1.5]=-2⁠, not −1-1⁠: the greatest integer ≤−1.5\le-1.5 is −2-2⁠. With the wrong value the left-hand limit at negative integers comes out wrong.
  2. Checking a few integers only. Showing the jump at n=1n=1 and n=2n=2 is not a proof for all integers. Use an arbitrary nn⁠, as in Steps 2 to 6.
  3. Thinking g(n)=1g(n)=1⁠. At an integer, n−[n]=0n-[n]=0⁠. The height 11 is approached but never attained.
  4. Relying on the graph alone. The sawtooth suggests the answer; the one-sided limits prove it.
What to take away
  1. x−[x]x-[x] is the fractional part: it lies in [0,1)[0,1)⁠, is 00 at integers and jumps down by 11 at each of them.
  2. For functions built from [x][x]⁠, first write [x][x] explicitly on each side of the point (n−1n-1 on the left, nn at and right of nn⁠), then compute.
  3. Theorem 1 also works "backwards": if a combination of continuous functions with gg gives something discontinuous, gg itself must be discontinuous.

Every fact used, and where it comes from

FactUsed inSource
[x]=m[x]=m when m≤x<m+1m\le x\lt m+1⁠, m∈Zm\in\ZSteps 2, 8Definition of the greatest integer function, as stated in the question and in Example 15, Section 5.2
Continuity at cc⁠; one-sided limits must agreeSteps 4–6Definition 1, Section 5.2 (Lesson: continuity at a point)
[x][x] is discontinuous at every integer and constant near non-integersSteps 7, 8Example 15, Section 5.2
The identity function is continuousStep 7Example 6, Section 5.2
Difference of continuous functions is continuousStep 7Theorem 1 (2), Section 5.2.1 (Lesson: algebra of continuous functions)
Polynomials are continuousStep 8Example 14, Section 5.2
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →