Class 12 Maths, Worked in Full Past papersGet updates
Chapter 7 · Integrals

Example 3: ∫(sin⁡x+cos⁡x) dx\int(\sin x + \cos x)\,dx⁠, ∫cosec⁡x(cosec⁡x+cot⁡x) dx\int \operatorname{cosec} x(\operatorname{cosec} x + \cot x)\,dx⁠, ∫1−sin⁡xcos⁡2x dx\int\frac{1 - \sin x}{\cos^2 x}\,dx

ExamplesStandard trigonometric integrals · Section 7.2
The question

Find the following integrals:

(i) ∫(sin⁡x+cos⁡x) dx\displaystyle\int(\sin x + \cos x)\,dx    (ii) ∫cosec⁡x (cosec⁡x+cot⁡x) dx\displaystyle\int \operatorname{cosec} x\,(\operatorname{cosec} x + \cot x)\,dx    (iii) ∫1−sin⁡xcos⁡2x dx\displaystyle\int \frac{1 - \sin x}{\cos^2 x}\,dx

Exam answer

(i) Let I=∫(sin⁡x+cos⁡x) dxI = \displaystyle\int(\sin x + \cos x)\,dx⁠.

I=∫sin⁡x dx+∫cos⁡x dxI = \int\sin x\,dx + \int\cos x\,dx

∴ I=−cos⁡x+sin⁡x+C\therefore\ I = -\cos x + \sin x + C⁠.

(ii) Let II be the given integral. Expanding,

I=∫cosec⁡2x dx+∫cosec⁡xcot⁡x dx\begin{aligned} I &= \int\operatorname{cosec}^2x\,dx \\ &\quad + \int\operatorname{cosec} x\cot x\,dx \end{aligned}

∴ I=−cot⁡x−cosec⁡x+C\therefore\ I = -\cot x - \operatorname{cosec} x + C⁠.

(iii) Let I=∫1−sin⁡xcos⁡2x dxI = \displaystyle\int\frac{1 - \sin x}{\cos^2x}\,dx⁠.

I=∫dxcos⁡2x−∫sin⁡xcos⁡2x dx=∫sec⁡2x dx−∫sec⁡xtan⁡x dx\begin{aligned} I &= \int\frac{dx}{\cos^2x} - \int\frac{\sin x}{\cos^2x}\,dx \\ &= \int\sec^2x\,dx \\ &\quad - \int\sec x\tan x\,dx \end{aligned}

∴ I=tan⁡x−sec⁡x+C\therefore\ I = \tan x - \sec x + C⁠.

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

The one idea this problem is built on

Every derivative in the trigonometric table can be read backwards. For instance ddx(−cot⁡x)=cosec⁡2x\frac{d}{dx}(-\cot x) = \operatorname{cosec}^2 x means ∫cosec⁡2x dx=−cot⁡x+C\int\operatorname{cosec}^2x\,dx = -\cot x + C⁠. The skill here is rewriting the integrand, by expanding a bracket or splitting a fraction, until every piece is one of the six trigonometric entries (ii) to (vii) of the standard list.

Given, to find, and the plan
Given
(i) sin⁡x+cos⁡x\sin x + \cos x⁠, all real xx⁠; (ii) cosec⁡x(cosec⁡x+cot⁡x)\operatorname{cosec} x(\operatorname{cosec} x + \cot x)⁠, needs sin⁡x≠0\sin x \ne 0⁠; (iii) 1−sin⁡xcos⁡2x\frac{1 - \sin x}{\cos^2x}⁠, needs cos⁡x≠0\cos x \ne 0⁠.
To find
The three indefinite integrals.
Plan
Split (i) directly; expand (ii); split (iii) into two fractions and recognise sec⁡2x\sec^2x and sec⁡xtan⁡x\sec x\tan x⁠. Integrate with the standard formulae and differentiate back.

Basics you need

1The six trigonometric standard integrals

∫cos⁡x dx=sin⁡x\int\cos x\,dx = \sin x⁠, ∫sin⁡x dx=−cos⁡x\int\sin x\,dx = -\cos x⁠, ∫sec⁡2x dx=tan⁡x\int\sec^2x\,dx = \tan x⁠, ∫cosec⁡2x dx=−cot⁡x\int\operatorname{cosec}^2x\,dx = -\cot x⁠, ∫sec⁡xtan⁡x dx=sec⁡x\int\sec x\tan x\,dx = \sec x⁠, ∫cosec⁡xcot⁡x dx=−cosec⁡x\int\operatorname{cosec} x\cot x\,dx = -\operatorname{cosec} x⁠, each + C+\,C⁠. These are formulae (ii) to (vii) of Section 7.2. Basics: trigonometric identities for integrals

2Reciprocal functions

sec⁡x=1cos⁡x\sec x = \frac{1}{\cos x}⁠, cosec⁡x=1sin⁡x\operatorname{cosec} x = \frac{1}{\sin x}⁠, tan⁡x=sin⁡xcos⁡x\tan x = \frac{\sin x}{\cos x}⁠, cot⁡x=cos⁡xsin⁡x\cot x = \frac{\cos x}{\sin x}⁠. Basics: trigonometric identities

3Linearity

The integral of a sum or difference is the sum or difference of the integrals (Property V, Section 7.2.1). Basics: integration undoes differentiation

Part (i): ∫(sin⁡x+cos⁡x) dx\int(\sin x + \cos x)\,dx

  1. Split and integrate each term

    ∫(sin⁡x+cos⁡x) dx=∫sin⁡x dx+∫cos⁡x dx=−cos⁡x+sin⁡x+C.\begin{aligned} &\int(\sin x + \cos x)\,dx \\ &= \int\sin x\,dx + \int\cos x\,dx \\ &= -\cos x + \sin x + C. \end{aligned}
    ddx(−cos⁡x)=sin⁡x\frac{d}{dx}(-\cos x) = \sin x (formula (iii)) and ddxsin⁡x=cos⁡x\frac{d}{dx}\sin x = \cos x (formula (ii)). The minus sign in −cos⁡x-\cos x is essential: the derivative of cos⁡x\cos x is −sin⁡x-\sin x⁠, so we need −cos⁡x-\cos x to get +sin⁡x+\sin x⁠.
    Standard formulae (ii), (iii), Section 7.2. Basics: trigonometric identities for integrals
  2. Check: differentiate the answer

    ddx(−cos⁡x+sin⁡x)=sin⁡x+cos⁡x. ✓\frac{d}{dx}(-\cos x + \sin x) = \sin x + \cos x. \ \checkmark

    Valid for every real xx⁠.

    The derivative returns the integrand exactly, so the answer is right.

Part (ii): ∫cosec⁡x(cosec⁡x+cot⁡x) dx\int\operatorname{cosec} x(\operatorname{cosec} x + \cot x)\,dx

  1. Expand the bracket

    cosec⁡x(cosec⁡x+cot⁡x)=cosec⁡2x+cosec⁡xcot⁡x.\begin{aligned} &\operatorname{cosec} x(\operatorname{cosec} x + \cot x) \\ &= \operatorname{cosec}^2 x + \operatorname{cosec} x\cot x. \end{aligned}

    This needs sin⁡x≠0\sin x \ne 0⁠, that is x≠nπx \ne n\pi for integers nn⁠, since cosec⁡x\operatorname{cosec} x and cot⁡x\cot x both have sin⁡x\sin x in the denominator.

    The product as given is not on the list, but after expanding, both terms are: cosec⁡2x\operatorname{cosec}^2x and cosec⁡xcot⁡x\operatorname{cosec} x\cot x are exactly the derivatives of −cot⁡x-\cot x and −cosec⁡x-\operatorname{cosec} x⁠.
    Distributive law; cosec⁡x=1sin⁡x\operatorname{cosec} x = \frac{1}{\sin x}⁠. Basics: trigonometric identities
  2. Integrate each term

    ∫cosec⁡2x dx+∫cosec⁡xcot⁡x dx=−cot⁡x−cosec⁡x+C.\begin{aligned} &\int\operatorname{cosec}^2x\,dx + \int\operatorname{cosec} x\cot x\,dx \\ &= -\cot x - \operatorname{cosec} x + C. \end{aligned}
    Formula (v): ddx(−cot⁡x)=cosec⁡2x\frac{d}{dx}(-\cot x) = \operatorname{cosec}^2 x⁠. Formula (vii): ddx(−cosec⁡x)=cosec⁡xcot⁡x\frac{d}{dx}(-\operatorname{cosec} x) = \operatorname{cosec} x\cot x⁠. Both anti derivatives carry a minus sign, because the derivatives of cot⁡x\cot x and cosec⁡x\operatorname{cosec} x are negative.
    Standard formulae (v), (vii), Section 7.2. Lesson: integration as anti-differentiation
  3. Check: differentiate the answer

    ddx(−cot⁡x−cosec⁡x)=cosec⁡2x+cosec⁡xcot⁡x=cosec⁡x(cosec⁡x+cot⁡x). ✓\begin{aligned} &\frac{d}{dx}(-\cot x - \operatorname{cosec} x) \\ &= \operatorname{cosec}^2x + \operatorname{cosec} x\cot x \\ &= \operatorname{cosec} x(\operatorname{cosec} x + \cot x). \ \checkmark \end{aligned}

    Valid wherever sin⁡x≠0\sin x \ne 0⁠.

    ddxcot⁡x=−cosec⁡2x\frac{d}{dx}\cot x = -\operatorname{cosec}^2x and ddxcosec⁡x=−cosec⁡xcot⁡x\frac{d}{dx}\operatorname{cosec} x = -\operatorname{cosec} x\cot x⁠; the leading minus signs turn both positive. Factoring out cosec⁡x\operatorname{cosec} x gives back the integrand as it was written.

Part (iii): ∫1−sin⁡xcos⁡2x dx\int\frac{1 - \sin x}{\cos^2 x}\,dx

  1. Split the fraction

    For cos⁡x≠0\cos x \ne 0⁠,

    1−sin⁡xcos⁡2x=1cos⁡2x−sin⁡xcos⁡2x.\frac{1 - \sin x}{\cos^2x} = \frac{1}{\cos^2x} - \frac{\sin x}{\cos^2x}.
    The denominator is a single term, so the fraction splits over the subtraction in the numerator. Each piece can then be recognised separately. The condition cos⁡x≠0\cos x \ne 0⁠, that is x≠(2n+1)π2x \ne (2n+1)\frac{\pi}{2}⁠, is where the integrand exists.
  2. Recognise sec⁡2x\sec^2x and sec⁡xtan⁡x\sec x\tan x

    1cos⁡2x=sec⁡2x,sin⁡xcos⁡2x=1cos⁡x⋅sin⁡xcos⁡x=sec⁡xtan⁡x.\begin{aligned} \frac{1}{\cos^2x} &= \sec^2x, \\ \frac{\sin x}{\cos^2x} &= \frac{1}{\cos x}\cdot\frac{\sin x}{\cos x} = \sec x\tan x. \end{aligned}
    Writing cos⁡2x\cos^2x as cos⁡x⋅cos⁡x\cos x\cdot\cos x and giving one factor to sin⁡x\sin x produces tan⁡x\tan x⁠, while the other gives sec⁡x\sec x⁠. This is the step that turns an unfamiliar fraction into two entries of the standard list.
    sec⁡x=1cos⁡x\sec x = \frac{1}{\cos x}⁠, tan⁡x=sin⁡xcos⁡x\tan x = \frac{\sin x}{\cos x}⁠. Basics: trigonometric identities
  3. Integrate

    ∫1−sin⁡xcos⁡2x dx=∫sec⁡2x dx−∫sec⁡xtan⁡x dx=tan⁡x−sec⁡x+C.\begin{aligned} &\int\frac{1 - \sin x}{\cos^2x}\,dx \\ &= \int\sec^2x\,dx - \int\sec x\tan x\,dx \\ &= \tan x - \sec x + C. \end{aligned}
    Formula (iv): ddxtan⁡x=sec⁡2x\frac{d}{dx}\tan x = \sec^2 x⁠. Formula (vi): ddxsec⁡x=sec⁡xtan⁡x\frac{d}{dx}\sec x = \sec x\tan x⁠.
    Standard formulae (iv), (vi), Section 7.2. Lesson: integration as anti-differentiation
  4. Check: differentiate the answer

    ddx(tan⁡x−sec⁡x)=sec⁡2x−sec⁡xtan⁡x=1cos⁡2x−sin⁡xcos⁡2x=1−sin⁡xcos⁡2x. ✓\begin{aligned} &\frac{d}{dx}(\tan x - \sec x) \\ &= \sec^2x - \sec x\tan x \\ &= \frac{1}{\cos^2x} - \frac{\sin x}{\cos^2x} \\ &= \frac{1 - \sin x}{\cos^2x}. \ \checkmark \end{aligned}

    Valid wherever cos⁡x≠0\cos x \ne 0⁠.

    Undoing Part (iii), Step 2 puts the two terms back over the common denominator cos⁡2x\cos^2 x⁠.
Result

(i) ∫(sin⁡x+cos⁡x) dx\displaystyle\int(\sin x + \cos x)\,dx =−cos⁡x+sin⁡x+C= -\cos x + \sin x + C⁠.

(ii) ∫cosec⁡x(cosec⁡x+cot⁡x) dx\displaystyle\int\operatorname{cosec} x(\operatorname{cosec} x + \cot x)\,dx =−cot⁡x−cosec⁡x+C= -\cot x - \operatorname{cosec} x + C⁠, where sin⁡x≠0\sin x \ne 0⁠.

(iii) ∫1−sin⁡xcos⁡2x dx=tan⁡x−sec⁡x+C\displaystyle\int\frac{1 - \sin x}{\cos^2x}\,dx = \tan x - \sec x + C⁠, where cos⁡x≠0\cos x \ne 0⁠.

These agree with the textbook's solution.

Check it with numbers

By Section 7.8, ∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a)⁠. The middle column is a computer's sum of very many thin strips under the integrand, found without our answers:

PartIntervalSum of thin stripsF(b)−F(a)F(b) - F(a)
(i)[0,π2][0, \frac{\pi}{2}]22(0+1)−(−1+0)=2(0 + 1) - (-1 + 0) = 2
(ii)[π4,π2][\frac{\pi}{4}, \frac{\pi}{2}]1.41421361.4142136(−1)−(−1−2)=2(-1) - (-1 - \sqrt2) = \sqrt2
(iii)[0,π4][0, \frac{\pi}{4}]0.58578640.5857864(1−2)−(−1)=2−2(1 - \sqrt2) - (-1) = 2 - \sqrt2

2≈1.4142136\sqrt2 \approx 1.4142136 and 2−2≈0.58578642 - \sqrt2 \approx 0.5857864⁠, matching the strip sums. Both intervals avoid the points where the integrands are undefined.

Common mistakes
  1. Sign errors. ∫sin⁡x dx=−cos⁡x\int\sin x\,dx = -\cos x⁠, ∫cosec⁡2x dx=−cot⁡x\int\operatorname{cosec}^2x\,dx = -\cot x⁠, ∫cosec⁡xcot⁡x dx=−cosec⁡x\int\operatorname{cosec} x\cot x\,dx = -\operatorname{cosec} x⁠: the "co" functions and sin⁡\sin carry minus signs.
  2. Integrating a product factor by factor. ∫cosec⁡x(cosec⁡x+cot⁡x)dx\int\operatorname{cosec} x(\operatorname{cosec} x + \cot x)dx is not ∫cosec⁡x dx⋅∫(cosec⁡x+cot⁡x)dx\int\operatorname{cosec} x\,dx \cdot \int(\operatorname{cosec} x + \cot x)dx⁠. Expand first.
  3. Forgetting where the answer is valid. tan⁡x−sec⁡x\tan x - \sec x is undefined where cos⁡x=0\cos x = 0⁠, just like the integrand.
What to take away
  1. Rewrite with sec⁡\sec⁠, cosec⁡\operatorname{cosec}⁠, tan⁡\tan⁠, cot⁡\cot until each piece matches a standard formula.
  2. sin⁡xcos⁡2x=sec⁡xtan⁡x\frac{\sin x}{\cos^2x} = \sec x\tan x and cos⁡xsin⁡2x=cosec⁡xcot⁡x\frac{\cos x}{\sin^2x} = \operatorname{cosec} x\cot x are worth recognising on sight.
  3. Differentiate back every time: trigonometric signs are the commonest slip.

Every fact used, and where it comes from

FactUsed inSource
∫cos⁡x dx=sin⁡x+C\int\cos x\,dx = \sin x + C⁠, ∫sin⁡x dx=−cos⁡x+C\int\sin x\,dx = -\cos x + CPart (i)Standard formulae (ii), (iii), Section 7.2
∫cosec⁡2x dx=−cot⁡x+C\int\operatorname{cosec}^2x\,dx = -\cot x + CPart (ii), Step 2Standard formula (v), Section 7.2
∫cosec⁡xcot⁡x dx=−cosec⁡x+C\int\operatorname{cosec} x\cot x\,dx = -\operatorname{cosec} x + CPart (ii), Step 2Standard formula (vii), Section 7.2
∫sec⁡2x dx=tan⁡x+C\int\sec^2x\,dx = \tan x + C⁠, ∫sec⁡xtan⁡x dx=sec⁡x+C\int\sec x\tan x\,dx = \sec x + CPart (iii), Step 3Standard formulae (iv), (vi), Section 7.2
Integral of a sum or differenceAll partsProperty V, Section 7.2.1 (Lesson: integration as anti-differentiation)
Reciprocal and quotient relationsPart (iii), Step 2Class XI, Trigonometric Functions (Basics: trigonometric identities)
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 →