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

Exercise 5.1 · Q28: Find kk⁠: kx+1kx+1 for x≤πx\le\pi⁠, cos⁡x\cos x for x>πx>\pi

Exercise 5.1Continuity at a point · Section 5.2
The question

Find the values of kk so that the function ff is continuous at the indicated point in Exercises 26 to 29.

28. f(x)={kx+1,if x≤πcos⁡x,if x>πat x=π.f(x) = \begin{cases} kx + 1, & \text{if } x \le \pi \\ \cos x, & \text{if } x > \pi \end{cases} \qquad \text{at } x = \pi.

Exam answer f(π)=kπ+1LHL=lim⁡h→0f(π−h)=lim⁡h→0[k(π−h)+1]=kπ+1RHL=lim⁡h→0f(π+h)=lim⁡h→0cos⁡(π+h)=lim⁡h→0(−cos⁡h)=−1\begin{aligned} f(\pi) &= k\pi + 1 \\ \text{LHL} &= \lim_{h\to0}f(\pi - h) \\ &= \lim_{h\to0}[k(\pi - h) + 1] \\ &= k\pi + 1 \\ \text{RHL} &= \lim_{h\to0}f(\pi + h) \\ &= \lim_{h\to0}\cos(\pi + h) \\ &= \lim_{h\to0}(-\cos h) = -1 \end{aligned}

For continuity at x=πx = \pi⁠,

LHL=RHL=f(π)\text{LHL} = \text{RHL} = f(\pi) ⇒ kπ+1=−1 ⇒ k=−2π\Rightarrow\ k\pi + 1 = -1\ \Rightarrow\ k = -\frac{2}{\pi}

∴ k=−2π\therefore\ k = -\dfrac{2}{\pi}⁠.

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

The one idea this problem is built on

The straight line y=kx+1y = kx + 1 (used up to and including x=πx = \pi⁠) must arrive at the same height as the cosine curve (used after π\pi⁠). The line reaches kπ+1k\pi + 1⁠; the cosine curve starts from cos⁡π=−1\cos\pi = -1⁠. So we need kπ+1=−1k\pi + 1 = -1⁠, giving k=−2πk = -\frac{2}{\pi}⁠.

Given, to find, and the plan
Given
f(x)=kx+1f(x) = kx + 1 for x≤πx \le \pi and f(x)=cos⁡xf(x) = \cos x for x>πx > \pi⁠, with kk an unknown constant (xx in radians).
To find
Every value of kk for which ff is continuous at x=πx = \pi⁠.
Plan
(1) Find f(π)f(\pi) from the piece containing π\pi⁠. (2) Left-hand limit from kx+1kx + 1⁠. (3) Right-hand limit from cos⁡x\cos x⁠. (4) Set all three equal and solve for kk⁠. (5) Confirm.

Basics you need

1Continuity at a point

ff is continuous at a point cc of its domain when the left-hand limit, the right-hand limit and f(c)f(c) all exist and are equal (Definition 1, Section 5.2). Lesson: continuity at a point

2Which piece owns x=πx = \pi

"x≤πx \le \pi" includes π\pi⁠, so f(π)f(\pi) comes from kx+1kx + 1⁠. Basics: piecewise functions

3One-sided limits

The left-hand limit at π\pi uses only x<πx < \pi⁠; the right-hand limit uses only x>πx > \pi⁠. Basics: left-hand and right-hand limits

4Cosine is continuous, and cos⁡π=−1\cos\pi = -1

The cosine function is continuous at every real number (Remark after Example 17), so lim⁡x→πcos⁡x=cos⁡π\lim_{x\to\pi}\cos x = \cos\pi⁠. On the unit circle the angle π\pi points to (−1,0)(-1, 0)⁠, so cos⁡π=−1\cos\pi = -1⁠. Basics: trigonometric identities

Solution

  1. The value at the point: f(π)=kπ+1f(\pi) = k\pi + 1

    Every real xx satisfies exactly one of x≤πx \le \pi⁠, x>πx > \pi⁠, so ff is defined everywhere, and π\pi is in the domain. Since π≤π\pi \le \pi⁠, the first line applies:

    f(π)=kπ+1.f(\pi) = k\pi + 1.
    The value is what the limits must match. It comes from the line whose condition includes π\pi⁠; the cosine line is only for xx strictly greater than π\pi⁠.
    "≤\le" includes equality; ">>" does not (Basic 2).
  2. Left-hand limit: follow the line kx+1kx + 1

    For x<πx < \pi⁠, f(x)=kx+1f(x) = kx + 1⁠. Put x=π−hx = \pi - h⁠, h>0h > 0⁠, h→0h \to 0⁠:

    lim⁡x→π−f(x)=lim⁡h→0+(k(π−h)+1)=lim⁡h→0+(kπ+1−kh)=kπ+1.\begin{aligned} \lim_{x\to\pi^-} f(x) &= \lim_{h\to0^+} \big(k(\pi - h) + 1\big)\\ &= \lim_{h\to0^+} (k\pi + 1 - kh)\\ &= k\pi + 1. \end{aligned}
    kx+1kx + 1 is a polynomial (degree 1, or a constant if k=0k = 0⁠), so its limit is its value at π\pi (Example 14). The term −kh-kh is a fixed number kk times something shrinking to 0, so it vanishes.
    Polynomials are continuous: substitute to get the limit. Basics: what a limit is
  3. Right-hand limit: follow cos⁡x\cos x

    For x>πx > \pi⁠, f(x)=cos⁡xf(x) = \cos x⁠. Put x=π+hx = \pi + h⁠, h>0h > 0⁠, h→0h \to 0⁠:

    lim⁡x→π+f(x)=lim⁡h→0+cos⁡(π+h)=lim⁡h→0+(−cos⁡h)=−1.\begin{aligned} \lim_{x\to\pi^+} f(x) &= \lim_{h\to0^+} \cos(\pi + h)\\ &= \lim_{h\to0^+} (-\cos h)\\ &= -1. \end{aligned}
    By the formula for cos⁡(A+B)\cos(A + B)⁠, cos⁡(π+h)=cos⁡πcos⁡h−sin⁡πsin⁡h=(−1)cos⁡h−0=−cos⁡h,\begin{aligned} \cos(\pi + h) &= \cos\pi\cos h - \sin\pi\sin h\\ &= (-1)\cos h - 0 = -\cos h, \end{aligned} and cos⁡h→cos⁡0=1\cos h \to \cos 0 = 1⁠. This is the same as saying: cosine is continuous at π\pi⁠, so its limit there is cos⁡π=−1\cos\pi = -1 (Basic 4).
    cos⁡π=−1\cos\pi = -1⁠, sin⁡π=0\sin\pi = 0⁠. Basics: trigonometric identities
  4. Set them equal: kπ+1=−1k\pi + 1 = -1

    Continuity at π\pi needs

    lim⁡x→π−f(x)=lim⁡x→π+f(x)=f(π),\lim_{x\to\pi^-} f(x) = \lim_{x\to\pi^+} f(x) = f(\pi),

    that is, kπ+1=−1=kπ+1k\pi + 1 = -1 = k\pi + 1⁠. The left-hand limit and the value are the same expression, so the condition is

    kπ+1=−1  ⟺  kπ=−2  ⟺  k=−2π.k\pi + 1 = -1 \;\Longleftrightarrow\; k\pi = -2 \;\Longleftrightarrow\; k = -\frac{2}{\pi}.

    Dividing by π\pi is allowed because π≠0\pi \ne 0⁠. For any other kk⁠, the line arrives at a height kπ+1≠−1k\pi + 1 \ne -1 and the graph jumps. So k=−2πk = -\frac{2}{\pi} is the only value.

    Again the piece that owns the point makes the value agree with the left-hand limit for free; the equation forces the right-hand limit to agree as well. The answer is negative: the line must slope downwards from (0,1)(0, 1) to reach −1-1 at x=πx = \pi⁠.
    Definition 1: left-hand limit = right-hand limit = value. Lesson: continuity at a point
  5. Confirm with k=−2πk = -\frac{2}{\pi}

    Now the first piece is 1−2πx1 - \frac{2}{\pi}x⁠. At x=πx = \pi it gives 1−2π⋅π=1−2=−11 - \frac{2}{\pi}\cdot\pi = 1 - 2 = -1⁠. So

    lim⁡x→π−f(x)=−1,lim⁡x→π+f(x)=cos⁡π=−1,f(π)=−1.\begin{aligned} \lim_{x\to\pi^-} f(x) &= -1,\\ \lim_{x\to\pi^+} f(x) &= \cos\pi = -1,\\ f(\pi) &= -1. \end{aligned}

    All three agree, so ff is continuous at x=πx = \pi⁠. ✓

    x y π/2 π 3π/2 2π 1 −1 (π, −1) y = 1 − (2/π)x, for x ≤ π y = cos x, for x > π
    With k=−2πk = -\frac{2}{\pi} the line y=1−2πxy = 1 - \frac{2}{\pi}x (blue) falls from (0,1)(0, 1)⁠, crosses the axis at π2\frac{\pi}{2} and reaches the filled dot (π,−1)(\pi, -1)⁠, the lowest point of the cosine curve (gold), which continues from there. No gap at x=πx = \pi⁠.
    The graph shows the meaning of the answer: the line must be aimed exactly at the bottom of the cosine wave at x=πx = \pi⁠.
Result

ff is continuous at x=πx = \pi if and only if k=−2πk = -\frac{2}{\pi} (about −0.63662-0.63662⁠); then both one-sided limits and f(π)f(\pi) equal −1-1⁠. (Textbook answer: k=−2πk = \frac{-2}{\pi}⁠.)

Check it with numbers

With k=−2π≈−0.6366198k = -\frac{2}{\pi} \approx -0.6366198 and π≈3.1415927\pi \approx 3.1415927⁠:

f(π−0.01)=1−2π(π−0.01)=−1+0.02π≈−0.9936338,f(π+0.01)=cos⁡(3.1515927)≈−0.9999500.\begin{aligned} f(\pi - 0.01) &= 1 - \tfrac{2}{\pi}(\pi - 0.01)\\ &= -1 + \tfrac{0.02}{\pi} \approx -0.9936338,\\ f(\pi + 0.01) &= \cos(3.1515927) \approx -0.9999500. \end{aligned}

Both are close to −1=f(π)-1 = f(\pi)⁠, and closer still for smaller steps. ✓

Common mistakes
  1. Writing cos⁡π=1\cos\pi = 1⁠. cos⁡π=−1\cos\pi = -1⁠; cos⁡0=1\cos 0 = 1⁠.
  2. Using f(π)=cos⁡πf(\pi) = \cos\pi⁠. The cosine line is for x>πx > \pi only; f(π)=kπ+1f(\pi) = k\pi + 1⁠.
  3. Dropping the sign. kπ+1=−1k\pi + 1 = -1 gives kπ=−2k\pi = -2⁠, so k=−2πk = -\frac{2}{\pi}⁠, not 2π\frac{2}{\pi}⁠.
What to take away
  1. At a joint, each piece contributes one side's limit; the piece that owns the joint also gives the value.
  2. A continuous function like cosine has limit = value: lim⁡x→πcos⁡x=cos⁡π\lim_{x\to\pi}\cos x = \cos\pi⁠.
  3. "Find kk" reduces to one linear equation; solve it and say the solution is unique.

Every fact used, and where it comes from

FactUsed inSource
Continuity at cc⁠: left-hand limit, right-hand limit and f(c)f(c) equalSteps 4, 5Definition 1, Section 5.2 (Lesson: continuity at a point)
Polynomials are continuousStep 2Example 14, Section 5.2
Cosine is continuousStep 3Remark after Example 17, Section 5.2.1
cos⁡π=−1\cos\pi = -1⁠, sin⁡π=0\sin\pi = 0⁠, cos⁡(π+h)=−cos⁡h\cos(\pi + h) = -\cos hSteps 3, 5Values on the unit circle and cos⁡(A+B)\cos(A+B)⁠, Class XI, 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 →