Curvingo · Made in India

Glossary

Select one of the keywords on the left…

Continuity and DifferentiabilityContinuity

Reading time: ~70 min

We start with two informal examples to get a feel for continuity. Both are defined at every point of the real line, and both are interesting only near one point, x = 0. The first is

f(x) = \begin{cases} 1, & \text{if } x \le 0 \\ 2, & \text{if } x > 0 \end{cases}

Walk in on x = 0 from both sides. Each tap brings the green walker (from the left) or the purple walker (from the right) ten times closer to 0.

Fig 5.1 — f(x) = 1 for x \le 0 and f(x) = 2 for x > 0.

At points just to the left of 0, like −0.1, −0.01, −0.001, the value of the function is always . At points just to the right, like 0.1, 0.01, 0.001, it is always .

Now try to draw the graph in one stroke. Coming from the left you reach the filled dot at (0, 1), and then you must lift the pen to start again at the empty ring at (0, 2). This is our first example of a function that is not continuous at x = 0.

In the language of Class XI, the left hand limit of f at 0 is 1 and the right hand limit is 2: they do not coincide. The value f(0) = 1 agrees with the left hand limit only.

A Point Out of Place

Here is the second function. It is also defined at every point:

f(x) = \begin{cases} 1, & \text{if } x \neq 0 \\ 2, & \text{if } x = 0 \end{cases}

Its graph is the flat line y = 1 with one point lifted out of it: the empty ring at (0, 1) marks the missing point, and the dot at (0, 2) is where f(0) actually sits.

Close to 0, on either side, the value is 1. So the left hand limit and the right hand limit at 0 are both . But f(0) = .

This time the two one-sided limits agree with each other, but not with the value of the function. You still cannot draw the graph without lifting the pen: once to jump up to the lone dot, and once to come back. So this function is not continuous at x = 0 either.

Fig 5.2 — the line y = 1 with the point at x = 0 moved up to (0, 2).

The Three-Part Test

Naively, a function is continuous at a point if its graph around that point can be drawn without lifting the pen from the paper. Mathematically, we say it like this:

Definition 1 Suppose f is a real function on a subset of the real numbers, and let c be a point in the domain of f. Then f is continuous at c if

\lim_{x \to c} f(x) = f(c).

Spelled out, three numbers must exist and be equal: the left hand limit \lim_{x \to c^-} f(x), the right hand limit \lim_{x \to c^+} f(x), and the value f(c). When the two one-sided limits coincide, their common value is the limit of f at c. So, in one sentence: f is continuous at c if f is defined at c and its value there equals its limit there.

If f is not continuous at c, we say f is discontinuous at c, and c is called a point of discontinuity of f.

Put the two functions you just met through the test. In Fig 5.1, which part failed? . And in Fig 5.2? .

Tip

In the board exam, write the three numbers on three separate lines, LHL, RHL and f(c), and only then compare them. That layout alone earns most of the marks of a continuity question.

The Continuity Tester

Here is the three-part test as a machine. The green ring sits at the left hand limit, the purple ring at the right hand limit, and the blue dot at f(c). Continuity at c means all three land on the same spot.

Pick a graph, slide c along the x-axis and read the three numbers.

c = ${c}

Graphs A, B and C are the functions of Examples 10, 4 and 13 below.

Graph A jumps, graph B has one point moved off the curve, and graph C has a sharp bend at 0 but no break. A bend is allowed: only a break spoils continuity. You will meet all three again in the examples.

One Point at a Time

Example 1 Check the continuity of the function f given by f(x) = 2x + 3 at x = 1.

Solution : The function is defined at x = 1 and its value there is f(1) = . Since 2x + 3 is a polynomial, its limit at 1 is found by substituting:

\lim_{x \to 1} (2x + 3) = 2(1) + 3 = 5

So \lim_{x \to 1} f(x) = 5 = f(1), and f at x = 1.

Example 2 Examine whether the function f given by f(x) = x^2 is continuous at x = 0.

Solution : f is defined at 0 and f(0) = 0. Also \lim_{x \to 0} x^2 = 0^2 = .

So \lim_{x \to 0} f(x) = 0 = f(0), and f is continuous at x = 0.

Example 3 Discuss the continuity of the function f given by f(x) = \lvert x \rvert at x = 0.

Solution : By definition of the modulus function,

f(x) = \begin{cases} -x, & \text{if } x < 0 \\ x, & \text{if } x \ge 0 \end{cases}

f is defined at 0 and f(0) = 0.

Left hand limit: \lim_{x \to 0^-} f(x) = \lim_{x \to 0^-} (-x) =

Right hand limit: \lim_{x \to 0^+} f(x) = \lim_{x \to 0^+} x = 0

The left hand limit, the right hand limit and the value at 0 all coincide, so f is continuous at x = 0.

Example 4 Show that the function f given by f(x) = \begin{cases} x^3 + 3, & \text{if } x \neq 0 \\ 1, & \text{if } x = 0 \end{cases} is not continuous at x = 0.

Solution : f is defined at 0 and f(0) = 1. When x \neq 0, f is given by a polynomial, so

\lim_{x \to 0} f(x) = \lim_{x \to 0} (x^3 + 3) = 0^3 + 3 =

The limit of f at 0 is 3 but its value is 1, so f is not continuous at x = 0. This is graph B of the tester, and x = 0 is its only point of discontinuity.

Example 5 Check the points where the constant function f(x) = k is continuous.

Solution : f is defined at every real number and its value at any real c is k. Also \lim_{x \to c} f(x) = \lim_{x \to c} k = .

Since \lim_{x \to c} f(x) = k = f(c) for every real c, the constant function is continuous at every real number.

Example 6 Prove that the identity function on real numbers given by f(x) = x is continuous at every real number.

Solution : f is defined everywhere and f(c) = c for every real number c. Also \lim_{x \to c} x = c.

So \lim_{x \to c} f(x) = c = f(c) for every c, and the function is continuous at every real number.

From One Point to the Whole Function

So far we tested one point at a time. The natural next step is to ask about all of them together.

Definition 2 A real function f is said to be continuous if it is continuous at every point in the domain of f.

One detail needs care at the edges. Suppose f is defined on a closed interval [a, b]. For f to be continuous it must be continuous at every point of [a, b], including the end points. Continuity at a means \lim_{x \to a^+} f(x) = f(a), and continuity at b means \lim_{x \to b^-} f(x) = f(b). There is nothing to the left of a or to the right of b to approach from, so \lim_{x \to a^-} f(x) and \lim_{x \to b^+} f(x) do not make sense. (A curious consequence: a function whose domain is a single point is continuous.)

Example 7 Is the function defined by f(x) = \lvert x \rvert a continuous function?

Solution : We may write f(x) = -x for x < 0 and f(x) = x for x \ge 0. By Example 3, f is continuous at 0.

If c < 0, then f(c) = -c and \lim_{x \to c} (-x) = -c, because near a negative c every x is negative too. So f is continuous at all negative real numbers.

If c > 0, then f(c) = c and \lim_{x \to c} x = c. So f is continuous at all positive real numbers.

Hence f is continuous at : the modulus function is a continuous function.

Example 8 Discuss the continuity of the function f given by f(x) = x^3 + x^2 - 1.

Solution : f is defined at every real number c, and its value there is c^3 + c^2 - 1. Also

\lim_{x \to c} (x^3 + x^2 - 1) = c^3 + c^2 - 1 = f(c)

So f is continuous at every real number: f is a continuous function.

Example 9 Discuss the continuity of the function f defined by f(x) = \dfrac{1}{x}, x \neq 0.

Solution : Fix any non-zero real number c. Then \lim_{x \to c} \dfrac{1}{x} = \dfrac{1}{c}, and f(c) = \dfrac{1}{c}.

So f is continuous at every point in its domain, and .

Note: 0 is not in the domain

The graph of 1/x does break at 0, but 0 is not in the domain of f, so there is nothing to test there. Definition 2 only asks about points in the domain.

Running Off to Infinity

This is a good moment to explain the idea of infinity. What does f(x) = \dfrac{1}{x} do as x creeps towards 0? We find the value of the function at real numbers close to 0, first from the right.

Table 5.1

x10.30.20.10.010.00110^{-n}
f(x)13.333…510100100010^{n}

As x gets closer to 0 from the right, f(x) shoots up higher and higher: it can be made larger than any number you name by taking x positive and close enough to 0. In symbols,

\lim_{x \to 0^+} f(x) = +\infty,

read as "the right hand limit of f at 0 is plus infinity". The left side works the same way:

Table 5.2

x−1−0.3−0.2−0.1−0.01−0.001-10^{-n}
f(x)−1−3.333…−5−10−100−1000-10^{n}

From the left, f(x) drops below any number you name, and we write \lim_{x \to 0^-} f(x) = -\infty.

But +\infty and -\infty are not real numbers. So the right hand limit of f at 0 , and neither does the left hand limit.

The graph of the reciprocal function shows both facts at once: the right branch climbs up along the y-axis and the left branch plunges down along it.

Fig 5.3 — y = \dfrac{1}{x}.

Jumps and Moved Points

Example 10 Discuss the continuity of the function f defined by f(x) = \begin{cases} x + 2, & \text{if } x \le 1 \\ x - 2, & \text{if } x > 1 \end{cases}

Solution : f is defined at all points of the real line.

Case 1 If c < 1, then f(c) = c + 2 and \lim_{x \to c} (x + 2) = c + 2. So f is continuous at all real numbers less than 1.

Case 2 If c > 1, then f(c) = c - 2 and \lim_{x \to c} (x - 2) = c - 2 = f(c). So f is continuous at all points x > 1.

Case 3 If c = 1, the left hand limit of f at 1 is \lim_{x \to 1^-} (x + 2) = , and the right hand limit is \lim_{x \to 1^+} (x - 2) = .

The left and right hand limits at 1 do not coincide, so f is not continuous at 1, and x = 1 is its only point of discontinuity. In Fig 5.4 the left piece ends in a filled dot at (1, 3), while the right piece starts at the empty ring at (1, −1). This is graph A of the tester.

Example 11 Find all the points of discontinuity of the function f defined by f(x) = \begin{cases} x + 2, & \text{if } x < 1 \\ 0, & \text{if } x = 1 \\ x - 2, & \text{if } x > 1 \end{cases}

Solution : Exactly as in Example 10, f is continuous at every real number x \neq 1. At x = 1 the left hand limit is still 3 and the right hand limit still −1. They do not coincide, so no value of f(1) could make f continuous there; the lone dot at (1, 0) in Fig 5.5 does not help. The only point of discontinuity is x = .

Fig 5.4 — Example 10: the right piece starts at the empty ring at (1, −1).

Fig 5.5 — Example 11.

Example 12 Discuss the continuity of the function defined by f(x) = \begin{cases} x + 2, & \text{if } x < 0 \\ -x + 2, & \text{if } x > 0 \end{cases}

Solution : This function is defined at all real numbers except 0. Its domain is D_1 \cup D_2, where D_1 = \{x \in \mathbf{R} : x < 0\} and D_2 = \{x \in \mathbf{R} : x > 0\}.

Case 1 If c \in D_1, then \lim_{x \to c} (x + 2) = c + 2 = f(c), so f is continuous in D_1.

Case 2 If c \in D_2, then \lim_{x \to c} (-x + 2) = -c + 2 = f(c), so f is continuous in D_2.

So f is continuous at every point of its domain, and therefore f .

To draw its graph (Fig 5.6) you do have to lift the pen, at the empty ring at (0, 2). But that is only where the function is not defined, and Definition 2 does not care about points outside the domain.

Example 13 Discuss the continuity of the function f given by f(x) = \begin{cases} x, & \text{if } x \ge 0 \\ x^2, & \text{if } x < 0 \end{cases}

Solution : f is defined at every real number. Its graph (Fig 5.7) suggests splitting the real line into three parts: D_1 = \{x \in \mathbf{R} : x < 0\}, D_2 = \{0\} and D_3 = \{x \in \mathbf{R} : x > 0\}.

Case 1 At any point of D_1, f(x) = x^2, which is continuous there (see Example 2).

Case 2 At any point of D_3, f(x) = x, which is continuous there (see Example 6).

Case 3 At 0: f(0) = 0, the left hand limit is \lim_{x \to 0^-} x^2 = and the right hand limit is \lim_{x \to 0^+} x = 0.

So \lim_{x \to 0} f(x) = 0 = f(0), and f is continuous at 0 too: the two pieces meet at the dot at the origin. f is continuous at every point of its domain, so f is a continuous function. This is graph C of the tester.

Fig 5.6 — Example 12: the pen lifts at the empty ring at (0, 2).

Fig 5.7 — Example 13: the two pieces meet at the dot at the origin.

Example 14 Show that every polynomial function is continuous.

Solution : A function p is a polynomial function if p(x) = a_0 + a_1 x + \dots + a_n x^n for some natural number n, with a_n \neq 0 and a_i \in \mathbf{R}. It is defined at every real number, and for a fixed real number c,

\lim_{x \to c} p(x) = p(c)

By definition p is continuous at c. Since c is any real number, p is continuous at every real number, so p is a continuous function.

Example 15 Find all the points of discontinuity of the greatest integer function defined by f(x) = [x], where [x] is the greatest integer less than or equal to x.

Solution : f is defined for all real numbers. Its graph (Fig 5.8) is a staircase, just like Riya's parking fee, and it looks discontinuous at every integer. Let us check.

Case 1 Let c be a real number that is not an integer. For all x close enough to c, [x] = [c], so \lim_{x \to c} [x] = [c] = f(c): f is continuous at every non-integer.

Case 2 Let c be an integer. For a small enough r > 0, [c - r] = c - 1 while [c + r] = c. So the left hand limit at c is and the right hand limit is .

These can never be equal, so the greatest integer function is discontinuous at every integer: each step ends in a dot and the next one starts at an empty ring.

Fig 5.8 — y = [x].

Algebra of continuous functions

In Class XI, once you understood limits, you learnt the algebra of limits: the limit of a sum is the sum of the limits, and so on. Continuity is decided entirely by limits, so we can expect the same kind of rules for continuous functions.

Theorem 1 Suppose f and g are two real functions continuous at a real number c. Then

(1) f + g is continuous at x = c.

(2) f - g is continuous at x = c.

(3) f \cdot g is continuous at x = c.

(4) \dfrac{f}{g} is continuous at x = c, provided g(c) \neq 0.

Test the theorem before we prove it. Build h out of f and g and look for breaks in the purple curve. The faint blue and green curves are f and g themselves.

The faint blue curve is f and the faint green curve is g; the purple curve is the h you build from them.

The purple curve never broke for a sum, a difference or a product, and a quotient broke only where g was 0. Now the proof.

Proof of (1). The function f + g is clearly defined at c, and

\lim_{x \to c} (f + g)(x) = \lim_{x \to c} [f(x) + g(x)]   (definition of f + g)

= \lim_{x \to c} f(x) + \lim_{x \to c} g(x)   (the theorem on limits)

= f(c) + g(c)   (because )

= (f + g)(c)   (definition of f + g)

Hence f + g is continuous at x = c. The proofs of the remaining parts are similar, using the limit of a difference, a product and a quotient.

Remarks

(i) Taking f to be a constant function, f(x) = \lambda, in (3): the function \lambda \cdot g is continuous. In particular, with \lambda = -1, continuity of g implies continuity of -g.

(ii) Taking f(x) = \lambda in (4): the function \dfrac{\lambda}{g} is continuous wherever g(x) \neq 0. In particular, continuity of g implies continuity of \dfrac{1}{g} wherever g is not 0.

Theorem 1 turns a few simple continuous functions into a whole factory of them.

Example 16 Prove that every rational function is continuous.

Solution : Every rational function f is given by f(x) = \dfrac{p(x)}{q(x)}, q(x) \neq 0, where p and q are polynomial functions. The domain of f is all real numbers except the points where q is zero. Polynomial functions are continuous (Example 14), so f is continuous by part of Theorem 1.

Example 17 Discuss the continuity of the sine function.

Solution : We use the fact that \lim_{x \to 0} \sin x = 0, which is clear from the graph of sin x near 0 (and so \lim_{h \to 0} \cos h = 1). The function f(x) = \sin x is defined for every real number. Let c be a real number and put x = c + h; as x \to c, h \to 0. Therefore

\lim_{x \to c} \sin x = \lim_{h \to 0} \sin(c + h)

= \lim_{h \to 0} [\sin c \cos h + \cos c \sin h]

= \sin c \cdot \lim_{h \to 0} \cos h + \cos c \cdot \lim_{h \to 0} \sin h

= \sin c \cdot + \cos c \cdot = \sin c

So \lim_{x \to c} f(x) = f(c), and sine is a continuous function. A similar proof shows that cosine is continuous too.

Example 18 Prove that the function defined by f(x) = \tan x is a continuous function.

Solution : \tan x = \dfrac{\sin x}{\cos x}, which is defined for all real numbers with \cos x \neq 0, i.e. x \neq (2n + 1)\dfrac{\pi}{2}. For example, tan x is not defined at x = . Sine and cosine are both continuous, so tan x, being a quotient of two continuous functions, is continuous wherever it is defined.

Continuous Inside Continuous

Continuous functions also behave well under composition. Recall that if f and g are real functions, then (f \circ g)(x) = f(g(x)) is defined whenever the range of g is a subset of the domain of f. The following theorem is stated without proof.

Theorem 2 Suppose f and g are real valued functions such that f \circ g is defined at c. If g is continuous at c and f is continuous at g(c), then f \circ g is continuous at c.

Example 19 Show that the function defined by f(x) = \sin(x^2) is a continuous function.

Solution : f is defined for every real number, and it is the composite g \circ h of g(x) = \sin x and h(x) = x^2. The function applied first is . Both g and h are continuous, so by Theorem 2, f is a continuous function.

Example 20 Show that the function f defined by f(x) = \lvert 1 - x + \lvert x \rvert \rvert, where x is any real number, is a continuous function.

Solution : Define g by g(x) = 1 - x + \lvert x \rvert and h by h(x) = \lvert x \rvert. Then

(h \circ g)(x) = h(g(x)) = h(1 - x + \lvert x \rvert) = \lvert 1 - x + \lvert x \rvert \rvert = f(x)

h is continuous (Example 7). g is the sum of a polynomial function and the modulus function, so g is continuous by Theorem 1. Then f, a composite of two continuous functions, is continuous by Theorem 2.

Speed Round: Break or No Break?

Each small graph shows a function near the dashed line x = a. A filled dot is the function's value there; an empty ring is a point that is not on the graph. Decide whether the function is continuous at a.

Get five right to move on.

Sina