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

Exercise 7.3 · Q20: ∫cos⁡2x(cos⁡x+sin⁡x)2 dx\int\frac{\cos 2x}{(\cos x+\sin x)^2}\,dx

Exercise 7.3Integration using trigonometric identities · Section 7.3.2
The question

Find the integral of the function

cos⁡2x(cos⁡x+sin⁡x)2.\frac{\cos 2x}{(\cos x + \sin x)^2}.
Exam answer

Let I=∫cos⁡2x(cos⁡x+sin⁡x)2 dxI = \displaystyle\int\frac{\cos 2x}{(\cos x + \sin x)^2}\,dx⁠.

Using cos⁡2x=cos⁡2x−sin⁡2x\cos 2x = \cos^2 x - \sin^2 x⁠,

cos⁡2x=(cos⁡x−sin⁡x)×(cos⁡x+sin⁡x)\begin{aligned} \cos 2x &= (\cos x - \sin x) \\ &\qquad \times(\cos x + \sin x) \end{aligned} ∴ I=∫cos⁡x−sin⁡xcos⁡x+sin⁡x dx\therefore\ I = \int\frac{\cos x - \sin x}{\cos x + \sin x}\,dx

Put cos⁡x+sin⁡x=t\cos x + \sin x = t⁠. Then (cos⁡x−sin⁡x) dx=dt(\cos x - \sin x)\,dx = dt⁠.

∴ I=∫dtt=log⁡∣t∣+C\therefore\ I = \int\frac{dt}{t} = \log|t| + C

∴ I=log⁡∣cos⁡x+sin⁡x∣+C\therefore\ I = \log|\cos x + \sin x| + C⁠.

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

The one idea this problem is built on

cos⁡2x=cos⁡2x−sin⁡2x\cos 2x = \cos^2 x - \sin^2 x is a difference of squares: (cos⁡x−sin⁡x)(cos⁡x+sin⁡x)(\cos x - \sin x)(\cos x + \sin x)⁠. One factor cos⁡x+sin⁡x\cos x + \sin x cancels with the denominator, leaving cos⁡x−sin⁡xcos⁡x+sin⁡x\frac{\cos x - \sin x}{\cos x + \sin x}⁠. Its numerator is the derivative of its denominator, so the integral is a logarithm: log⁡∣cos⁡x+sin⁡x∣+C\log|\cos x + \sin x| + C⁠.

Given, to find, and the plan
Given
f(x)=cos⁡2x(cos⁡x+sin⁡x)2f(x) = \dfrac{\cos 2x}{(\cos x + \sin x)^2}⁠, defined wherever cos⁡x+sin⁡x≠0\cos x + \sin x \ne 0⁠.
To find
∫cos⁡2x(cos⁡x+sin⁡x)2 dx\displaystyle\int \frac{\cos 2x}{(\cos x + \sin x)^2}\,dx⁠.
Plan
(1) Find the domain. (2) Factorise cos⁡2x\cos 2x and cancel. (3) Substitute t=cos⁡x+sin⁡xt = \cos x + \sin x⁠. (4) Integrate 1t\frac1t and return to xx⁠. (5) Differentiate back.

Basics you need

1cos⁡2x=cos⁡2x−sin⁡2x\cos 2x = \cos^2 x - \sin^2 x

One of the three forms of the double-angle formula; with A2−B2=(A−B)(A+B)A^2 - B^2 = (A - B)(A + B) it factorises. Basics: trigonometric identities for integrals

2Substitution

If t=g(x)t = g(x)⁠, then dt=g′(x) dxdt = g'(x)\,dx⁠. Basics: substitution

3∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + C

Standard formula (xii), Section 7.2, valid for t≠0t \ne 0⁠. Basics: logarithms and 1/x

Solution

  1. Where is the integrand defined?

    We need cos⁡x+sin⁡x≠0\cos x + \sin x \ne 0⁠. If cos⁡x=0\cos x = 0 then sin⁡x=±1\sin x = \pm 1⁠, so the sum is not zero there; otherwise divide by cos⁡x\cos x⁠: the condition is tan⁡x≠−1\tan x \ne -1⁠. So

    x≠nπ−π4,n an integer.x \ne n\pi - \frac{\pi}{4}, \quad n \text{ an integer}.
    The answer will be valid on each interval between consecutive excluded points, for example (−π4,3π4)\left(-\frac{\pi}{4}, \frac{3\pi}{4}\right)⁠. On such an interval cos⁡x+sin⁡x\cos x + \sin x keeps one sign, and the cancellation in Step 2 is legitimate.
  2. Factorise cos⁡2x\cos 2x and cancel

    cos⁡2x=cos⁡2x−sin⁡2x=(cos⁡x−sin⁡x)(cos⁡x+sin⁡x).\begin{aligned} \cos 2x &= \cos^2 x - \sin^2 x \\ &= (\cos x - \sin x)(\cos x + \sin x). \end{aligned}

    So, for cos⁡x+sin⁡x≠0\cos x + \sin x \ne 0⁠,

    f(x)=(cos⁡x−sin⁡x)(cos⁡x+sin⁡x)(cos⁡x+sin⁡x)2=cos⁡x−sin⁡xcos⁡x+sin⁡x.\begin{aligned} f(x) &= \frac{(\cos x - \sin x)(\cos x + \sin x)}{(\cos x + \sin x)^2} \\ &= \frac{\cos x - \sin x}{\cos x + \sin x}. \end{aligned}
    The denominator is a power of cos⁡x+sin⁡x\cos x + \sin x⁠, so we want the numerator in terms of the same expression. The form cos⁡2x−sin⁡2x\cos^2 x - \sin^2 x of cos⁡2x\cos 2x is a difference of squares that contains exactly that factor.
    cos⁡2x=cos⁡2x−sin⁡2x\cos 2x = \cos^2 x - \sin^2 x⁠; A2−B2=(A−B)(A+B)A^2 - B^2 = (A - B)(A + B)⁠. Basics: trigonometric identities for integrals
  3. Substitute t=cos⁡x+sin⁡xt = \cos x + \sin x

    Let t=cos⁡x+sin⁡xt = \cos x + \sin x⁠. Then

    dt=(−sin⁡x+cos⁡x) dx=(cos⁡x−sin⁡x) dx.dt = (-\sin x + \cos x)\,dx = (\cos x - \sin x)\,dx.

    This is the numerator times dxdx⁠, so

    ∫cos⁡x−sin⁡xcos⁡x+sin⁡x dx=∫dtt.\int\frac{\cos x - \sin x}{\cos x + \sin x}\,dx = \int\frac{dt}{t}.
    The numerator is exactly the derivative of the denominator, the pattern g′(x)g(x)\frac{g'(x)}{g(x)}⁠. The substitution t=g(x)t = g(x) turns it into dtt\frac{dt}{t}⁠.
    ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin x⁠, ddxsin⁡x=cos⁡x\frac{d}{dx}\sin x = \cos x⁠; change of variable, Section 7.3.1. Lesson: integration by substitution
  4. Integrate and return to xx

    ∫dtt=log⁡∣t∣+C=log⁡∣cos⁡x+sin⁡x∣+C.\begin{aligned} \int\frac{dt}{t} &= \log|t| + C \\ &= \log|\cos x + \sin x| + C. \end{aligned}
    Formula (xii) applies since t≠0t \ne 0 on our domain. Keep the modulus: cos⁡x+sin⁡x\cos x + \sin x is negative on some intervals, for example near x=πx = \pi⁠.
    Standard formula (xii), Section 7.2. Basics: logarithms and 1/x
  5. Check: differentiate the answer back

    With u=cos⁡x+sin⁡xu = \cos x + \sin x and ddxlog⁡∣u∣=u′u\frac{d}{dx}\log|u| = \frac{u'}{u}⁠:

    ddxlog⁡∣cos⁡x+sin⁡x∣=cos⁡x−sin⁡xcos⁡x+sin⁡x=(cos⁡x−sin⁡x)(cos⁡x+sin⁡x)(cos⁡x+sin⁡x)2=cos⁡2x(cos⁡x+sin⁡x)2.\begin{aligned} \frac{d}{dx}\log|\cos x + \sin x| &= \frac{\cos x - \sin x}{\cos x + \sin x} \\ &= \frac{(\cos x - \sin x)(\cos x + \sin x)}{(\cos x + \sin x)^2} \\ &= \frac{\cos 2x}{(\cos x + \sin x)^2}. \end{aligned}

    The second line multiplies top and bottom by cos⁡x+sin⁡x≠0\cos x + \sin x \ne 0⁠. This is the integrand, so the answer is correct on every interval where cos⁡x+sin⁡x≠0\cos x + \sin x \ne 0⁠.

    Chain rule (Theorem 4, Section 5.3.1); Property (I), Section 7.2.1. Basics: integration undoes differentiation
Result ∫cos⁡2x(cos⁡x+sin⁡x)2 dx=log⁡∣cos⁡x+sin⁡x∣+C,\int\frac{\cos 2x}{(\cos x + \sin x)^2}\,dx = \log|\cos x + \sin x| + C,

valid on any interval on which cos⁡x+sin⁡x≠0\cos x + \sin x \ne 0⁠. (Textbook answer: log⁡∣cos⁡x+sin⁡x∣+C\log|\cos x + \sin x| + C⁠.)

Check it with numbers

Let F(x)=log⁡∣cos⁡x+sin⁡x∣F(x) = \log|\cos x + \sin x| and look near x=0.5x = 0.5 with h=0.0001h = 0.0001⁠:

  • F(0.5001)≈0.305311685618F(0.5001) \approx 0.305311685618 and F(0.4999)≈0.305253004019F(0.4999) \approx 0.305253004019⁠.
  • Slope estimate: F(0.5001)−F(0.4999)0.0002≈0.293408\dfrac{F(0.5001) - F(0.4999)}{0.0002} \approx 0.293408⁠.
  • Integrand at x=0.5x = 0.5⁠: cos⁡1(cos⁡0.5+sin⁡0.5)2≈0.293408\dfrac{\cos 1}{(\cos 0.5 + \sin 0.5)^2} \approx 0.293408⁠.

They agree.

Common mistakes
  1. Expanding the denominator instead. (cos⁡x+sin⁡x)2=1+sin⁡2x(\cos x + \sin x)^2 = 1 + \sin 2x is true (it is the key to Question 14), but here it hides the cancellation.
  2. Writing ∫dtt2\int\frac{dt}{t^2}⁠. After cancelling one factor only the first power of tt remains in the denominator; the answer is a logarithm, not −1t-\frac1t⁠.
  3. Dropping the modulus in log⁡∣cos⁡x+sin⁡x∣\log|\cos x + \sin x|⁠.
What to take away
  1. cos⁡2x=(cos⁡x−sin⁡x)(cos⁡x+sin⁡x)\cos 2x = (\cos x - \sin x)(\cos x + \sin x)⁠: use it whenever cos⁡x±sin⁡x\cos x \pm \sin x appears in a denominator.
  2. ∫g′(x)g(x) dx=log⁡∣g(x)∣+C\int\frac{g'(x)}{g(x)}\,dx = \log|g(x)| + C⁠.
  3. Compare Question 14: the same square in the denominator, but there the numerator was only cos⁡x−sin⁡x\cos x - \sin x⁠, so a power of tt remained.

Every fact used, and where it comes from

FactUsed inSource
cos⁡2x=cos⁡2x−sin⁡2x\cos 2x = \cos^2 x - \sin^2 xSteps 2, 5Class XI trigonometry (Basics: trigonometric identities)
A2−B2=(A−B)(A+B)A^2 - B^2 = (A - B)(A + B)Step 2Algebra
ddxsin⁡x=cos⁡x\frac{d}{dx}\sin x = \cos x⁠, ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin xSteps 3, 5List in Section 7.2, (ii) and (iii)
Change of variable (substitution)Step 3Section 7.3.1 (Lesson: integration by substitution)
∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + CStep 4Standard formula (xii), Section 7.2
Chain ruleStep 5Theorem 4, Section 5.3.1
Differentiation undoes integrationStep 5Property (I), Section 7.2.1
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 →