Class 12 Maths, Worked in Full Past papersGet updates
Chapter 6 · Application of Derivatives

Miscellaneous · Q11: Absolute extrema of cos⁡2x+sin⁡x\cos^2 x+\sin x on [0,π][0,\pi]

Miscellaneous ExerciseAbsolute maxima and minima · Section 6.4.1 · Miscellaneous Exercise
The question

Find the absolute maximum and minimum values of the function ff given by

f(x)=cos⁡2x+sin⁡x,x∈[0,π].f(x) = \cos^2 x + \sin x,\quad x \in [0, \pi].
Exam answer f′(x)=−2cos⁡xsin⁡x+cos⁡x=cos⁡x (1−2sin⁡x)\begin{aligned} f'(x) &= -2\cos x\sin x + \cos x \\ &= \cos x\,(1 - 2\sin x) \end{aligned}

f′(x)=0⇒cos⁡x=0f'(x) = 0 \Rightarrow \cos x = 0 or sin⁡x=12\sin x = \frac12⁠. So in [0,π][0, \pi] the critical points are x=π6x = \frac{\pi}{6}⁠, π2\frac{\pi}{2}⁠, 5π6\frac{5\pi}{6}⁠.

f(0)=1,f(π)=1f(π6)=34+12=54f(π2)=0+1=1f(5π6)=34+12=54\begin{aligned} f(0) &= 1,\quad f(\pi) = 1 \\ f\left(\tfrac{\pi}{6}\right) &= \tfrac34 + \tfrac12 = \tfrac54 \\ f\left(\tfrac{\pi}{2}\right) &= 0 + 1 = 1 \\ f\left(\tfrac{5\pi}{6}\right) &= \tfrac34 + \tfrac12 = \tfrac54 \end{aligned}

Absolute maximum value =54= \frac54⁠, at x=π6x = \frac{\pi}{6} and x=5π6x = \frac{5\pi}{6}⁠.

Absolute minimum value =1= 1⁠, at x=0x = 0⁠, π2\dfrac{\pi}{2} and π\pi⁠.

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

The one idea this problem is built on

On a closed interval a continuous function attains a greatest and a least value, and they can only occur at critical points inside the interval or at its two ends. So list those few points, compute ff at each, and pick the largest and smallest. Nothing else needs testing.

Given, to find, and the plan
Given
f(x)=cos⁡2x+sin⁡xf(x) = \cos^2 x + \sin x on the closed interval [0,π][0, \pi]⁠.
To find
The absolute maximum value and the absolute minimum value of ff on [0,π][0, \pi]⁠.
Plan
Follow the book's Working Rule (Section 6.4.1): (1) critical points in the interval; (2) the end points; (3) ff at all of them; (4) the largest and smallest of these values.

Basics you need

1Chain rule for cos⁡2x\cos^2 x

cos⁡2x=(cos⁡x)2\cos^2 x = (\cos x)^2⁠, so its derivative is 2cos⁡x⋅(−sin⁡x)=−2sin⁡xcos⁡x2\cos x\cdot(-\sin x) = -2\sin x\cos x⁠. Basics: the chain rule

2Values of sin and cos on [0,π][0, \pi]

sin⁡x≥0\sin x \ge 0 on [0,π][0, \pi]⁠; cos⁡x\cos x is positive on [0,π2)\left[0, \frac{\pi}{2}\right)⁠, zero at π2\frac{\pi}{2}⁠, negative on (π2,π]\left(\frac{\pi}{2}, \pi\right]⁠. sin⁡x=12\sin x = \frac{1}{2} at x=π6x = \frac{\pi}{6} and 5π6\frac{5\pi}{6} only. Basics: signs of sin and cos

3Absolute extrema on a closed interval (Section 6.4.1)

Theorem 5: a continuous ff on [a,b][a, b] attains an absolute maximum and an absolute minimum. Theorem 6: at an interior point where this happens, f′=0f' = 0⁠. Hence the Working Rule: compare ff at the critical points and the ends. Lesson: absolute extrema on a closed interval

Solution

  1. Differentiate and factor

    f′(x)=2cos⁡x (−sin⁡x)+cos⁡x=−2sin⁡xcos⁡x+cos⁡x=cos⁡x (1−2sin⁡x).\begin{aligned} f'(x) &= 2\cos x\,(-\sin x) + \cos x \\ &= -2\sin x\cos x + \cos x \\ &= \cos x\,(1-2\sin x). \end{aligned}
    The first term uses the chain rule on (cos⁡x)2(\cos x)^2⁠: outer function u2u^2 with derivative 2u2u⁠, inner function cos⁡x\cos x with derivative −sin⁡x-\sin x⁠. Both terms contain cos⁡x\cos x⁠, so we take it out; a product is much easier to set equal to zero than a sum.
    ddxsin⁡x=cos⁡x\frac{d}{dx}\sin x = \cos x⁠, ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin x⁠; chain rule Theorem 4, Section 5.3.1. Basics: the chain rule
  2. Working Rule, Step 1: critical points in [0,π][0, \pi]

    ff is differentiable everywhere, so the critical points are where f′(x)=0f'(x) = 0⁠:

    • cos⁡x=0\cos x = 0⁠: in [0,π][0, \pi] only at x=π2x = \frac{\pi}{2}⁠;
    • 1−2sin⁡x=01 - 2\sin x = 0⁠, that is sin⁡x=12\sin x = \frac{1}{2}⁠: in [0,π][0, \pi] at x=π6x = \frac{\pi}{6} and x=5π6x = \frac{5\pi}{6}⁠.

    So the critical points are π6\frac{\pi}{6}⁠, π2\frac{\pi}{2}⁠, 5π6\frac{5\pi}{6}⁠.

    sin⁡x=12\sin x = \frac{1}{2} has two solutions in [0,π][0, \pi]⁠, because sine rises from 0 to 1 on [0,π2]\left[0, \frac{\pi}{2}\right] and falls back on [π2,π]\left[\frac{\pi}{2}, \pi\right]⁠, passing 12\frac{1}{2} once each way. 5π6=π−π6\frac{5\pi}{6} = \pi - \frac{\pi}{6} is the second one, and it is easy to miss.
    sin⁡(π−x)=sin⁡x\sin(\pi - x) = \sin x⁠, so sin⁡5π6=sin⁡π6=12\sin\frac{5\pi}{6} = \sin\frac{\pi}{6} = \frac{1}{2}⁠. Basics: signs of sin and cos
  3. Working Rule, Steps 2 and 3: values at all candidates

    Add the end points 0 and π\pi and compute ff at all five points:

    xxcos⁡2x\cos^2 xsin⁡x\sin xf(x)f(x)
    00110011
    π6\frac{\pi}{6}34\frac{3}{4}12\frac{1}{2}54\frac{5}{4}
    π2\frac{\pi}{2}001111
    5π6\frac{5\pi}{6}34\frac{3}{4}12\frac{1}{2}54\frac{5}{4}
    π\pi110011
    cos⁡π6=32\cos\frac{\pi}{6} = \frac{\sqrt3}{2} and cos⁡5π6=−32\cos\frac{5\pi}{6} = -\frac{\sqrt3}{2}⁠; squaring removes the sign, giving 34\frac{3}{4} both times. At π\pi⁠, cos⁡π=−1\cos\pi = -1 and its square is 1.
    Working Rule, Steps 2 and 3, Section 6.4.1: take the end points and calculate ff at every listed point. Lesson: absolute extrema
  4. Working Rule, Step 4: pick the largest and smallest

    The largest value in the table is 54\frac{5}{4}⁠, the smallest is 1. Therefore

    absolute maximum value=54  at x=π6, 5π6;\text{absolute maximum value} = \frac{5}{4}\ \text{ at } x = \frac{\pi}{6},\ \frac{5\pi}{6}; absolute minimum value=1  at x=0, π2, π.\text{absolute minimum value} = 1\ \text{ at } x = 0,\ \frac{\pi}{2},\ \pi.
    x y 0.5 1 1.25 π/6 π/2 5π/6 π absolute max 5/4 at π/6 and 5π/6 absolute min 1 at 0, π/2, π
    y=cos⁡2x+sin⁡xy = \cos^2 x + \sin x on [0,π][0, \pi] (horizontal and vertical scales differ). The graph never goes above 54\frac{5}{4} or below 1; each value is reached at the points marked.
    Why is the table enough? ff is continuous on the closed interval [0,π][0, \pi]⁠, so by Theorem 5 it has an absolute maximum and minimum there. If one of them occurred at an interior point, Theorem 6 says f′=0f' = 0 there, so that point is in our list; otherwise it occurs at an end, also in our list. Either way the extreme values are among the five values computed.
    Theorems 5 and 6 and the Working Rule, Section 6.4.1. An absolute extreme value may be attained at several points. Lesson: absolute extrema
Result

On [0,π][0, \pi]⁠, the absolute maximum value of ff is 54\frac{5}{4}, attained at x=π6x = \frac{\pi}{6} and x=5π6x = \frac{5\pi}{6}⁠; the absolute minimum value is 1, attained at x=0x = 0⁠, π2\frac{\pi}{2} and π\pi⁠. (The answer key in this reprint has no entry for this question.)

Check it with numbers

A second route: write s=sin⁡xs = \sin x⁠, so cos⁡2x=1−s2\cos^2 x = 1 - s^2 and f=1+s−s2f = 1 + s - s^2⁠. On [0,π][0, \pi]⁠, ss runs over [0,1][0, 1]⁠. Completing the square, 1+s−s2=54−(s−12)21 + s - s^2 = \frac{5}{4} - \left(s - \frac{1}{2}\right)^2⁠, which is largest (54\frac54⁠) when s=12s = \frac12⁠; and 1+s−s2=1+s(1−s)≥11 + s - s^2 = 1 + s(1-s) \ge 1⁠, with equality only at s=0s = 0 or s=1s = 1 ✓. Sample values: f(0.3)≈0.9127+0.2955f(0.3) \approx 0.9127 + 0.2955 =1.2082= 1.2082⁠, f(1)≈1.1334f(1) \approx 1.1334⁠, f(2.5)≈1.2403f(2.5) \approx 1.2403⁠, all between 1 and 1.25 ✓.

Common mistakes
  1. Missing x=5π6x = \frac{5\pi}{6}⁠. sin⁡x=12\sin x = \frac12 has two solutions in [0,π][0, \pi]⁠.
  2. Dividing by cos⁡x\cos x in f′(x)=0f'(x) = 0 instead of factoring. That throws away x=π2x = \frac{\pi}{2}⁠.
  3. Forgetting the end points 0 and π\pi⁠. Here they tie for the minimum, so leaving them out would hide two of the three points where it is attained.
  4. Using the second derivative test to classify points and stopping there. Local maxima and minima are not the question; the comparison table is.
What to take away
  1. Closed interval and continuous function: list critical points inside, add the ends, tabulate, compare. No sign charts needed.
  2. Factor f′f' rather than divide, so that no root is lost.
  3. Substituting s=sin⁡xs = \sin x turns this function into a quadratic, which gives an independent check. The same Working Rule handles Exercise 6.3, Question 8 and Question 12, also trigonometric functions on a closed interval.

Every fact used, and where it comes from

FactUsed inSource
Derivatives of sin⁡x\sin x⁠, cos⁡x\cos x⁠; chain ruleStep 1Chapter 5; chain rule Theorem 4, Section 5.3.1 (Basics: the chain rule)
Solutions of cos⁡x=0\cos x = 0 and sin⁡x=12\sin x = \frac12 in [0,π][0, \pi]⁠; values at π6\frac{\pi}{6}⁠, 5π6\frac{5\pi}{6}Steps 2, 3Trigonometry (Basics: signs of sin and cos)
Definition of critical pointStep 2Note after Theorem 2, Section 6.4 (Lesson: maxima and minima)
Existence of absolute extrema; f′=0f' = 0 at an interior oneStep 4Theorems 5 and 6, Section 6.4.1
Working Rule for absolute maximum and minimumSteps 2 to 4Section 6.4.1 (Lesson: absolute extrema)
All valuesStep 3, CheckRecomputed exactly (sympy) and by a search over 200 001 points of [0,π][0, \pi] in the site's verification script
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 →