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

Exercise 5.1 · Q24: Is x2sin⁡1xx^2\sin\frac1x (with f(0)=0f(0)=0⁠) continuous?

Exercise 5.1Continuity at a point · Section 5.2
The question

24. Determine if ff defined by

f(x)={x2sin⁡1x,if x≠00,if x=0f(x)=\begin{cases} x^2\sin\dfrac{1}{x}, & \text{if } x\ne 0\\[2mm] 0, & \text{if } x=0\end{cases}

is a continuous function?

Exam answer

For x≠0x \ne 0⁠, x2x^2 is a polynomial and sin⁡1x\sin\frac1x is the composite of the continuous functions 1x\frac1x and sin⁡x\sin x⁠. So their product ff is continuous at every x≠0x \ne 0⁠.

At x=0x = 0⁠: f(0)=0f(0) = 0⁠. For x≠0x \ne 0⁠, ∣sin⁡1x∣≤1\left|\sin\frac1x\right| \le 1⁠, so

−x2≤x2sin⁡1x≤x2-x^2 \le x^2\sin\frac1x \le x^2

As x→0x \to 0⁠, ±x2→0\pm x^2 \to 0⁠. So by the sandwich theorem,

LHL=lim⁡x→0−x2sin⁡1x=0RHL=lim⁡x→0+x2sin⁡1x=0\begin{aligned} \text{LHL} &= \lim_{x\to0^-}x^2\sin\frac1x = 0 \\ \text{RHL} &= \lim_{x\to0^+}x^2\sin\frac1x = 0 \end{aligned}

LHL=RHL=f(0)\text{LHL} = \text{RHL} = f(0)⁠, so ff is continuous at x=0x = 0⁠.

∴ f\therefore\ f is continuous at every x∈Rx \in \R⁠. Yes, ff is a continuous function.

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

The one idea this problem is built on

Near 00⁠, sin⁡1x\sin\frac1x swings between −1-1 and 11 infinitely often and has no limit. But it never leaves that band, so multiplying by x2x^2 traps the product between −x2-x^2 and x2x^2⁠. Both walls shrink to 00⁠, so the product is squeezed to 00⁠, which is exactly the value f(0)f(0)⁠. Away from 00⁠, ff is built from continuous functions, so it is continuous there too.

Given, to find, and the plan
Given
f(x)=x2sin⁡1xf(x)=x^2\sin\frac1x for x≠0x\ne0⁠, and f(0)=0f(0)=0⁠.
To find
Whether ff is continuous at every point of its domain.
Plan
(1) Domain. (2) Continuity at every c≠0c\ne0 by Theorems 1 and 2. (3) f(0)f(0)⁠. (4) The bound ∣f(x)∣≤x2|f(x)|\le x^2⁠. (5) Both one-sided limits at 00 by the sandwich theorem. (6) Compare. (7) Why the factor x2x^2 is essential.

Basics you need

1Continuity at a point

Left-hand limit, right-hand limit and f(c)f(c) exist and are equal (Definition 1, Section 5.2). Basics: left-hand and right-hand limits

2Composite functions

sin⁡1x\sin\frac1x is the composite g(h(x))g(h(x)) with inner function h(x)=1xh(x)=\frac1x and outer function g(u)=sin⁡ug(u)=\sin u⁠. Theorem 2: if hh is continuous at cc and gg at h(c)h(c)⁠, then g∘hg\circ h is continuous at cc⁠. Basics: composite functions

3Sine is bounded

−1≤sin⁡θ≤1-1\le\sin\theta\le1 for every real θ\theta⁠, so ∣sin⁡θ∣≤1|\sin\theta|\le1⁠. Basics: trigonometric identities

4The sandwich (squeeze) theorem

If g(x)≤f(x)≤k(x)g(x)\le f(x)\le k(x) near aa (except possibly at aa⁠) and gg and kk have the same limit LL at aa⁠, then lim⁡x→af(x)=L\lim_{x\to a}f(x)=L⁠. It works for one-sided limits too (Class XI, Chapter 12). Basics: what a limit is

Solution

  1. The domain

    For x≠0x\ne0⁠, 1x\frac1x is defined, so x2sin⁡1xx^2\sin\frac1x is defined; and f(0)=0f(0)=0 is given. So ff is defined on all of R\R⁠. We check continuity at every c≠0c\ne0⁠, then at 00⁠.

  2. Every c≠0c\ne0 is a point of continuity

    Fix c≠0c\ne0⁠. Build x2sin⁡1xx^2\sin\frac1x step by step:

    Inner function h(x)=1xh(x)=\frac1x⁠: a rational function with non-zero denominator at cc⁠, so continuous at cc (Example 16, or Example 9).

    Outer function g(u)=sin⁡ug(u)=\sin u⁠: continuous at every real uu⁠, in particular at u=1cu=\frac1c (Example 17). By Theorem 2, sin⁡1x\sin\frac1x is continuous at cc⁠.

    Product: x2x^2 is a polynomial, continuous at cc (Example 14). By Theorem 1 (3), x2⋅sin⁡1xx^2\cdot\sin\frac1x is continuous at cc⁠.

    Finally, every xx with ∣x−c∣<∣c∣|x-c|\lt|c| has the same sign as cc⁠, so x≠0x\ne0 and f(x)=x2sin⁡1xf(x)=x^2\sin\frac1x on that open interval around cc⁠. Hence

    lim⁡x→cf(x)=c2sin⁡1c=f(c).\lim_{x\to c}f(x)=c^2\sin\frac1c=f(c).
    The special value at 00 does not interfere: the interval ∣x−c∣<∣c∣|x-c|\lt|c| stays on one side of 00⁠, so near cc the function is given by the single formula. The chain "inner, outer, then product" mirrors exactly how the formula is built.
    Theorem 2 (composites) and Theorem 1 (3) (products). Lesson: algebra of continuous functions
  3. The value at 00

    f(0)=0(given).f(0)=0\quad\text{(given)}.
    The formula x2sin⁡1xx^2\sin\frac1x cannot be used at 00 (10\frac10 is undefined), which is why the question supplies the value separately.
  4. The key bound

    For every x≠0x\ne0⁠, ∣sin⁡1x∣≤1\left|\sin\frac1x\right|\le1 (Basic 3). Multiplying by x2≥0x^2\ge0⁠:

    ∣f(x)∣=x2∣sin⁡1x∣≤x2,|f(x)|=x^2\left|\sin\tfrac1x\right|\le x^2,

    that is,

    −x2≤f(x)≤x2(x≠0).-x^2\le f(x)\le x^2\qquad(x\ne0).
    We cannot control sin⁡1x\sin\frac1x itself near 00⁠, but we can control its size: it is never bigger than 11⁠. Multiplying an inequality by a non-negative number keeps its direction, so the bound passes to the product.
    ∣ab∣=∣a∣ ∣b∣|ab|=|a|\,|b| and ∣x2∣=x2|x^2|=x^2⁠.
  5. Both one-sided limits at 00

    Right-hand limit. For x>0x\gt0⁠, −x2≤f(x)≤x2-x^2\le f(x)\le x^2⁠, and lim⁡x→0+(−x2)=0\lim_{x\to0^+}(-x^2)=0 =lim⁡x→0+x2=\lim_{x\to0^+}x^2⁠. By the sandwich theorem,

    lim⁡x→0+f(x)=0.\lim_{x\to0^+}f(x)=0.

    Left-hand limit. For x<0x\lt0 the same bound holds (it was proved for every x≠0x\ne0⁠), and ±x2→0\pm x^2\to0 as x→0−x\to0^-⁠. So

    lim⁡x→0−f(x)=0.\lim_{x\to0^-}f(x)=0.
    The function is trapped between two walls that pinch together at the origin, from both sides. Whatever the wiggles do, they cannot escape the shrinking gap between −x2-x^2 and x2x^2⁠.
    Sandwich theorem, Class XI, Chapter 12. Basics: what a limit is
  6. Compare

    lim⁡x→0−f(x)=0,f(0)=0,lim⁡x→0+f(x)=0.\begin{aligned} \lim_{x\to0^-}f(x)&=0,\\ f(0)&=0,\\ \lim_{x\to0^+}f(x)&=0. \end{aligned}

    All three agree, so ff is continuous at 00⁠. With Step 2, ff is continuous at every real number: yes, ff is a continuous function.

    Continuity at a point. Lesson: continuity at a point
  7. Why the factor x2x^2 is essential

    Without it, sin⁡1x\sin\frac1x has no limit at 00⁠. Take xk=1π2+2kπx_k=\frac{1}{\frac{\pi}{2}+2k\pi} and yk=13π2+2kπy_k=\frac{1}{\frac{3\pi}{2}+2k\pi}⁠, k=1,2,3,…k=1,2,3,\ldots Both sequences tend to 00 from the right, yet

    sin⁡1xk=sin⁡(π2+2kπ)=1,sin⁡1yk=sin⁡(3π2+2kπ)=−1.\begin{aligned} \sin\frac{1}{x_k}&=\sin\left(\tfrac{\pi}{2}+2k\pi\right)=1,\\ \sin\frac{1}{y_k}&=\sin\left(\tfrac{3\pi}{2}+2k\pi\right)=-1. \end{aligned}

    Arbitrarily close to 00 the values 11 and −1-1 both occur, so they cannot settle on one number. With the factor x2x^2⁠, those values become xk2x_k^2 and −yk2-y_k^2⁠, both tending to 00⁠.

    This explains the question's interest: a wildly oscillating factor can still give a continuous function, provided it is multiplied by something that tends to 00 and the oscillation stays bounded.
−0.4 −0.2 0.2 0.4 −0.1 0.1 x y y = x² sin(1/x) for x ≠ 0 y = x² and y = −x², the walls of the squeeze f(0) = 0
y=x2sin⁡1xy=x^2\sin\frac1x (blue) for −0.4≤x≤0.4-0.4\le x\le0.4⁠. The wiggles get faster near 00 but the curve never crosses the dashed parabolas y=±x2y=\pm x^2⁠, which close in on the origin. The filled point (0,0)(0,0) is the given value f(0)f(0)⁠, exactly where the walls meet. (The two axes use different scales.)
Result

Yes. ff is continuous at every c≠0c\ne0 (Theorems 1 and 2) and at 00 (both one-sided limits are 0=f(0)0=f(0) by the squeeze −x2≤f(x)≤x2-x^2\le f(x)\le x^2⁠). So ff is continuous for all x∈Rx\in\R⁠.

(Textbook answer: Yes, ff is continuous for all x∈Rx\in\R⁠.)

Check it with numbers
xxf(x)=x2sin⁡1xf(x)=x^2\sin\frac1xwall x2x^2
0.10.1−0.0054402-0.00544020.010.01
0.010.01−0.0000506-0.00005060.00010.0001
0.0010.0010.000000830.000000830.0000010.000001
−0.001-0.001−0.00000083-0.000000830.0000010.000001

Each ∣f(x)∣|f(x)| is at most the wall x2x^2⁠, and both shrink towards 0=f(0)0=f(0)⁠. ✓ The signs jump around (that is the sin⁡1x\sin\frac1x factor), but the sizes do not.

Common mistakes
  1. Writing lim⁡x2sin⁡1x\lim x^2\sin\frac1x =lim⁡x2⋅lim⁡sin⁡1x=\lim x^2\cdot\lim\sin\frac1x⁠. The product rule for limits needs both limits to exist, and lim⁡x→0sin⁡1x\lim_{x\to0}\sin\frac1x does not. Use the squeeze instead.
  2. Saying sin⁡1x→sin⁡∞\sin\frac1x\to\sin\infty⁠. "sin⁡∞\sin\infty" is not a number; this is exactly the oscillation that has no limit.
  3. Forgetting the points c≠0c\ne0⁠. "Is ff a continuous function" asks about every point of the domain.
  4. Bounding wrongly. −1≤sin⁡1x≤1-1\le\sin\frac1x\le1 times x2x^2 gives −x2≤f(x)≤x2-x^2\le f(x)\le x^2⁠; multiplying by xx instead would need care with the sign of xx⁠.
What to take away
  1. (something tending to 00⁠) ×\times (something bounded) tends to 00⁠. Prove it with the sandwich theorem.
  2. Away from the special point, use Theorems 1 and 2, naming the inner and outer functions of each composite.
  3. A function can oscillate infinitely often near a point and still be continuous there.

Every fact used, and where it comes from

FactUsed inSource
Continuity at a point; continuous functionSteps 2, 6Definitions 1 and 2, Section 5.2 (Lesson: continuity at a point)
1x\frac1x continuous for x≠0x\ne0⁠; polynomials continuousStep 2Examples 9, 14 and 16, Section 5.2
Sine is continuousStep 2Example 17, Section 5.2.1
Composite and product of continuous functionsStep 2Theorem 2 and Theorem 1 (3), Section 5.2.1 (Lesson: algebra of continuous functions)
∣sin⁡θ∣≤1|\sin\theta|\le1⁠; sin⁡(π2+2kπ)=1\sin\left(\frac{\pi}{2}+2k\pi\right)=1⁠, sin⁡(3π2+2kπ)=−1\sin\left(\frac{3\pi}{2}+2k\pi\right)=-1Steps 4, 7Class XI, Chapter 3 (Trigonometric Functions)
Sandwich theoremStep 5Class XI, Chapter 12 (Limits and Derivatives)
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 →