Class 12 Maths, Worked in Full Past papersGet updates
Chapter 1 · Relations and Functions

Example 26: sin⁡x+cos⁡x\sin x+\cos x is not one-one on [0,π/2][0,\pi/2]

ExamplesOne-one functions · Miscellaneous Examples
The question

Consider a function f:[0,π2]→Rf : \left[0, \dfrac{\pi}{2}\right] \to \R given by f(x)=sin⁡xf(x) = \sin x and g:[0,π2]→Rg : \left[0, \dfrac{\pi}{2}\right] \to \R given by g(x)=cos⁡xg(x) = \cos x⁠. Show that ff and gg are one-one, but f+gf + g is not one-one.

Exam answer

ff is one-one: Let x1,x2∈[0,π2]x_1, x_2 \in \left[0, \frac{\pi}{2}\right] with f(x1)=f(x2)f(x_1) = f(x_2)⁠. Then sin⁡x1=sin⁡x2\sin x_1 = \sin x_2⁠. Since sin⁡x\sin x is strictly increasing on [0,π2]\left[0, \frac{\pi}{2}\right]⁠, x1=x2x_1 = x_2⁠. Thus ff is one-one.

gg is one-one: Let g(x1)=g(x2)g(x_1) = g(x_2)⁠. Then cos⁡x1=cos⁡x2\cos x_1 = \cos x_2⁠. Since cos⁡x\cos x is strictly decreasing on [0,π2]\left[0, \frac{\pi}{2}\right]⁠, x1=x2x_1 = x_2⁠. Thus gg is one-one.

f+gf + g is not one-one:

(f+g)(0)=sin⁡0+cos⁡0=0+1=1(f+g)(π2)=sin⁡π2+cos⁡π2=1+0=1\begin{aligned} (f + g)(0) &= \sin 0 + \cos 0 \\ &= 0 + 1 = 1 \\ (f + g)\left(\frac{\pi}{2}\right) &= \sin\frac{\pi}{2} + \cos\frac{\pi}{2} \\ &= 1 + 0 = 1 \end{aligned}

So (f+g)(0)=(f+g)(π2)(f + g)(0) = (f + g)\left(\frac{\pi}{2}\right) but 0≠π20 \ne \frac{\pi}{2}⁠. Thus f+gf + g is not one-one.

Hence ff and gg are one-one, but f+gf + g is not one-one.

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

The one idea this problem is built on

On [0,π2]\left[0,\frac{\pi}{2}\right]⁠, sin⁡x\sin x only ever increases and cos⁡x\cos x only ever decreases. A function that only increases (or only decreases) can never take the same value twice, so each is one-one. Their sum, however, goes up and then back down: it starts at 0+1=10+1 = 1⁠, rises to 2\sqrt2 at π4\frac{\pi}{4}⁠, and comes back to 1+0=11+0 = 1⁠. A function that returns to a value it already took is not one-one. One rises while the other falls, and the sum can rise and then fall.

Given, to show, and the plan
Given
f(x)=sin⁡xf(x) = \sin x and g(x)=cos⁡xg(x) = \cos x⁠, both with domain [0,π2]\left[0,\frac{\pi}{2}\right] and codomain R\R⁠. The sum is defined pointwise: (f+g)(x)=sin⁡x+cos⁡x(f+g)(x) = \sin x + \cos x⁠.
To show
(a) ff is one-one. (b) gg is one-one. (c) f+gf+g is not one-one.
Plan
(1) For (a) and (b), take two distinct points x1<x2x_1 < x_2 of the interval and show the values differ, using the sum-to-product formulas to get the sign of the difference. (2) For (c), one counterexample: two different inputs with the same output, 00 and π2\frac{\pi}{2}⁠. (3) Use a graph and the identity sin⁡x+cos⁡x=2sin⁡(x+π4)\sin x+\cos x = \sqrt2\sin\left(x+\frac{\pi}{4}\right) to see why.

Basics you need

1One-one

hh is one-one when distinct inputs give distinct outputs: x1≠x2⇒h(x1)≠h(x2)x_1 \ne x_2 \Rightarrow h(x_1)\ne h(x_2)⁠. To disprove it, one pair x1≠x2x_1\ne x_2 with h(x1)=h(x2)h(x_1) = h(x_2) is enough. Basics: one-one and onto

2Strictly monotonic functions are one-one

If x1<x2x_1 < x_2 always gives h(x1)<h(x2)h(x_1) < h(x_2) (strictly increasing) or always gives h(x1)>h(x2)h(x_1) > h(x_2) (strictly decreasing), then distinct inputs can never share an output, so hh is one-one. Basics: proving "for all" with arbitrary elements

3Sum-to-product formulas

sin⁡A−sin⁡B=2cos⁡A+B2sin⁡A−B2\sin A - \sin B = 2\cos\dfrac{A+B}{2}\sin\dfrac{A-B}{2} and cos⁡A−cos⁡B=−2sin⁡A+B2sin⁡A−B2\cos A - \cos B = -2\sin\dfrac{A+B}{2}\sin\dfrac{A-B}{2}⁠. (Class XI, Trigonometric Functions.)

4Signs of sine and cosine in the first quadrant

For 0<θ<π20 < \theta < \frac{\pi}{2}⁠, both sin⁡θ>0\sin\theta > 0 and cos⁡θ>0\cos\theta > 0⁠. Also sin⁡π4=cos⁡π4=12\sin\frac{\pi}{4} = \cos\frac{\pi}{4} = \frac{1}{\sqrt2}⁠.

5Sum of two functions

(f+g)(x)=f(x)+g(x)(f+g)(x) = f(x)+g(x)⁠, worked out separately at each point of the common domain. Basics: what a function is

Solution

  1. Set up: two distinct points of the interval

    To prove ff and gg one-one we must handle every pair of distinct inputs. So let x1,x2x_1, x_2 be any two different points of [0,π2]\left[0,\frac{\pi}{2}\right]⁠, and name them so that x1<x2x_1 < x_2⁠. Then

    0≤x1<x2≤π2.0 \le x_1 < x_2 \le \frac{\pi}{2}.

    From this we get two facts about the half-difference and the half-sum, which are the angles that appear in the sum-to-product formulas:

    0<x2−x12≤π4,0<x1+x22<π2.0 < \frac{x_2 - x_1}{2} \le \frac{\pi}{4}, \qquad 0 < \frac{x_1 + x_2}{2} < \frac{\pi}{2}.

    For the first: x2−x1>0x_2 - x_1 > 0⁠, and at most π2−0\frac{\pi}{2} - 0⁠. For the second: x1+x2>0x_1 + x_2 > 0 because x2>x1≥0x_2 > x_1 \ge 0⁠, and x1+x2<πx_1 + x_2 < \pi because x1<x2≤π2x_1 < x_2 \le \frac{\pi}{2} makes x1<π2x_1 < \frac{\pi}{2}⁠.

    The textbook simply states that sin⁡x1≠sin⁡x2\sin x_1 \ne \sin x_2 and cos⁡x1≠cos⁡x2\cos x_1 \ne \cos x_2 for distinct points. To prove it we will look at the differences sin⁡x2−sin⁡x1\sin x_2 - \sin x_1 and cos⁡x1−cos⁡x2\cos x_1 - \cos x_2 and show they are strictly positive. The two inequalities above are exactly what we need to decide those signs. Naming the smaller point x1x_1 costs nothing, because any two different numbers have a smaller one.
    To prove a "for all" statement, work with arbitrary elements, not chosen examples (Basic 2). Both bounds on the half-sum are strict, which matters in the next step.
  2. f(x)=sin⁡xf(x) = \sin x is one-one

    By the sum-to-product formula (Basic 3) with A=x2, B=x1A = x_2,\ B = x_1⁠:

    sin⁡x2−sin⁡x1=2cos⁡x2+x12 sin⁡x2−x12.\sin x_2 - \sin x_1 = 2\cos\frac{x_2 + x_1}{2}\,\sin\frac{x_2 - x_1}{2}.

    By Step 1, x1+x22\frac{x_1+x_2}{2} lies strictly between 0 and π2\frac{\pi}{2}⁠, so its cosine is positive; and x2−x12\frac{x_2-x_1}{2} lies in (0,π4]\left(0,\frac{\pi}{4}\right]⁠, so its sine is positive. The product of 2 and two positive numbers is positive:

    sin⁡x2−sin⁡x1>0,that issin⁡x1<sin⁡x2.\sin x_2 - \sin x_1 > 0, \qquad\text{that is}\qquad \sin x_1 < \sin x_2.

    So distinct inputs give distinct outputs (in fact sin⁡\sin is strictly increasing here), and ff is one-one.

    A difference is easiest to judge when it is written as a product, because then its sign is just the product of the signs of the factors. The sum-to-product formula does exactly that. The strict inequality x1+x22<π2\frac{x_1+x_2}{2} < \frac{\pi}{2} from Step 1 is what keeps cos⁡x1+x22\cos\frac{x_1+x_2}{2} from being 0.
    In the first quadrant, 0<θ<π20<\theta<\frac{\pi}{2}⁠, sine and cosine are both positive (Basic 4). A strictly increasing function is one-one (Basic 2).
  3. g(x)=cos⁡xg(x) = \cos x is one-one

    By the second formula (Basic 3) with A=x1, B=x2A = x_1,\ B = x_2⁠:

    cos⁡x1−cos⁡x2=−2sin⁡x1+x22 sin⁡x1−x22=2sin⁡x1+x22 sin⁡x2−x12.\begin{aligned} \cos x_1 - \cos x_2 &= -2\sin\frac{x_1 + x_2}{2}\,\sin\frac{x_1 - x_2}{2} \\ &= 2\sin\frac{x_1 + x_2}{2}\,\sin\frac{x_2 - x_1}{2}. \end{aligned}

    (The second form uses sin⁡(−θ)=−sin⁡θ\sin(-\theta) = -\sin\theta to absorb the minus sign.) By Step 1 both angles x1+x22\frac{x_1+x_2}{2} and x2−x12\frac{x_2-x_1}{2} lie strictly between 0 and π2\frac{\pi}{2}⁠, so both sines are positive. Hence

    cos⁡x1−cos⁡x2>0,that iscos⁡x1>cos⁡x2.\cos x_1 - \cos x_2 > 0, \qquad\text{that is}\qquad \cos x_1 > \cos x_2.

    So cos⁡\cos is strictly decreasing on the interval, distinct inputs give distinct outputs, and gg is one-one.

    Same method, same reason: write the difference as a product and read off its sign. Here we compare cos⁡x1−cos⁡x2\cos x_1 - \cos x_2 (larger minus smaller, as it turns out) so that the result comes out positive.
    sin⁡(−θ)=−sin⁡θ\sin(-\theta) = -\sin\theta (sine is an odd function). A strictly decreasing function is one-one too (Basic 2).
  4. f+gf+g is not one-one: one counterexample

    The sum is (f+g)(x)=sin⁡x+cos⁡x(f+g)(x) = \sin x + \cos x⁠. Evaluate it at the two ends of the interval:

    (f+g)(0)=sin⁡0+cos⁡0=0+1=1,(f+g)(π2)=sin⁡π2+cos⁡π2=1+0=1.\begin{aligned} (f+g)(0) &= \sin 0 + \cos 0 = 0 + 1 = 1,\\ (f+g)\left(\tfrac{\pi}{2}\right) &= \sin\tfrac{\pi}{2} + \cos\tfrac{\pi}{2} = 1 + 0 = 1. \end{aligned}

    The inputs 00 and π2\frac{\pi}{2} are different, but the outputs are equal. So f+gf+g is not one-one.

    "Not one-one" is the failure of a "for all" statement, so a single pair of distinct inputs with equal outputs settles it (Basic 1). The end points are a natural place to look: sin⁡\sin and cos⁡\cos swap their values 0 and 1 there, so their sums agree.
    sin⁡0=0, cos⁡0=1, sin⁡π2=1, cos⁡π2=0\sin 0 = 0,\ \cos 0 = 1,\ \sin\frac{\pi}{2} = 1,\ \cos\frac{\pi}{2} = 0⁠.
  5. Why the sum fails: it rises and then falls

    Using sin⁡π4=cos⁡π4=12\sin\frac{\pi}{4} = \cos\frac{\pi}{4} = \frac{1}{\sqrt2} and the formula for sin⁡(A+B)\sin(A+B)⁠,

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

    As xx runs from 0 to π2\frac{\pi}{2}⁠, the angle x+π4x + \frac{\pi}{4} runs from π4\frac{\pi}{4} to 3π4\frac{3\pi}{4}⁠, passing through π2\frac{\pi}{2} where sine is largest. So f+gf+g climbs to its maximum 2\sqrt2 at x=π4x = \frac{\pi}{4} and then comes back down. It is also symmetric about π4\frac{\pi}{4}⁠:

    (f+g)(π2−x)=sin⁡(π2−x)+cos⁡(π2−x)=cos⁡x+sin⁡x=(f+g)(x).\begin{aligned} (f+g)\left(\tfrac{\pi}{2} - x\right) &= \sin\left(\tfrac{\pi}{2}-x\right) + \cos\left(\tfrac{\pi}{2}-x\right) \\ &= \cos x + \sin x = (f+g)(x). \end{aligned}

    So every value strictly between 1 and 2\sqrt2 is taken twice, at xx and at π2−x\frac{\pi}{2}-x⁠. For example, at π6\frac{\pi}{6} and π3\frac{\pi}{3}⁠:

    sin⁡π6+cos⁡π6=12+32=1+32=cos⁡π3+sin⁡π3.\sin\tfrac{\pi}{6} + \cos\tfrac{\pi}{6} = \tfrac12 + \tfrac{\sqrt3}{2} = \tfrac{1+\sqrt3}{2} = \cos\tfrac{\pi}{3} + \sin\tfrac{\pi}{3}.
    0π/6π/4π/3π/2 0.51√2 (0, 1)(π/2, 1) cos xsin x sin x + cos x
    Blue sin⁡x\sin x only rises and gold cos⁡x\cos x only falls, so each meets any horizontal line at most once (one-one). Their violet sum rises to 2\sqrt2 at π4\frac{\pi}{4} and falls back: it meets the green line y=1y = 1 at both x=0x = 0 and x=π2x = \frac{\pi}{2} (rose dots), and the dashed level 1+32\frac{1+\sqrt3}{2} at π6\frac{\pi}{6} and π3\frac{\pi}{3} (violet dots).
    The counterexample in Step 4 already proves the claim; this step explains it. An increasing function plus a decreasing function can do anything: here the increase of sin⁡\sin wins for x<π4x<\frac{\pi}{4} and the decrease of cos⁡\cos wins for x>π4x>\frac{\pi}{4}⁠, so the sum turns around, and a function that turns around repeats values.
    sin⁡(A+B)=sin⁡Acos⁡B+cos⁡Asin⁡B\sin(A+B) = \sin A\cos B + \cos A\sin B⁠, and sin⁡(π2−x)=cos⁡x\sin\left(\frac{\pi}{2}-x\right) = \cos x⁠, cos⁡(π2−x)=sin⁡x\cos\left(\frac{\pi}{2}-x\right) = \sin x (Class XI, Trigonometric Functions).
Result

On [0,π2]\left[0,\frac{\pi}{2}\right]⁠, f(x)=sin⁡xf(x) = \sin x is strictly increasing and g(x)=cos⁡xg(x) = \cos x is strictly decreasing, so both are one-one. But (f+g)(0)=1=(f+g)(π2)(f+g)(0) = 1 = (f+g)\left(\frac{\pi}{2}\right) with 0≠π20 \ne \frac{\pi}{2}⁠, so f+gf+g is not one-one.

Check it with numbers

Decimal values: sin⁡π6=0.5<sin⁡π4≈0.707<sin⁡π3≈0.866\sin\frac{\pi}{6} = 0.5 < \sin\frac{\pi}{4} \approx 0.707 < \sin\frac{\pi}{3} \approx 0.866 (rising), while cos⁡\cos takes the same values in reverse (falling). The sum is 11 at 0, about 1.3661.366 at π6\frac{\pi}{6}⁠, about 1.4141.414 at π4\frac{\pi}{4}⁠, about 1.3661.366 at π3\frac{\pi}{3}⁠, and 11 at π2\frac{\pi}{2}⁠: up, then down, with repeats. The site's verification script also confirms both sum-to-product identities symbolically and checks 2000 random pairs x1<x2x_1 < x_2 in the interval.

Common mistakes
  1. Assuming a sum of one-one functions is one-one. This example is a counterexample to exactly that.
  2. Proving ff one-one by checking a few angles. That shows nothing about the other angles; use arbitrary x1<x2x_1 < x_2⁠.
  3. Ignoring the domain. On all of R\R⁠, sin⁡\sin is not one-one (sin⁡0=sin⁡π\sin 0 = \sin\pi⁠). It is the restriction to [0,π2]\left[0,\frac{\pi}{2}\right] that makes it one-one.
  4. Losing the sign in the cosine formula. cos⁡A−cos⁡B\cos A - \cos B has a minus sign in front: −2sin⁡A+B2sin⁡A−B2-2\sin\frac{A+B}{2}\sin\frac{A-B}{2}⁠.
What to take away
  1. A strictly increasing or strictly decreasing function is one-one. Sum-to-product formulas are a clean way to prove a trigonometric function is monotonic on an interval.
  2. To disprove one-one, find two different inputs with the same output. The ends of the interval and points symmetric about a turning point are good places to look.
  3. Arithmetic on functions does not preserve their types: the sum of one-one functions need not be one-one, just as Example 25 showed for onto.

Every fact used, and where it comes from

FactUsed inSource
One-one (injective)Steps 2–4Definition 5, Section 1.3 (Lesson: types of functions)
Sum of functions (f+g)(x)=f(x)+g(x)(f+g)(x) = f(x)+g(x)Steps 4, 5Class XI, Relations and Functions
Sum-to-product formulas; sin⁡(−θ)=−sin⁡θ\sin(-\theta) = -\sin\thetaSteps 2, 3Class XI, Trigonometric Functions
sin⁡,cos⁡>0\sin, \cos > 0 on (0,π2)\left(0,\frac{\pi}{2}\right)⁠; values at 0,π6,π4,π3,π20, \frac{\pi}{6}, \frac{\pi}{4}, \frac{\pi}{3}, \frac{\pi}{2}Steps 2–5Class XI, Trigonometric Functions
sin⁡x+cos⁡x=2sin⁡(x+π4)\sin x+\cos x = \sqrt2\sin\left(x+\frac{\pi}{4}\right)⁠; symmetry about π4\frac{\pi}{4}Step 5Compound-angle formula; verified symbolically in the site's verification script
Graph coordinatesFigureComputed 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 →