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

Exercise 5.1 · Q25: sin⁡x−cos⁡x\sin x-\cos x for x≠0x\ne0⁠, with f(0)=−1f(0)=-1

Exercise 5.1Continuity at a point · Section 5.2
The question

25. Examine the continuity of ff⁠, where ff is defined by

f(x)={sin⁡x−cos⁡x,if x≠0−1,if x=0f(x)=\begin{cases} \sin x-\cos x, & \text{if } x\ne 0\\ -1, & \text{if } x=0\end{cases}
Exam answer

For x≠0x \ne 0⁠, f(x)=sin⁡x−cos⁡xf(x) = \sin x - \cos x is a difference of continuous functions, so ff is continuous at every x≠0x \ne 0⁠.

At x=0x = 0⁠: f(0)=−1f(0) = -1⁠.

LHL=lim⁡h→0f(0−h)=lim⁡h→0(−sin⁡h−cos⁡h)=0−1=−1RHL=lim⁡h→0f(0+h)=lim⁡h→0(sin⁡h−cos⁡h)=0−1=−1\begin{aligned} \text{LHL} &= \lim_{h\to0}f(0 - h) \\ &= \lim_{h\to0}(-\sin h - \cos h) \\ &= 0 - 1 = -1 \\ \text{RHL} &= \lim_{h\to0}f(0 + h) \\ &= \lim_{h\to0}(\sin h - \cos h) \\ &= 0 - 1 = -1 \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⁠.

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

The one idea this problem is built on

Away from 00⁠, ff is the continuous function sin⁡x−cos⁡x\sin x-\cos x⁠. At 00 the value is given separately, so we must check that it matches the limit. The limit of sin⁡x−cos⁡x\sin x-\cos x at 00 is sin⁡0−cos⁡0=0−1=−1\sin0-\cos0=0-1=-1⁠, and the given value is −1-1⁠. They match, so there is no break. (In fact the formula itself gives −1-1 at 00⁠: the "special" value is not special at all.)

Given, to find, and the plan
Given
f(x)=sin⁡x−cos⁡xf(x)=\sin x-\cos x for x≠0x\ne0⁠, and f(0)=−1f(0)=-1⁠.
To find
The points at which ff is continuous (and any points of discontinuity).
Plan
(1) Domain. (2) Continuity at every c≠0c\ne0⁠. (3)–(5) At 00⁠: the value, the left-hand limit and the right-hand limit separately. (6) Compare. (7) Observe that ff is sin⁡x−cos⁡x\sin x-\cos x everywhere.

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

2Sine and cosine are continuous

Sine by Example 17; cosine by the Remark after it (proved in Q21 and Q22). By Theorem 1 (2), so is sin⁡x−cos⁡x\sin x-\cos x⁠. Basics: what a limit is

3Values and symmetry

sin⁡0=0\sin0=0⁠, cos⁡0=1\cos0=1⁠; sin⁡(−h)=−sin⁡h\sin(-h)=-\sin h⁠, cos⁡(−h)=cos⁡h\cos(-h)=\cos h⁠; and sin⁡h→0\sin h\to0⁠, cos⁡h→1\cos h\to1 as h→0h\to0⁠. Basics: trigonometric identities

4A value given separately

When a function is defined by "formula for x≠cx\ne c⁠, number at x=cx=c", continuity at cc asks whether the number equals the limit of the formula. Basics: piecewise functions

Solution

  1. The domain

    sin⁡x−cos⁡x\sin x-\cos x is defined for every x≠0x\ne0⁠, and f(0)=−1f(0)=-1 is given. So ff is defined on all of R\R⁠. We check every c≠0c\ne0⁠, then c=0c=0⁠.

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

    Fix c≠0c\ne0⁠. On the open interval ∣x−c∣<∣c∣|x-c|\lt|c| around cc⁠, no point equals 00⁠, so there f(x)=sin⁡x−cos⁡xf(x)=\sin x-\cos x⁠. This function is continuous at cc (Theorem 1 (2), since sine and cosine are), so

    lim⁡x→cf(x)=sin⁡c−cos⁡c=f(c).\lim_{x\to c}f(x)=\sin c-\cos c=f(c).
    Near cc the separately given value at 00 plays no part, because the limit at cc only looks at points close to cc⁠, and 00 is at distance ∣c∣>0|c|\gt0⁠.
    Difference of continuous functions (Theorem 1 (2)); see Q21 (b). Exercise 5.1 Q21
  3. At 00⁠: the value

    f(0)=−1(given).f(0)=-1\quad\text{(given)}.
  4. At 00⁠: the left-hand limit

    Put x=−hx=-h⁠, h>0h\gt0⁠, h→0h\to0⁠. Then x≠0x\ne0⁠, so the formula applies. Using sin⁡(−h)=−sin⁡h\sin(-h)=-\sin h and cos⁡(−h)=cos⁡h\cos(-h)=\cos h⁠:

    lim⁡x→0−f(x)=lim⁡h→0(−sin⁡h−cos⁡h)=−0−1=−1.\begin{aligned} \lim_{x\to0^-}f(x)&=\lim_{h\to0}\left(-\sin h-\cos h\right)\\ &=-0-1=-1. \end{aligned}
    As h→0h\to0⁠, sin⁡h→0\sin h\to0 and cos⁡h→1\cos h\to1 (Basic 3). The signs are handled by the odd/even symmetry of sine and cosine.
    One-sided limits with x=0−hx=0-h⁠. Basics: left-hand and right-hand limits
  5. At 00⁠: the right-hand limit

    Put x=hx=h⁠, h>0h\gt0⁠, h→0h\to0⁠:

    lim⁡x→0+f(x)=lim⁡h→0(sin⁡h−cos⁡h)=0−1=−1.\begin{aligned} \lim_{x\to0^+}f(x)&=\lim_{h\to0}\left(\sin h-\cos h\right)\\ &=0-1=-1. \end{aligned}
  6. Compare

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

    All three agree, so ff is continuous at 00⁠. With Step 2, ff is continuous at every real number, and it has no point of discontinuity.

    Continuity at a point. Lesson: continuity at a point
  7. The special value was not special

    The formula itself, evaluated at 00⁠, gives

    sin⁡0−cos⁡0=0−1=−1,\sin0-\cos0=0-1=-1,

    which is exactly the value assigned to f(0)f(0)⁠. So f(x)=sin⁡x−cos⁡xf(x)=\sin x-\cos x for every real xx⁠, including 00⁠, and ff is simply the function of Q21 (b) written in two lines.

    This is a useful cross-check: it confirms the conclusion of Steps 3 to 6 without any limits. It also shows what would go wrong with a different value: had the question set f(0)=0f(0)=0⁠, say, both one-sided limits would still be −1-1 but f(0)f(0) would not match, and ff would be discontinuous at 00 (a hole in the graph with the dot placed off the curve).
−2π −π π 2π 1 x y (0, −1) y = sin x − cos x (the rule for x ≠ 0) f(0) = −1, which lies on the same curve
y=sin⁡x−cos⁡xy=\sin x-\cos x on −2π≤x≤2π-2\pi\le x\le2\pi⁠; a sine-shaped wave between heights of about ±1.414\pm1.414 (plus or minus the square root of 2). The filled point (0,−1)(0,-1)⁠, the value given separately at 00⁠, lies exactly on the wave, so the graph has no gap.
Result

At 00 the left-hand limit, the right-hand limit and f(0)f(0) are all −1-1⁠, and at every c≠0c\ne0 ff agrees near cc with the continuous function sin⁡x−cos⁡x\sin x-\cos x⁠. So ff is continuous for all x∈Rx\in\R.

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

Check it with numbers

f(−0.001)≈−1.0009995f(-0.001)\approx-1.0009995 and f(0.001)≈−0.9989995f(0.001)\approx-0.9989995⁠. They differ from f(0)=−1f(0)=-1 by 0.00099950.0009995 and 0.00100050.0010005⁠, about 0.0010.001 each, and the gap shrinks with the step. ✓

At c=1c=1⁠: f(1)≈0.3011687f(1)\approx0.3011687⁠, while f(0.999)≈0.2997868f(0.999)\approx0.2997868 and f(1.001)≈0.3025503f(1.001)\approx0.3025503⁠. ✓

Common mistakes
  1. Taking cos⁡0=0\cos0=0⁠. cos⁡0=1\cos0=1⁠, so the limit is 0−1=−10-1=-1⁠, not 00⁠.
  2. Sign slip in the left-hand limit. cos⁡(−h)=+cos⁡h\cos(-h)=+\cos h (cosine is even), so −cos⁡(−h)→−1-\cos(-h)\to-1⁠.
  3. Stopping after the point 00⁠. "Examine the continuity of ff" means at every real number; Step 2 covers c≠0c\ne0⁠.
  4. Assuming a separately defined value always causes a discontinuity. It does only if it disagrees with the limit; here it agrees.
What to take away
  1. For "formula for x≠cx\ne c⁠, number at cc": the function is continuous at cc exactly when the number equals the limit of the formula at cc⁠.
  2. When the formula is itself continuous at cc⁠, that limit is just the formula's value at cc⁠.
  3. Always also check the points away from cc⁠, even if that part is quick.

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)
Sine and cosine are continuous; difference of continuous functionsStep 2Example 17 and the Remark after it; Theorem 1 (2), Section 5.2.1 (Lesson: algebra of continuous functions)
sin⁡h→0\sin h\to0⁠, cos⁡h→1\cos h\to1 as h→0h\to0Steps 4, 5sin⁡h→0\sin h\to0⁠: stated without proof in Example 17, Section 5.2.1; cos⁡h→1\cos h\to1 follows from cos⁡h=1−2sin⁡2h2\cos h=1-2\sin^2\frac h2 (Q21, Step 2)
sin⁡0=0\sin0=0⁠, cos⁡0=1\cos0=1⁠, sin⁡(−h)=−sin⁡h\sin(-h)=-\sin h⁠, cos⁡(−h)=cos⁡h\cos(-h)=\cos hSteps 4, 5, 7Class XI, Chapter 3 (Trigonometric 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 →