NCERT Class 12 Mathematics — Continuity and Differentiability, Exercise 5.1. All 34 questions solved.
A function $f$ is continuous at a point $c$ when three things all hold and agree:
$$\lim_{x \to c^-}f(x) = \lim_{x \to c^+}f(x) = f(c)$$
That is: the left-hand limit exists, the right-hand limit exists, they are equal, and their common value is the function’s actual value there.
Key insight. For a piecewise function, only the joining points can cause trouble. Everywhere else the function agrees locally with a polynomial, trigonometric or exponential expression, all of which are continuous. So the whole exercise reduces to checking one point per join.
At a join, compute the two one-sided limits by substituting into the branch that applies on that side — and then compare both with $f(c)$, taking care to read which branch the $\le$ or $\ge$ sign puts $c$ into. Question 15’s join at $x = 1$ is decided entirely by the fact that $f(1) = 0$ from the middle branch while the right-hand limit is $4$.
Question 1
Prove that the function $f(x) = 5x – 3$ is continuous at $x = 0$, at $x = -3$ and at $x = 5$.
Solution. For any real $c$,
$$\lim_{x \to c}(5x – 3) = 5c – 3 = f(c)$$
since a polynomial’s limit is found by direct substitution. Taking $c = 0$, $-3$ and $5$ gives $f(0) = -3$, $f(-3) = -18$ and $f(5) = 22$, each equal to the corresponding limit.
$\lim_{x \to c} f(x) = f(c)$ at $c = 0$, $-3$ and $5$ (the values are $-3$, $-18$ and $22$), so $f$ is continuous at all three points.
Question 2
Examine the continuity of the function $f(x) = 2x^2 – 1$ at $x = 3$.
Solution. $\displaystyle\lim_{x\to3}\left(2x^2-1\right) = 2(9) – 1 = 17$, and $f(3) = 17$.
$$f \text{ is continuous at } x = 3$$
Question 3
Examine the following functions for continuity.
(a) $f(x) = x – 5$ (b) $f(x) = \dfrac{1}{x-5}$, $x \ne 5$ (c) $f(x) = \dfrac{x^2-25}{x+5}$, $x \ne -5$ (d) $f(x) = |x-5|$
Solution.
(a) A polynomial, continuous everywhere.
(b) A rational function, continuous at every point of its domain. Note that $x = 5$ is not in the domain, so there is nothing to check there — a function cannot be discontinuous at a point where it is not defined.
(c) Again rational, continuous on its domain $\mathbf{R} – \{-5\}$.
(d) $|x-5|$ is the composition of the continuous functions $x \mapsto x-5$ and $x \mapsto |x|$, so it is continuous everywhere — including at $x = 5$, where it has a corner but no break.
$$\text{(a), (b), (c) and (d) are all continuous functions}$$
Question 4
Prove that the function $f(x) = x^n$ is continuous at $x = n$, where $n$ is a positive integer.
Solution. For a positive integer $n$, $x^n$ is a polynomial, and
$$\lim_{x \to n}x^n = n^n = f(n)$$
by the algebra of limits (the limit of a product is the product of the limits, applied $n$ times). Hence $f$ is continuous at $x = n$.
$\lim_{x \to n} x^n = n^n = f(n)$, so $f$ is continuous at $x = n$.
Question 5
Is the function $f$ defined by $f(x) = \begin{cases}x, & x \le 1 \\ 5, & x > 1\end{cases}$ continuous at $x = 0$? At $x = 1$? At $x = 2$?
Solution. Only $x = 1$ is a joining point.
At $x = 0$: both the limit and the value come from the branch $f(x) = x$, so $f$ is continuous.
At $x = 1$: $\displaystyle\lim_{x\to1^-}f(x) = 1$ but $\displaystyle\lim_{x\to1^+}f(x) = 5$. The one-sided limits disagree, so $f$ is not continuous.
At $x = 2$: locally $f$ is the constant $5$, hence continuous.
$$f \text{ is continuous at } x = 0 \text{ and } x = 2; \text{ not continuous at } x = 1$$
Find all points of discontinuity of $f$, where $f$ is defined by:
Question 6
$f(x) = \begin{cases}2x + 3, & x \le 2 \\ 2x – 3, & x > 2\end{cases}$
Solution. At $x = 2$:
$$\lim_{x\to2^-}f(x) = 7, \qquad \lim_{x\to2^+}f(x) = 1$$
The two differ by the constant $6$, which is the gap between the branches.
$$\text{Discontinuous at } x = 2$$
Question 7
$f(x) = \begin{cases}|x| + 3, & x \le -3 \\ -2x, & -3 < x < 3 \\ 6x + 2, & x \ge 3\end{cases}$
Solution. Two joins to check.
At $x = -3$: from the left, $|x| + 3 \to 3 + 3 = 6$; from the right, $-2x \to 6$; and $f(-3) = 6$. Continuous.
At $x = 3$: from the left, $-2x \to -6$; from the right, $6x + 2 \to 20$. Discontinuous.
$$\text{Discontinuous at } x = 3$$
Question 8
$f(x) = \begin{cases}\dfrac{|x|}{x}, & x \ne 0 \\[4pt] 0, & x = 0\end{cases}$
Solution. For $x > 0$, $\tfrac{|x|}{x} = 1$; for $x < 0$ it is $-1$.
$$\lim_{x\to0^-}f(x) = -1, \qquad \lim_{x\to0^+}f(x) = 1$$
The value $f(0) = 0$ is a third number again, but the disagreement of the limits already settles it.
$$\text{Discontinuous at } x = 0$$
Question 9
$f(x) = \begin{cases}\dfrac{x}{|x|}, & x < 0 \\[4pt] -1, & x \ge 0\end{cases}$
Solution. For $x < 0$ we have $|x| = -x$, so $\tfrac{x}{|x|} = -1$. Both branches therefore give $-1$, and $f$ is the constant function $-1$ in disguise.
This is the one place in the exercise where reading the definition carefully saves all the work.
$$\text{No point of discontinuity}$$
Question 10
$f(x) = \begin{cases}x + 1, & x \ge 1 \\ x^2 + 1, & x < 1\end{cases}$
Solution. At $x = 1$: the left-hand limit is $1 + 1 = 2$, the right-hand limit is $1 + 1 = 2$, and $f(1) = 2$.
$$\text{No point of discontinuity}$$
Question 11
$f(x) = \begin{cases}x^3 – 3, & x \le 2 \\ x^2 + 1, & x > 2\end{cases}$
Solution. At $x = 2$: from the left, $8 – 3 = 5$; from the right, $4 + 1 = 5$; and $f(2) = 5$.
$$\text{No point of discontinuity}$$
Question 12
$f(x) = \begin{cases}x^{10} – 1, & x \le 1 \\ x^2, & x > 1\end{cases}$
Solution. At $x = 1$: the left-hand limit is $1 – 1 = 0$, but the right-hand limit is $1$.
$$\text{Discontinuous at } x = 1$$
Question 13
Is the function defined by $f(x) = \begin{cases}x + 5, & x \le 1 \\ x – 5, & x > 1\end{cases}$ a continuous function?
Solution. At $x = 1$: the left-hand limit is $6$ and the right-hand limit is $-4$.
$$f \text{ is not continuous at } x = 1$$
Discuss the continuity of the function $f$, where $f$ is defined by:
Question 14
$f(x) = \begin{cases}3, & 0 \le x \le 1 \\ 4, & 1 < x < 3 \\ 5, & 3 \le x \le 10\end{cases}$
Solution. A step function with two jumps.
At $x = 1$: left limit $3$, right limit $4$ — discontinuous.
At $x = 3$: left limit $4$, right limit $5$ — discontinuous.
Everywhere else on $[0, 10]$ the function is locally constant, hence continuous.
$$f \text{ is not continuous at } x = 1 \text{ and } x = 3$$
Question 15
$f(x) = \begin{cases}2x, & x < 0 \\ 0, & 0 \le x \le 1 \\ 4x, & x > 1\end{cases}$
Solution.
At $x = 0$: left limit $2(0) = 0$, right limit $0$, and $f(0) = 0$ — continuous.
At $x = 1$: $f(1) = 0$ from the middle branch, and the left limit is $0$; but the right limit is $4(1) = 4$ — discontinuous.
$$x = 1 \text{ is the only point of discontinuity}$$
Question 16
$f(x) = \begin{cases}-2, & x \le -1 \\ 2x, & -1 < x \le 1 \\ 2, & x > 1\end{cases}$
Solution.
At $x = -1$: left limit $-2$, right limit $2(-1) = -2$, and $f(-1) = -2$.
At $x = 1$: left limit $2(1) = 2$, right limit $2$, and $f(1) = 2$.
Both joins match, because the middle branch was chosen to meet the outer constants exactly.
$$f \text{ is continuous}$$
Question 17
Find the relationship between $a$ and $b$ so that the function $f$ defined by $f(x) = \begin{cases}ax + 1, & x \le 3 \\ bx + 3, & x > 3\end{cases}$ is continuous at $x = 3$.
Solution. Continuity requires the two branches to meet at $x = 3$:
$$3a + 1 = 3b + 3 \quad\Longrightarrow\quad 3a = 3b + 2$$
$$a = b + \frac{2}{3}$$
Question 18
For what value of $\lambda$ is the function defined by $f(x) = \begin{cases}\lambda\left(x^2 – 2x\right), & x \le 0 \\ 4x + 1, & x > 0\end{cases}$ continuous at $x = 0$? What about continuity at $x = 1$?
Solution. At $x = 0$:
$$\lim_{x\to0^-}f(x) = \lambda(0 – 0) = 0, \qquad \lim_{x\to0^+}f(x) = 1$$
The left-hand limit is $0$ whatever $\lambda$ is, because both terms of $x^2 – 2x$ vanish at $0$. So the limits can never agree.
At $x = 1$ the function is simply $4x + 1$ in a neighbourhood, a polynomial, so it is continuous there for every $\lambda$.
$$\text{For no value of } \lambda \text{ is } f \text{ continuous at } x = 0; \text{ but } f \text{ is continuous at } x = 1 \text{ for every } \lambda$$
Question 19
Show that the function defined by $g(x) = x – [x]$ is discontinuous at all integral points. Here $[x]$ denotes the greatest integer less than or equal to $x$.
Solution. Let $n$ be any integer. Just to the left of $n$, say $x = n – h$ with small $h > 0$, the greatest integer is $n-1$, so $g(x) = n – h – (n-1) = 1 – h$, giving
$$\lim_{x\to n^-}g(x) = 1$$
Just to the right, $[x] = n$, so $g(x) = h$ and
$$\lim_{x\to n^+}g(x) = 0$$
Since $1 \ne 0$, $g$ is discontinuous at every integer. (It is continuous everywhere else, where $[x]$ is locally constant.)
At every integer $n$ the left-hand limit of $g$ is $1$ and the right-hand limit is $0$, so $g$ is discontinuous at all integral points.
Question 20
Is the function defined by $f(x) = x^2 – \sin x + 5$ continuous at $x = \pi$?
Solution. Each of $x^2$, $\sin x$ and the constant $5$ is continuous everywhere, and sums and differences of continuous functions are continuous. So
$$\lim_{x\to\pi}f(x) = \pi^2 – 0 + 5 = f(\pi)$$
$$f \text{ is continuous at } x = \pi$$
Question 21
Discuss the continuity of the following functions:
(a) $f(x) = \sin x + \cos x$ (b) $f(x) = \sin x – \cos x$ (c) $f(x) = \sin x \cdot \cos x$
Solution. Both $\sin x$ and $\cos x$ are continuous on the whole of $\mathbf{R}$. The algebra of continuous functions says that the sum, difference and product of continuous functions are continuous. All three follow at once.
$$\text{(a), (b) and (c) are all continuous}$$
Question 22
Discuss the continuity of the cosine, cosecant, secant and cotangent functions.
Solution. Cosine is continuous everywhere. The other three are quotients, and a quotient is continuous wherever its denominator is non-zero.
- $\operatorname{cosec}x = \tfrac{1}{\sin x}$ fails where $\sin x = 0$, that is at $x = n\pi$.
- $\sec x = \tfrac{1}{\cos x}$ fails where $\cos x = 0$, that is at $x = (2n+1)\tfrac{\pi}{2}$.
- $\cot x = \tfrac{\cos x}{\sin x}$ fails where $\sin x = 0$, that is at $x = n\pi$.
At those points the functions are simply not defined, so they are continuous on their whole domains.
$$\cos x \text{ is continuous on } \mathbf{R}; \ \operatorname{cosec}x \text{ and } \cot x \text{ except at } x = n\pi; \ \sec x \text{ except at } x = (2n+1)\tfrac{\pi}{2}, \ n \in \mathbf{Z}$$
Question 23
Find all points of discontinuity of $f$, where $f(x) = \begin{cases}\dfrac{\sin x}{x}, & x < 0 \\[4pt] x + 1, & x \ge 0\end{cases}$
Solution. At $x = 0$, use the standard limit $\displaystyle\lim_{x\to0}\frac{\sin x}{x} = 1$:
$$\lim_{x\to0^-}f(x) = 1, \qquad \lim_{x\to0^+}f(x) = 1, \qquad f(0) = 1$$
Away from $0$ both branches are continuous on their own domains.
$$\text{There is no point of discontinuity}$$
Question 24
Determine if $f$ defined by $f(x) = \begin{cases}x^2\sin\dfrac{1}{x}, & x \ne 0 \\[4pt] 0, & x = 0\end{cases}$ is a continuous function.
Solution. The only doubtful point is $x = 0$, where $\sin\tfrac1x$ oscillates without limit. But it is bounded: $\left|\sin\tfrac1x\right| \le 1$, so
$$\left|x^2\sin\frac1x\right| \le x^2$$
As $x \to 0$ the right side tends to $0$, so by the sandwich theorem the left side does too. Hence the limit is $0 = f(0)$.
The $x^2$ factor is doing all the work: it squashes the oscillation to nothing.
$$\text{Yes, } f \text{ is continuous for all } x \in \mathbf{R}$$
Question 25
Examine the continuity of $f$, where $f$ is defined by $f(x) = \begin{cases}\sin x – \cos x, & x \ne 0 \\ -1, & x = 0\end{cases}$
Solution. At $x = 0$:
$$\lim_{x\to0}(\sin x – \cos x) = 0 – 1 = -1 = f(0)$$
The special value at $0$ was chosen to match, so nothing breaks.
$$f \text{ is continuous for all } x \in \mathbf{R}$$
Find the values of $k$ so that the function $f$ is continuous at the indicated point in Exercises 26 to 29.
Question 26
$f(x) = \begin{cases}\dfrac{k\cos x}{\pi – 2x}, & x \ne \tfrac{\pi}{2} \\[4pt] 3, & x = \tfrac{\pi}{2}\end{cases}$ at $x = \dfrac{\pi}{2}$
Solution. The fraction is $\tfrac00$ at $x = \tfrac{\pi}{2}$, so substitute $x = \tfrac{\pi}{2} + h$ and let $h \to 0$. Then $\cos x = -\sin h$ and $\pi – 2x = -2h$:
$$\lim_{h\to0}\frac{k(-\sin h)}{-2h} = \frac{k}{2}\lim_{h\to0}\frac{\sin h}{h} = \frac{k}{2}$$
Setting this equal to $f\left(\tfrac{\pi}{2}\right) = 3$ gives $k = 6$.
$$k = 6$$
Question 27
$f(x) = \begin{cases}kx^2, & x \le 2 \\ 3, & x > 2\end{cases}$ at $x = 2$
Solution. $4k = 3$.
$$k = \frac{3}{4}$$
Question 28
$f(x) = \begin{cases}kx + 1, & x \le \pi \\ \cos x, & x > \pi\end{cases}$ at $x = \pi$
Solution. $k\pi + 1 = \cos\pi = -1$, so $k\pi = -2$.
$$k = \frac{-2}{\pi}$$
Question 29
$f(x) = \begin{cases}kx + 1, & x \le 5 \\ 3x – 5, & x > 5\end{cases}$ at $x = 5$
Solution. $5k + 1 = 15 – 5 = 10$, so $5k = 9$.
$$k = \frac{9}{5}$$
Question 30
Find the values of $a$ and $b$ such that the function defined by $f(x) = \begin{cases}5, & x \le 2 \\ ax + b, & 2 < x < 10 \\ 21, & x \ge 10\end{cases}$ is a continuous function.
Solution. Two joins give two equations:
$$\text{at } x = 2: \quad 2a + b = 5$$
$$\text{at } x = 10: \quad 10a + b = 21$$
Subtracting, $8a = 16$, so $a = 2$ and then $b = 1$.
The middle branch is the straight line through $(2, 5)$ and $(10, 21)$ — which is exactly what “continuous” demands of it.
$$a = 2, \qquad b = 1$$
Question 31
Show that the function defined by $f(x) = \cos\left(x^2\right)$ is a continuous function.
Solution. Write $f = g \circ h$ with $g(t) = \cos t$ and $h(x) = x^2$. Both are continuous on $\mathbf{R}$ — one a trigonometric function, the other a polynomial — and the composition of continuous functions is continuous.
$\cos\left(x^2\right)$ is a composition of two continuous functions, so it is continuous on $\mathbf{R}$.
Question 32
Show that the function defined by $f(x) = |\cos x|$ is a continuous function.
Solution. Write $f = g \circ h$ with $g(t) = |t|$ and $h(x) = \cos x$. The modulus function is continuous everywhere (including at $0$, where it has a corner but no jump), and so is cosine. Hence the composition is continuous.
$|\cos x|$ is a composition of two continuous functions, so it is continuous on $\mathbf{R}$.
Question 33
Examine that $\sin|x|$ is a continuous function.
Solution. Here the composition is the other way round: $f = g \circ h$ with $g(t) = \sin t$ and $h(x) = |x|$. Both are continuous on $\mathbf{R}$, so $\sin|x|$ is continuous everywhere.
$\sin|x|$ is a composition of two continuous functions, so it is continuous on $\mathbf{R}$.
Question 34
Find all the points of discontinuity of $f$ defined by $f(x) = |x| – |x+1|$.
Solution. Each of $|x|$ and $|x+1|$ is continuous everywhere, and the difference of two continuous functions is continuous.
The corners at $x = 0$ and $x = -1$ are points where $f$ fails to be differentiable, not points where it fails to be continuous — a distinction the next exercise develops.
$$\text{There is no point of discontinuity}$$
Common mistakes
- Calling a function discontinuous where it is undefined. In question 3(b), $x = 5$ is outside the domain; continuity is only ever asserted at points of the domain.
- Reading the wrong branch for $f(c)$. In question 15 the value at $x = 1$ comes from the middle branch ($\le 1$), giving $0$, not from $4x$.
- Confusing a corner with a break. Questions 3(d), 32 and 34 all have corners and are perfectly continuous.
- Assuming a parameter can always fix a discontinuity. In question 18 the left-hand limit is $0$ for every $\lambda$, so no value works.
- Evaluating a $\tfrac00$ form by substitution. Question 26 needs the substitution $x = \tfrac{\pi}{2} + h$ and the standard limit $\tfrac{\sin h}{h} \to 1$.
- Forgetting the sandwich theorem when a bounded factor oscillates. Question 24’s $\sin\tfrac1x$ has no limit at $0$, but $x^2\sin\tfrac1x$ does.
Practise next
- Exercise 5.2 — differentiability, and the chain rule for composite functions.
- Exercise 5.3 — implicit differentiation, once the machinery is in place.

Doubts are answered by Shiwam, usually within a day. Ask about this question specifically — a general question about the chapter is better asked in class.