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

Exercise 5.1 · Q31: cos⁡(x2)\cos(x^2) is a continuous function

Exercise 5.1Algebra of continuous functions · Section 5.2.1
The question

31. Show that the function defined by f(x)=cos⁡(x2)f(x) = \cos(x^2) is a continuous function.

Exam answer

Let h(x)=x2h(x) = x^2 and g(x)=cos⁡xg(x) = \cos x⁠. Then

(g∘h)(x)=g(x2)=cos⁡(x2)=f(x)\begin{aligned} (g\circ h)(x) &= g(x^2) \\ &= \cos(x^2) = f(x) \end{aligned}

hh is a polynomial, so it is continuous at every real number. g(x)=cos⁡xg(x) = \cos x is continuous at every real number.

Let cc be any real number. Then hh is continuous at cc and gg is continuous at h(c)=c2h(c) = c^2⁠. The composite of continuous functions is continuous, so f=g∘hf = g\circ h is continuous at cc⁠:

lim⁡x→ccos⁡(x2)=cos⁡(c2)=f(c)\lim_{x\to c}\cos(x^2) = \cos(c^2) = f(c)

∴ f(x)=cos⁡(x2)\therefore\ f(x) = \cos(x^2) is a continuous function. Hence proved.

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

The one idea this problem is built on

To work out cos⁡(x2)\cos(x^2) you do two things in order: square xx⁠, then take the cosine. So ff is a composite of two functions, "square" and "cosine". Each of them is continuous at every real number, and Theorem 2 says that a continuous function of a continuous function is continuous. That settles it, exactly as Example 19 does for sin⁡(x2)\sin(x^2)⁠.

Given, to find, and the plan
Given
f(x)=cos⁡(x2)f(x) = \cos(x^2)⁠, xx a real number (angles in radians).
To show
ff is continuous at every point of its domain (Definition 2).
Plan
(1) Find the domain. (2) Write f=g∘hf = g \circ h with h(x)=x2h(x) = x^2 and g(x)=cos⁡xg(x) = \cos x⁠. (3) hh is continuous. (4) gg is continuous. (5) Apply Theorem 2 at an arbitrary point cc⁠.

Basics you need

1Composite functions

(g∘h)(x)=g(h(x))(g \circ h)(x) = g(h(x))⁠: first apply hh (the inner function), then apply gg (the outer function) to the result. Order matters. Basics: composite functions

2Theorem 2 (continuity of a composite)

If hh is continuous at cc and gg is continuous at h(c)h(c)⁠, then g∘hg \circ h is continuous at cc (Section 5.2.1). Lesson: algebra of continuous functions

3Polynomials are continuous

Every polynomial, such as x2x^2⁠, is continuous at every real number (Example 14). Basics: what a limit is

4Cosine is continuous

cos⁡\cos is continuous at every real number (Remark after Example 17). It uses lim⁡h→0cos⁡h=1\lim_{h\to0}\cos h = 1 and lim⁡h→0sin⁡h=0\lim_{h\to0}\sin h = 0⁠, limits from Class XI (Limits and Derivatives) that Example 17 uses without proof. Basics: trigonometric identities

5Continuous function

A function is continuous if it is continuous at every point of its domain (Definition 2). Lesson: continuity at a point

Solution

  1. The domain is all of R\R

    For any real xx⁠, x2x^2 is a real number, and the cosine of any real number is defined. So f(x)=cos⁡(x2)f(x) = \cos(x^2) is defined for every real xx⁠: the domain is R\R⁠.

    By Definition 2, "continuous function" means continuous at every point of the domain, so we first need to know which points those are. Here there are no exclusions.
    cos⁡u\cos u is defined for every real uu (the point at angle uu on the unit circle always exists). Basics: trigonometric identities
  2. Write ff as a composite g∘hg \circ h

    Let

    h(x)=x2  (inner),g(u)=cos⁡u  (outer).h(x) = x^2 \ \ (\text{inner}), \qquad g(u) = \cos u \ \ (\text{outer}).

    Then for every real xx⁠,

    (g∘h)(x)=g(h(x))=g(x2)=cos⁡(x2)=f(x).(g \circ h)(x) = g\big(h(x)\big) = g(x^2) = \cos(x^2) = f(x).

    So f=g∘hf = g \circ h⁠. The composite is defined at every xx⁠, since the range of hh (the numbers ≥0\ge 0⁠) lies inside the domain of gg (all of R\R⁠).

    Theorem 2 is about composites, so we must first exhibit ff as one. Pay attention to the order: h∘gh \circ g would be (cos⁡x)2=cos⁡2x(\cos x)^2 = \cos^2 x⁠, a different function. We square first, so squaring is the inner function.
    g∘hg \circ h means "do hh⁠, then gg" (Basic 1). Basics: composite functions
  3. The inner function h(x)=x2h(x) = x^2 is continuous everywhere

    hh is a polynomial, so it is continuous at every real number (Example 14). Concretely, for any real cc⁠,

    lim⁡x→cx2=c⋅c=c2=h(c).\lim_{x\to c} x^2 = c \cdot c = c^2 = h(c).
    The limit of a product is the product of the limits, and lim⁡x→cx=c\lim_{x\to c} x = c (Example 6). This is the step "as xx gets close to cc⁠, x2x^2 gets close to c2c^2".
    Polynomials are continuous (Basic 3). Basics: what a limit is
  4. The outer function g(u)=cos⁡ug(u) = \cos u is continuous everywhere

    Take any real dd and write u=d+tu = d + t⁠, so u→du \to d means t→0t \to 0⁠. Then

    lim⁡u→dcos⁡u=lim⁡t→0cos⁡(d+t)=lim⁡t→0(cos⁡dcos⁡t−sin⁡dsin⁡t)=cos⁡d⋅1−sin⁡d⋅0=cos⁡d.\begin{aligned} \lim_{u\to d} \cos u &= \lim_{t\to0} \cos(d + t)\\ &= \lim_{t\to0} (\cos d\cos t - \sin d\sin t)\\ &= \cos d\cdot 1 - \sin d\cdot 0 = \cos d. \end{aligned}

    So lim⁡u→dcos⁡u=cos⁡d=g(d)\lim_{u\to d}\cos u = \cos d = g(d)⁠: cosine is continuous at every real dd⁠.

    The textbook proves this for sine in Example 17 and says "a similar proof" works for cosine; this is that proof. It needs only the expansion of cos⁡(d+t)\cos(d + t) and the facts cos⁡t→1\cos t \to 1⁠, sin⁡t→0\sin t \to 0 as t→0t \to 0⁠. Those two limits come from Class XI (Limits and Derivatives); the book's Example 17 uses them without proof (it says the sine limit is "intuitively clear from the graph").
    cos⁡(A+B)=cos⁡Acos⁡B−sin⁡Asin⁡B\cos(A + B) = \cos A\cos B - \sin A\sin B (Basic 4). Basics: trigonometric identities
  5. Apply Theorem 2 at an arbitrary point

    Let cc be any real number.

    • hh is continuous at cc (Step 3).
    • gg is continuous at h(c)=c2h(c) = c^2⁠, because gg is continuous at every real number (Step 4 with d=c2d = c^2⁠).

    By Theorem 2, g∘h=fg \circ h = f is continuous at cc⁠. In limit form:

    lim⁡x→ccos⁡(x2)=cos⁡(c2)=f(c).\lim_{x\to c} \cos(x^2) = \cos(c^2) = f(c).

    Since cc was an arbitrary real number, ff is continuous at every point of its domain R\R⁠, so ff is a continuous function.

    x y −3 −2 2 3 −1 1 1 −1 y = cos(x²)
    The graph of y=cos⁡(x2)y = \cos(x^2)⁠. It wiggles faster as ∣x∣|x| grows (because x2x^2 grows faster and faster), but it never breaks: it is drawn in one stroke, as a continuous function should be.
    Theorem 2 needs two things at the point: the inner function continuous at cc⁠, and the outer function continuous at the inner value h(c)h(c)⁠. Both hold for every cc⁠, so the conclusion holds for every cc⁠. Choosing cc arbitrary is what turns one check into a proof for all real numbers.
    Theorem 2, Section 5.2.1; the same pattern as Example 19 (sin⁡(x2)\sin(x^2)⁠). Lesson: algebra of continuous functions
Result

f(x)=cos⁡(x2)f(x) = \cos(x^2) is the composite of the continuous functions x↦x2x \mapsto x^2 and cos⁡\cos⁠, so by Theorem 2 it is continuous at every real number: it is a continuous function. (The answer key gives no separate answer for this "show that" question.)

Check it with numbers

At c=1.5c = 1.5 and two nearby points:

f(1.5)=cos⁡2.25≈−0.6281736,f(1.501)=cos⁡2.253001≈−0.6305058,f(1.499)=cos⁡2.247001≈−0.6258374.\begin{aligned} f(1.5) &= \cos 2.25 \approx -0.6281736,\\ f(1.501) &= \cos 2.253001 \approx -0.6305058,\\ f(1.499) &= \cos 2.247001 \approx -0.6258374. \end{aligned}

Moving xx by 0.001 moves ff by only about 0.0023, and a step of 0.0001 moves it by about 0.00023: the values close in on f(1.5)f(1.5) from both sides. ✓

Common mistakes
  1. Reading cos⁡(x2)\cos(x^2) as cos⁡2x\cos^2 x⁠. cos⁡(x2)\cos(x^2) squares the angle; cos⁡2x=(cos⁡x)2\cos^2 x = (\cos x)^2 squares the cosine. They are different composites (g∘hg\circ h versus h∘gh\circ g⁠).
  2. Using Theorem 1 instead of Theorem 2. cos⁡(x2)\cos(x^2) is not a sum, product or quotient of cos⁡x\cos x and x2x^2⁠; it is a function of a function.
  3. Checking a few points only. "Continuous function" is a claim about every point; argue at an arbitrary cc⁠.
What to take away
  1. Spot the layers: inner function first, outer function applied to its result.
  2. Continuous inside continuous is continuous (Theorem 2).
  3. Polynomials, sine and cosine are continuous everywhere, so any composite built from them is too.

Every fact used, and where it comes from

FactUsed inSource
A continuous function is continuous at every point of its domainSteps 1, 5Definition 2, Section 5.2
(g∘h)(x)=g(h(x))(g\circ h)(x) = g(h(x))Step 2Composition of functions, Chapter 1 and Section 5.2.1
Polynomials are continuous; lim⁡x→cx=c\lim_{x\to c} x = cStep 3Examples 14 and 6, Section 5.2
Cosine is continuousStep 4Remark after Example 17, Section 5.2.1
cos⁡(A+B)=cos⁡Acos⁡B−sin⁡Asin⁡B\cos(A + B) = \cos A\cos B - \sin A\sin B⁠; cos⁡t→1\cos t\to1⁠, sin⁡t→0\sin t\to0Step 4cos⁡(A+B)\cos(A + B)⁠: Class XI, Trigonometric Functions. The two limits: Class XI, Limits and Derivatives (used without proof in Example 17)
Continuity of a compositeStep 5Theorem 2, Section 5.2.1 (Lesson: algebra of continuous functions)
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 →