5.1 Continuity
A function is continuous at $c$ when $\lim_{x\to c}f(x)$ exists and equals $f(c)$ — no hole, no jump, no stray point. Sums, products, quotients and composites of continuous functions are continuous.
A thermometer outside your window records the temperature through the day. The reading can rise quickly or fall quickly, but it cannot go from $28^\circ\text{C}$ to $31^\circ\text{C}$ without passing through every temperature in between: the graph of temperature against time has no breaks. Now look at an electricity bill in many states, where the price of a unit changes when you cross a slab such as $100$ units, or at a parking ticket, which jumps from ₹20 to ₹35 the moment you stay a second past one hour. Those graphs do break. Engineers, economists and doctors need to know which kind of quantity they are dealing with: a break may signal a fault in a sensor, a tariff that is unfair at the slab boundary, or a dose that changes abruptly.
In this section we turn “a graph with no breaks” into a precise test that uses the left-hand and right-hand limits you met in Class 11 Mathematics, Ch. 12 — Limits and Derivatives. The test works one point at a time, so it can be applied to piecewise formulas, to the modulus and greatest integer functions, and to functions far too complicated to sketch. It also lets us choose constants so that the pieces of a formula join up — a question the Board asks every year.
Continuity at a Point
Recall from Class 11: the left-hand limit $\lim\limits_{x\to c^-}f(x)$ is the value $f(x)$ approaches as $x$ approaches $c$ through values less than $c$; the right-hand limit $\lim\limits_{x\to c^+}f(x)$ uses values greater than $c$; and $\lim\limits_{x\to c}f(x)$ exists exactly when both one-sided limits exist and are equal. Neither limit depends on the value $f(c)$ itself — that value may even be missing. Continuity is the requirement that the value agrees with where the function is heading.
Let $f$ be a real function 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).$$ In detail, all three of the following must hold:
- $f(c)$ is defined (that is, $c$ is in the domain);
- $\lim\limits_{x\to c}f(x)$ exists, i.e. $\lim\limits_{x\to c^-}f(x)=\lim\limits_{x\to c^+}f(x)$ (both finite);
- this common value equals $f(c)$.
Briefly: LHL $=$ RHL $=f(c)$. If $c$ is in the domain and $f$ is not continuous at $c$, then $c$ is called a point of discontinuity of $f$. If $c$ is the left end-point $a$ of a domain $[a,b]$, only the right-hand limit is available, and $f$ is continuous at $a$ when $\lim\limits_{x\to a^+}f(x)=f(a)$; similarly at a right end-point $b$ we need $\lim\limits_{x\to b^-}f(x)=f(b)$.
When continuity fails, the way it fails is worth naming, because it tells you what (if anything) can be repaired:
(a) $f(x)=x^3-2x+1$ at $x=2$ (b) $f(x)=\dfrac{x^2-9}{x-3}$ for $x\ne3$, $f(3)=5$, at $x=3$
(c) $f(x)=\begin{cases}x+3,&x\le1\\ x^2+1,&x\gt1\end{cases}$ at $x=1$ (d) $f(x)=\begin{cases}x^2,&x\le2\\ 3x-2,&x\gt2\end{cases}$ at $x=2$
Continuous Functions and Points of Discontinuity
A single point is rarely the whole story. We usually want to know where a function is continuous.
A real function $f$ is a continuous function if it is continuous at every point of its domain.
$f$ is continuous on an open interval $(a,b)$ if it is continuous at every point of $(a,b)$. It is continuous on a closed interval $[a,b]$ if it is continuous on $(a,b)$, and also $\lim\limits_{x\to a^+}f(x)=f(a)$ and $\lim\limits_{x\to b^-}f(x)=f(b)$ (continuity from the right at $a$ and from the left at $b$).
Notice the words “of its domain”. A point where $f$ is not defined is not a point of discontinuity: there is simply no value there to test. So $f(x)=\dfrac1x$, whose graph is in two separate pieces, is nevertheless a continuous function — it is continuous at every $x\ne0$, and $0$ is not in its domain. The “draw it without lifting the pen” picture is reliable only when the domain is a single interval.
- Write down the domain. Points outside it are never points of discontinuity.
- On each open interval where $f$ is given by a single polynomial, trigonometric or other standard formula, $f$ is continuous (Theorems 5.1–5.3 below make this official).
- Test the remaining “joining points” one at a time: compute LHL, RHL and $f(c)$.
- For $[\ \cdot\ ]$, test where the inside becomes an integer; for $|\ \cdot\ |$, the modulus itself never causes a break.
(b) Find $a$ and $b$ so that $f(x)=\begin{cases}4,&x\le1\\ ax+b,&1\lt x\lt5\\ 16,&x\ge5\end{cases}$ is a continuous function.
(c) Find $k$ so that $f(x)=\begin{cases}kx+1,&x\le\pi\\ \cos x,&x\gt\pi\end{cases}$ is continuous at $x=\pi$.
The Algebra of Continuous Functions and Composition
Testing every point with limits would be exhausting. Fortunately continuity survives the usual ways of combining functions, so a handful of basic facts covers almost everything.
Let $f$ and $g$ be real functions that are both continuous at a point $c$ (so $c$ is in both domains). Then
- $f+g$ and $f-g$ are continuous at $c$;
- $f\cdot g$ is continuous at $c$, and so is $\lambda f$ for every real constant $\lambda$;
- $\dfrac fg$ is continuous at $c$, provided $g(c)\ne0$.
Proof (sum). By the algebra of limits (Class 11) and the continuity of $f$ and $g$, $$\lim_{x\to c}(f+g)(x)=\lim_{x\to c}f(x)+\lim_{x\to c}g(x)=f(c)+g(c)=(f+g)(c).$$ The other parts are proved the same way with the product and quotient rules for limits; the quotient rule needs $\lim\limits_{x\to c}g(x)=g(c)\ne0$. $\blacksquare$
(i) Every constant function, the identity $x$, and every polynomial $a_0+a_1x+\dots+a_nx^n$ is continuous at every real number. (ii) A rational function $\dfrac{p(x)}{q(x)}$ ($p,q$ polynomials) is continuous at every point where $q(x)\ne0$, i.e. it is a continuous function. (iii) $\sin x$ and $\cos x$ are continuous at every real number; $\tan x$, $\cot x$, $\sec x$, $\operatorname{cosec}x$ are continuous at every point of their domains. (iv) $|x|$ is continuous at every real number.
Why. (i) Constants and $x$ are continuous (their limits are found by substitution); a polynomial is built from them by sums and products, so Theorem 5.1 applies. (ii) follows from (i) and the quotient part of Theorem 5.1. (iii) For any $c$, put $x=c+h$: $$\lim_{h\to0}\sin(c+h)=\lim_{h\to0}(\sin c\cos h+\cos c\sin h)=\sin c\cdot1+\cos c\cdot0=\sin c,$$ using $\cos h\to1$ and $\sin h\to0$; $\cos x$ is similar, and $\tan x=\dfrac{\sin x}{\cos x}$ etc. are quotients with non-zero denominators on their domains. (iv) For $c\gt0$, $|x|=x$ near $c$; for $c\lt0$, $|x|=-x$ near $c$; at $0$ see Example 2(a). $\blacksquare$
Many functions are built in layers: in $\sin(x^2)$ we first square, then take the sine. If $g$ and $f$ are real functions, the function $x\mapsto f(g(x))$ — “first $g$, then $f$” — is called the composite of $f$ and $g$ and is written $f\circ g$; it is defined at those $x$ for which $g(x)$ lies in the domain of $f$.
Let $f$ and $g$ be real 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$: $$\lim_{x\to c}f(g(x))=f\Big(\lim_{x\to c}g(x)\Big)=f(g(c)).$$
Why. As $x\to c$, continuity of $g$ makes $g(x)\to g(c)$; and as the input of $f$ approaches $g(c)$, continuity of $f$ at $g(c)$ makes $f(g(x))\to f(g(c))$. $\blacksquare$
(a) $f(x)=\dfrac{\sin3x}{x}$ for $x\ne0$, $f(0)=k$ (b) $f(x)=\dfrac{1-\cos4x}{8x^2}$ for $x\ne0$, $f(0)=k$
1. Calling a point outside the domain a discontinuity. $\tan x$ is a continuous function; $x=\tfrac\pi2$ is not a point of discontinuity, because $\tan\tfrac\pi2$ does not exist. Board answers are marked on exactly this point.
2. Checking only one side. For a piecewise function, LHL, RHL and $f(c)$ are needed, and you must use the correct piece for each: the piece with “$x\le c$” gives both the LHL and $f(c)$.
3. “The limit exists, so $f$ is continuous.” Not unless the limit equals $f(c)$ — Example 1(b) has a limit and is still discontinuous.
4. Simplifying across the point. $\dfrac{x^2-9}{x-3}=x+3$ only for $x\ne3$. The simplification gives the limit; the value at $3$ must be read from the definition of $f$.
5. Confusing a corner with a break. $|x|$ has a sharp corner at $0$ but is continuous there. Corners matter for differentiability, the subject of the next section.
In JEE Main and JEE Advanced 2026; not examined in the CBSE board exam. JEE loves functions built from $[x]$, where a jump of one factor can be cancelled by a zero of another. The method is always the same: at each integer $n$ use $[x]=n-1$ just to the left and $[x]=n$ at and just to the right.
Worked example. Where are (a) $f(x)=[x]\sin\pi x$ and (b) $g(x)=[x]+[-x]$ continuous?
(a) At a non-integer, $f$ is a constant times $\sin\pi x$ nearby: continuous. At an integer $n$: LHL $=(n-1)\sin n\pi=0$, RHL $=n\sin n\pi=0$, $f(n)=0$. So $f$ is continuous everywhere — the zeros of $\sin\pi x$ sit exactly on the jumps of $[x]$.
(b) If $x$ is an integer, $[x]+[-x]=x-x=0$. If not, $[-x]=-[x]-1$, so $g(x)=-1$. At every integer the limit is $-1$ but the value is $0$: a removable discontinuity at every integer, continuous elsewhere.
Exercises
- 1 $f(x)=2x^2-3x+5$ at $x=1$
- 2 $f(x)=\dfrac{x^2-25}{x-5}$ for $x\ne5$, $f(5)=10$, at $x=5$
- 3 $f(x)=\dfrac{x^2-25}{x-5}$ for $x\ne5$, $f(5)=5$, at $x=5$
- 4 $f(x)=\begin{cases}3x-2,&x\le0\\ x+1,&x\gt0\end{cases}$ at $x=0$
- 5 $f(x)=\begin{cases}x^2,&x\le1\\ 2x-1,&x\gt1\end{cases}$ at $x=1$
- 6 $f(x)=|x-3|$ at $x=3$
- 7 $f(x)=x-[x]$ at $x=2$
- 8 $f(x)=\dfrac{\sin x}{x}$ for $x\ne0$, $f(0)=1$, at $x=0$
- 9 Is $x=2$ a point of discontinuity of $f(x)=\dfrac{1}{x-2}$? Explain.
- 1 $f(x)=x^3-x^2+4$
- 2 $f(x)=\begin{cases}x+1,&x\ge1\\ x^2+1,&x\lt1\end{cases}$
- 3 $f(x)=\dfrac{|x|}{x}$ for $x\ne0$, $f(0)=1$
- 4 $f(x)=\begin{cases}|x|+3,&x\le-3\\ -2x,&-3\lt x\lt3\\ 6x+2,&x\ge3\end{cases}$
- 5 $f(x)=[x]$ on the interval $-2\lt x\lt2$
- 6 $f(x)=\tan x$
- 7 $f(x)=x^2\sin\dfrac1x$ for $x\ne0$, $f(0)=0$ (Hint: $-x^2\le x^2\sin\tfrac1x\le x^2$.)
- 8 $f(x)=\begin{cases}x+2,&x\le1\\ x-2,&x\gt1\end{cases}$
- 1 $f(x)=\begin{cases}kx+1,&x\le5\\ 3x-5,&x\gt5\end{cases}$ at $x=5$
- 2 $f(x)=\begin{cases}k(x^2+2),&x\le0\\ 3x+1,&x\gt0\end{cases}$ at $x=0$
- 3 $f(x)=\dfrac{x^2-16}{x-4}$ for $x\ne4$, $f(4)=k$, at $x=4$
- 4 $f(x)=\dfrac{k\cos x}{\pi-2x}$ for $x\ne\tfrac\pi2$, $f\!\left(\tfrac\pi2\right)=3$, at $x=\tfrac\pi2$
- 5 $f(x)=\dfrac{1-\cos kx}{x\sin x}$ for $x\ne0$, $f(0)=\tfrac12$, at $x=0$
- 6 $f(x)=\begin{cases}7,&x\le1\\ ax+b,&1\lt x\lt4\\ 1,&x\ge4\end{cases}$, everywhere
- 7 $f(x)=\begin{cases}-2\sin x,&x\le-\tfrac\pi2\\ a\sin x+b,&-\tfrac\pi2\lt x\lt\tfrac\pi2\\ \cos x,&x\ge\tfrac\pi2\end{cases}$, everywhere
- 1 Show that $f(x)=\cos|x|$ is continuous everywhere. (Can you write it more simply?)
- 2 Show that $f(x)=\sin|x|$ is continuous everywhere.
- 3 Show that $f(x)=|x|+|x-1|$ is continuous everywhere, and write it without modulus signs on each of $x\lt0$, $0\le x\lt1$, $x\ge1$.
- 4 Give two functions, each discontinuous at $0$, whose sum is continuous at $0$.
- 5 $f$ is continuous at $c$ and $g$ is not. Can $f+g$ be continuous at $c$? Justify.
- 6 Parking. A mall charges ₹20 for the first hour or part of it, and ₹15 for each further hour or part. Let $P(t)$ be the fee for a stay of $t$ hours, $0\lt t\le5$. Find $P(1)$ and $P(1.25)$, and list the points of discontinuity of $P$.
- 7 Water tank. The depth of water in a tank $t$ minutes after a pump starts is $h(t)=0.04t$ m for $0\le t\le30$ and $h(t)=a-0.02t$ m for $30\lt t\le90$ (the tank is then drained). Find $a$ so that $h$ is continuous, and the depth at $t=90$.
How this is examined: the Board almost always sets a 1-mark “find $k$” question and a 3-mark problem with two unknown constants at two joining points; a case study may model a tariff or a fee. JEE tests $[x]$- and modulus-type functions and counts points of discontinuity.
E1. Board · 1 mark The value of $k$ for which $f(x)=\dfrac{\sin5x}{3x}$ ($x\ne0$), $f(0)=k$, is continuous at $x=0$ is (A) $\tfrac35$ (B) $\tfrac53$ (C) $5$ (D) $15$
E2. Board · 1 mark Assertion–Reason. Assertion (A): $f(x)=\dfrac{1}{x-3}$ is a continuous function. Reason (R): a real function is continuous if it is continuous at every point of its domain. (A) Both A and R are true and R is the correct explanation of A (B) Both A and R are true but R is not the correct explanation of A (C) A is true but R is false (D) A is false but R is true
E3. Board · 3 marks Find $a$ and $b$ if $f(x)=\begin{cases}5ax-2b,&x\lt1\\ 11,&x=1\\ 3ax+b,&x\gt1\end{cases}$ is continuous at $x=1$.
E4. Board · Case study A state electricity board charges ₹3 per unit for the first $100$ units used in a month and ₹5 per unit for every unit beyond $100$ (a “telescopic” tariff), so the bill for $u$ units is $B(u)=3u$ for $0\le u\le100$ and $B(u)=300+5(u-100)$ for $u\gt100$. (i) Show that $B$ is continuous at $u=100$. [2 marks] (ii) A rival board charges $5u$ for the whole consumption once $u\gt100$ (and $3u$ for $u\le100$). What happens to its bill at $u=100$? [1 mark] (iii) The rival instead charges $5u-c$ for $u\gt100$. Find the rebate $c$ that makes its bill continuous. [1 mark]
E5. JEE Main The number of points in the open interval $(0,3)$ at which $f(x)=[x^2]$ is discontinuous is (A) $2$ (B) $3$ (C) $8$ (D) $9$
E6. JEE Advanced (One or more options correct.) Let $f(x)=[x]\sin\pi x$, $g(x)=[x]+[-x]$ and $h(x)=x[x]$. Then (A) $f$ is continuous on $\mathbb R$ (B) $g$ is continuous at $x=1$ (C) $h$ is continuous at $x=0$ (D) $g$ has a removable discontinuity at every integer
Research question. Is your household electricity bill a continuous function of the number of units used — and if not, where does it jump, and by how much?
Why it matters. Slab tariffs are used for electricity, water and income tax all over the world. A tariff whose bill jumps at a slab boundary can make one extra unit cost hundreds of rupees, which feels unfair and encourages people to under-report. Regulators therefore design “telescopic” slabs, which keep the bill continuous even though the price per unit jumps.
What to do.
- Find the domestic tariff of your state's electricity distribution company (it is published on the company's or the state regulatory commission's website) or use a recent bill at home. Note the slabs, the price per unit in each, and any fixed charge that depends on the slab.
- Write the bill $B(u)$ as a piecewise function of the monthly units $u$, and test continuity at every slab boundary using LHL, RHL and $B(u)$.
- In a spreadsheet, tabulate $B(u)$ for $u=0,1,\dots,500$ and plot it. Mark every jump and its size.
- Compute the “marginal cost” $B(u+1)-B(u)$ and plot it as well. Which graph has jumps for a telescopic tariff, and which does not?
Tools: Spreadsheet; your state's published tariff or a household bill.
Hand in: The piecewise formula, the continuity check at each boundary, the two plots, and a short paragraph: is the tariff fair at the boundaries? Suggest a change of fixed charges that would make the bill continuous.
Going further. Income tax in the new Indian regime is also slab-based. Is tax owed a continuous function of income? Look up “marginal relief” and explain, in terms of continuity, the problem it solves.
🧪 Self-check quiz
Q1. A function $f$ is continuous at a point $c$ of its domain exactly when
Q2. The points of discontinuity of $f(x)=\dfrac{1}{x-2}$ are
Q3. The greatest integer function $[x]$ is discontinuous at
Q4. $f(x)=\dfrac{x^2-1}{x-1}$ for $x\ne1$ and $f(1)=k$. $f$ is continuous at $1$ when $k=$
Q5. $f$ and $g$ are continuous at $c$. Which of these might fail to be continuous at $c$?