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

Example 13: Where sin⁡x+cos⁡x\sin x+\cos x increases and decreases on [0,2π][0,2\pi]

ExamplesIncreasing and decreasing functions · Section 6.3
The question

Find the intervals in which the function ff given by

f(x)=sin⁡x+cos⁡x,0≤x≤2πf(x) = \sin x + \cos x, \quad 0 \le x \le 2\pi

is increasing or decreasing.

Exam answer f′(x)=cos⁡x−sin⁡x=2cos⁡(x+π4)\begin{aligned} f'(x) &= \cos x - \sin x \\ &= \sqrt2\cos\left(x + \frac{\pi}{4}\right) \end{aligned}

In [0,2π][0, 2\pi]⁠, f′(x)=0⇒tan⁡x=1f'(x) = 0 \Rightarrow \tan x = 1⁠, so

x=π4,5π4x = \frac{\pi}{4}, \frac{5\pi}{4}

In [0,π4)\left[0, \frac{\pi}{4}\right)⁠, f′(x)>0f'(x) > 0⁠.

In (π4,5π4)\left(\frac{\pi}{4}, \frac{5\pi}{4}\right)⁠, f′(x)<0f'(x) < 0⁠.

In (5π4,2π]\left(\frac{5\pi}{4}, 2\pi\right]⁠, f′(x)>0f'(x) > 0⁠.

As ff is continuous on [0,2π][0, 2\pi]⁠, the end points can be included.

Hence ff is increasing in [0,π4]\left[0, \dfrac{\pi}{4}\right] and in [5π4,2π]\left[\dfrac{5\pi}{4}, 2\pi\right]⁠, and decreasing in [π4,5π4]\left[\dfrac{\pi}{4}, \dfrac{5\pi}{4}\right]⁠.

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

The one idea this problem is built on

The derivative f′(x)=cos⁡x−sin⁡xf'(x) = \cos x - \sin x is a difference of two trigonometric functions, and its sign is not obvious at a glance. One identity makes it obvious: cos⁡x−sin⁡x=2cos⁡(x+π4)\cos x - \sin x = \sqrt2\cos\left(x + \frac{\pi}{4}\right)⁠. That is a single cosine, and the sign of a single cosine can be read off the unit circle once we know the range of its angle.

Given, to find, and the plan
Given
f(x)=sin⁡x+cos⁡xf(x) = \sin x + \cos x on the closed interval [0,2π][0, 2\pi]⁠.
To find
The intervals in [0,2π][0, 2\pi] on which ff is increasing, and those on which it is decreasing.
Plan
Differentiate; solve f′(x)=0f'(x) = 0 in [0,2π][0, 2\pi]⁠; rewrite f′f' as one cosine to get its sign on each piece; conclude with Theorem 1; check with a graph and values.

Basics you need

1Increasing on an interval and Theorem 1

Definition 1, Section 6.3: increasing means x1<x2⇒f(x1)≤f(x2)x_1 < x_2 \Rightarrow f(x_1) \le f(x_2) (strictly: <<⁠). Theorem 1: if ff is continuous on [a,b][a,b]⁠, differentiable on (a,b)(a,b)⁠, and f′≥0f' \ge 0 on (a,b)(a,b)⁠, then ff is increasing on [a,b][a,b]⁠; f′≤0f' \le 0 gives decreasing. Lesson: increasing and decreasing functions

2Derivatives of sine and cosine

ddxsin⁡x=cos⁡x\frac{d}{dx}\sin x = \cos x and ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin x⁠.

3Compound-angle formula

cos⁡(A+B)=cos⁡Acos⁡B−sin⁡Asin⁡B\cos(A + B) = \cos A\cos B - \sin A\sin B⁠, and cos⁡π4=sin⁡π4=12\cos\frac{\pi}{4} = \sin\frac{\pi}{4} = \frac{1}{\sqrt2}⁠.

4Sign of cosine on the unit circle

cos⁡θ>0\cos\theta > 0 in the first and fourth quadrants, cos⁡θ<0\cos\theta < 0 in the second and third, and cos⁡θ=0\cos\theta = 0 at θ=π2,3π2\theta = \frac{\pi}{2}, \frac{3\pi}{2}⁠. Basics: signs of sin and cos on the unit circle

5Solving tan⁡x=1\tan x = 1

tan⁡x=1\tan x = 1 exactly when x=π4+nπx = \frac{\pi}{4} + n\pi for an integer nn (tangent repeats every π\pi⁠).

Solution

  1. Differentiate

    Using Basic 2 and the sum rule,

    f′(x)=cos⁡x−sin⁡x.f'(x) = \cos x - \sin x.
    Sine and cosine are differentiable everywhere, so ff is continuous on [0,2π][0,2\pi] and differentiable inside it: Theorem 1 applies to every closed piece of the domain.
  2. Solve f′(x)=0f'(x) = 0 in [0,2π][0, 2\pi]

    f′(x)=0f'(x) = 0 means sin⁡x=cos⁡x\sin x = \cos x⁠. At such a point cos⁡x≠0\cos x \ne 0⁠: if cos⁡x\cos x were 0, then sin⁡x=±1\sin x = \pm1⁠, which is not equal to cos⁡x=0\cos x = 0⁠. So we may divide by cos⁡x\cos x⁠:

    tan⁡x=1  ⟺  x=π4+nπ.\tan x = 1 \iff x = \frac{\pi}{4} + n\pi.

    In [0,2π][0, 2\pi] this gives n=0n = 0 and n=1n = 1⁠:

    x=π4andx=5π4.x = \frac{\pi}{4} \quad\text{and}\quad x = \frac{5\pi}{4}.

    (n=−1n = -1 gives −3π4<0-\frac{3\pi}{4} < 0 and n=2n = 2 gives 9π4>2π\frac{9\pi}{4} > 2\pi⁠.) These two points split [0,2π][0, 2\pi] into [0,π4)\left[0, \frac{\pi}{4}\right)⁠, (π4,5π4)\left(\frac{\pi}{4}, \frac{5\pi}{4}\right) and (5π4,2π]\left(\frac{5\pi}{4}, 2\pi\right]⁠.

    Dividing by cos⁡x\cos x is only allowed when cos⁡x≠0\cos x \ne 0⁠; checking this first guarantees that no solution of sin⁡x=cos⁡x\sin x = \cos x is lost by the division.
  3. Rewrite f′f' as a single cosine

    By the compound-angle formula (Basic 3),

    2cos⁡(x+π4)=2(cos⁡x⋅12−sin⁡x⋅12)=cos⁡x−sin⁡x.\begin{aligned} \sqrt2\cos\left(x + \tfrac{\pi}{4}\right) &= \sqrt2\left(\cos x\cdot\tfrac{1}{\sqrt2} - \sin x\cdot\tfrac{1}{\sqrt2}\right) \\ &= \cos x - \sin x. \end{aligned}

    So f′(x)=2cos⁡(x+π4)f'(x) = \sqrt2\cos\left(x + \frac{\pi}{4}\right)⁠, and since 2>0\sqrt2 > 0⁠, f′(x)f'(x) has the sign of cos⁡(x+π4)\cos\left(x + \frac{\pi}{4}\right).

    A difference of a cosine and a sine changes sign at places that are hard to see; a single cosine changes sign only where its angle passes π2\frac{\pi}{2} or 3π2\frac{3\pi}{2}⁠. This is the same idea as Example 12: reduce to one trigonometric function of one angle.
    The identity also confirms Step 2: cos⁡(x+π4)=0\cos\left(x + \frac{\pi}{4}\right) = 0 when x+π4=π2x + \frac{\pi}{4} = \frac{\pi}{2} or 3π2\frac{3\pi}{2}⁠, that is x=π4x = \frac{\pi}{4} or 5π4\frac{5\pi}{4}⁠.
  4. The sign of f′f' on each piece

    Write θ=x+π4\theta = x + \frac{\pi}{4}⁠. As xx runs over [0,2π][0, 2\pi]⁠, θ\theta runs over [π4,9π4]\left[\frac{\pi}{4}, \frac{9\pi}{4}\right]⁠.

    • 0≤x<π40 \le x < \frac{\pi}{4}⁠: π4≤θ<π2\frac{\pi}{4} \le \theta < \frac{\pi}{2}⁠, first quadrant, cos⁡θ>0\cos\theta > 0⁠, so f′(x)>0f'(x) > 0⁠.
    • π4<x<5π4\frac{\pi}{4} < x < \frac{5\pi}{4}⁠: π2<θ<3π2\frac{\pi}{2} < \theta < \frac{3\pi}{2}⁠, second and third quadrants, cos⁡θ<0\cos\theta < 0⁠, so f′(x)<0f'(x) < 0⁠.
    • 5π4<x≤2π\frac{5\pi}{4} < x \le 2\pi⁠: 3π2<θ≤9π4\frac{3\pi}{2} < \theta \le \frac{9\pi}{4}⁠, fourth quadrant and then (past 2π2\pi⁠) the first quadrant again, cos⁡θ>0\cos\theta > 0⁠, so f′(x)>0f'(x) > 0⁠.
    0 2π π/4 5π/4 x + π/4 in [π/4, π/2) (π/2, 3π/2) (3π/2, 9π/4] cos(x + π/4) + − + f′(x) + − + f(x) increasing decreasing increasing
    Sign chart on [0,2π][0, 2\pi] (not to scale). Row 1 shows the range of the angle x+π4x + \frac{\pi}{4} on each piece.

    Test values: f′(0)=1−0=1f'(0) = 1 - 0 = 1⁠, f′ ⁣(π2)=0−1=−1f'\!\left(\frac{\pi}{2}\right) = 0 - 1 = -1⁠, f′ ⁣(3π2)=0−(−1)=1f'\!\left(\frac{3\pi}{2}\right) = 0 - (-1) = 1⁠.

    The angle 9π4\frac{9\pi}{4} is one full turn plus π4\frac{\pi}{4}⁠, so the last stretch of θ\theta wraps round into the first quadrant, where cosine is still positive. There is no further sign change.
    Quadrant signs of cosine: ++⁠, −-⁠, −-⁠, ++⁠. Basics: signs of sin and cos
  5. Conclude with Theorem 1

    ff is continuous on each closed piece and f′f' has a fixed strict sign inside it, so by Theorem 1 (and, for strictness, the Mean Value Theorem argument of its proof):

    • ff is increasing on [0,π4]\left[0, \frac{\pi}{4}\right] and on [5π4,2π]\left[\frac{5\pi}{4}, 2\pi\right];
    • ff is decreasing on [π4,5π4]\left[\frac{\pi}{4}, \frac{5\pi}{4}\right].

    The book states the same answer with the critical points left out: increasing in [0,π4)\left[0, \frac{\pi}{4}\right) and (5π4,2π]\left(\frac{5\pi}{4}, 2\pi\right]⁠, decreasing in (π4,5π4)\left(\frac{\pi}{4}, \frac{5\pi}{4}\right)⁠. Both versions are correct.

    Note that ff is not increasing on the union [0,π4)∪(5π4,2π]\left[0, \frac{\pi}{4}\right) \cup \left(\frac{5\pi}{4}, 2\pi\right]⁠: for example π6<3π2\frac{\pi}{6} < \frac{3\pi}{2} but f ⁣(π6)=12+32f\!\left(\frac{\pi}{6}\right) = \frac12 + \frac{\sqrt3}{2} ≈1.36603\approx 1.36603 is larger than f ⁣(3π2)=−1f\!\left(\frac{3\pi}{2}\right) = -1⁠.

    The two increasing pieces are separated by a long decreasing stretch, so a point early in the first piece can be higher than a point in the last piece.
  6. See it on the graph

    By the same compound-angle idea (with sin⁡(A+B)=sin⁡Acos⁡B+cos⁡Asin⁡B\sin(A+B) = \sin A\cos B + \cos A\sin B⁠), f(x)=2sin⁡(x+π4)f(x) = \sqrt2\sin\left(x + \frac{\pi}{4}\right)⁠. So ff is a sine wave of height 2\sqrt2⁠: it starts at f(0)=1f(0) = 1⁠, rises to f ⁣(π4)=2f\!\left(\frac{\pi}{4}\right) = \sqrt2⁠, falls to f ⁣(5π4)=−2f\!\left(\frac{5\pi}{4}\right) = -\sqrt2⁠, and rises back to f(2π)=1f(2\pi) = 1⁠.

    x y O π/2 π 3π/2 2π 1 −1 π/4 5π/4 (π/4, √2) (5π/4, −√2) (2π, 1) (0, 1) decreasing increasing
    The graph of f(x)=sin⁡x+cos⁡xf(x) = \sin x + \cos x on [0,2π][0, 2\pi]⁠: green where increasing, rose where decreasing. The highest point is (π4,2)\left(\frac{\pi}{4}, \sqrt2\right) and the lowest (5π4,−2)\left(\frac{5\pi}{4}, -\sqrt2\right)⁠.
Result

f′(x)=cos⁡x−sin⁡xf'(x) = \cos x - \sin x =2cos⁡(x+π4)= \sqrt2\cos\left(x + \frac{\pi}{4}\right)⁠. The function is increasing on [0,π4]\left[0, \frac{\pi}{4}\right] and on [5π4,2π]\left[\frac{5\pi}{4}, 2\pi\right], and decreasing on [π4,5π4]\left[\frac{\pi}{4}, \frac{5\pi}{4}\right] (strictly in each case). This agrees with the book's solution, which writes the intervals without the points π4\frac{\pi}{4} and 5π4\frac{5\pi}{4}⁠.

Check it with numbers

With π4≈0.7854\frac{\pi}{4} \approx 0.7854⁠, 5π4≈3.927\frac{5\pi}{4} \approx 3.927⁠, 2π≈6.28322\pi \approx 6.2832⁠:

xx0π4\frac{\pi}{4}125π4\frac{5\pi}{4}52π2\pi
f(x)f(x)11.414211.381770.49315−1.41421-1.41421−0.67526-0.675261

Up from 1 to 1.41421, down through 1.38177 and 0.49315 to −1.41421-1.41421⁠, then up through −0.67526-0.67526 to 1.

Common mistakes
  1. Sign slip in the derivative. ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin x⁠, so f′(x)=cos⁡x−sin⁡xf'(x) = \cos x - \sin x⁠, not cos⁡x+sin⁡x\cos x + \sin x⁠.
  2. Only one solution of tan⁡x=1\tan x = 1⁠. In [0,2π][0, 2\pi] there are two, π4\frac{\pi}{4} and 5π4\frac{5\pi}{4}⁠; tangent repeats every π\pi⁠.
  3. Guessing signs from a single test point per region without a reason. One test value works only because f′f' cannot change sign between consecutive zeros; the single-cosine form makes that clear.
  4. Joining the two increasing intervals with ∪\cup⁠. ff is increasing on each, not on their union.
What to take away
  1. acos⁡x+bsin⁡xa\cos x + b\sin x can be written as one cosine (or sine) with amplitude a2+b2\sqrt{a^2+b^2}⁠; its sign is then a unit-circle question.
  2. Before dividing by cos⁡x\cos x⁠, check that cos⁡x≠0\cos x \ne 0 at the points you are solving for.
  3. On a closed domain, the end points belong to the first and last intervals.

Every fact used, and where it comes from

FactUsed inSource
(sin⁡x)′=cos⁡x(\sin x)' = \cos x⁠, (cos⁡x)′=−sin⁡x(\cos x)' = -\sin xStep 1Standard derivatives (Class XI; Chapter 5)
tan⁡x=1  ⟺  x=π4+nπ\tan x = 1 \iff x = \frac{\pi}{4} + n\piStep 2General solution of trigonometric equations (Class XI)
cos⁡(A+B)\cos(A+B)⁠, sin⁡(A+B)\sin(A+B) formulas; cos⁡π4=sin⁡π4=12\cos\frac{\pi}{4} = \sin\frac{\pi}{4} = \frac{1}{\sqrt2}Steps 3, 6Trigonometric functions (Class XI)
Sign of cos⁡\cos by quadrantStep 4Basics: signs of sin and cos on the unit circle
Increasing / decreasing; sign of f′f' decidesStep 5Definition 1 and Theorem 1, Section 6.3 (Lesson)
Mean Value Theorem (for strictness)Step 5Used without proof in the book's proof of Theorem 1, which cites it as "Theorem 8 in Chapter 5"; this reprint's Chapter 5 does not contain it (a stale reference)
Decimal values in the check tableStep 5; CheckRecomputed 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 →