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

Exercise 7.3 · Q16: ∫tan⁡4x dx\int\tan^4 x\,dx

Exercise 7.3Integration using trigonometric identities · Section 7.3.2
The question

Find the integral of the function

tan⁡4x.\tan^4 x.
Exam answer

Let I=∫tan⁡4x dxI = \displaystyle\int\tan^4 x\,dx⁠.

Using tan⁡2x=sec⁡2x−1\tan^2 x = \sec^2 x - 1⁠,

tan⁡4x=tan⁡2x(sec⁡2x−1)=tan⁡2xsec⁡2x−tan⁡2x=tan⁡2xsec⁡2x−sec⁡2x+1\begin{aligned} \tan^4 x &= \tan^2 x(\sec^2 x - 1) \\ &= \tan^2 x\sec^2 x - \tan^2 x \\ &= \tan^2 x\sec^2 x - \sec^2 x + 1 \end{aligned} ∴ I=∫tan⁡2xsec⁡2x dx−∫sec⁡2x dx+∫dx\begin{aligned} \therefore\ I &= \int\tan^2 x\sec^2 x\,dx \\ &\quad - \int\sec^2 x\,dx + \int dx \end{aligned}

In the first integral, put tan⁡x=t\tan x = t⁠. Then sec⁡2x dx=dt\sec^2 x\,dx = dt⁠.

∴ I=∫t2 dt−tan⁡x+x=t33−tan⁡x+x+C\begin{aligned} \therefore\ I &= \int t^2\,dt - \tan x + x \\ &= \frac{t^3}{3} - \tan x + x + C \end{aligned}

∴ I=13tan⁡3x−tan⁡x+x+C\therefore\ I = \dfrac13\tan^3 x - \tan x + x + C⁠.

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

The one idea this problem is built on

Tangent powers are tamed by tan⁡2x=sec⁡2x−1\tan^2 x = \sec^2 x - 1⁠, because sec⁡2x\sec^2 x is the derivative of tan⁡x\tan x⁠. Apply it to one factor tan⁡2x\tan^2 x⁠: tan⁡4x=tan⁡2xsec⁡2x−tan⁡2x\tan^4 x = \tan^2 x\sec^2 x - \tan^2 x⁠. The first piece is "t2 dtt^2\,dt" with t=tan⁡xt = \tan x⁠; the second piece uses the same identity once more and becomes sec⁡2x−1\sec^2 x - 1⁠.

Given, to find, and the plan
Given
f(x)=tan⁡4xf(x) = \tan^4 x⁠, defined wherever cos⁡x≠0\cos x \ne 0⁠.
To find
∫tan⁡4x dx\displaystyle\int \tan^4 x\,dx⁠.
Plan
(1) Find the domain. (2) Rewrite tan⁡4x\tan^4 x with tan⁡2x=sec⁡2x−1\tan^2 x = \sec^2 x - 1⁠, twice. (3) Integrate tan⁡2xsec⁡2x\tan^2 x\sec^2 x by the substitution t=tan⁡xt = \tan x⁠. (4) Integrate the other two terms by standard formulae. (5) Differentiate back.

Basics you need

11+tan⁡2x=sec⁡2x1 + \tan^2 x = \sec^2 x

True wherever cos⁡x≠0\cos x \ne 0⁠; rearranged, tan⁡2x=sec⁡2x−1\tan^2 x = \sec^2 x - 1⁠. Basics: trigonometric identities for integrals

2tan⁡x\tan x and sec⁡2x\sec^2 x go together

ddxtan⁡x=sec⁡2x\frac{d}{dx}\tan x = \sec^2 x⁠, so ∫sec⁡2x dx=tan⁡x+C\int\sec^2 x\,dx = \tan x + C (standard formula (iv), Section 7.2), and t=tan⁡xt = \tan x gives dt=sec⁡2x dxdt = \sec^2 x\,dx⁠. Basics: substitution

3The power rule

∫t2 dt=t33+C\int t^2\,dt = \frac{t^3}{3} + C (standard formula (i), Section 7.2). Basics: powers and the power rule

Solution

  1. Where is the integrand defined?

    tan⁡x=sin⁡xcos⁡x\tan x = \frac{\sin x}{\cos x} needs cos⁡x≠0\cos x \ne 0⁠, so

    x≠π2+nπ,n an integer.x \ne \frac{\pi}{2} + n\pi, \quad n \text{ an integer}.

    We work on any interval between two consecutive such points, for example (−π2,π2)\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)⁠.

    tan⁡x\tan x blows up at these points, so no antiderivative can cross them. On each interval between them the identity 1+tan⁡2x=sec⁡2x1 + \tan^2 x = \sec^2 x holds at every point.
  2. Rewrite tan⁡4x\tan^4 x using tan⁡2x=sec⁡2x−1\tan^2 x = \sec^2 x - 1

    Apply the identity to one of the two factors tan⁡2x\tan^2 x⁠:

    tan⁡4x=tan⁡2x⋅tan⁡2x=tan⁡2x (sec⁡2x−1)=tan⁡2xsec⁡2x−tan⁡2x.\begin{aligned} \tan^4 x &= \tan^2 x\cdot\tan^2 x \\ &= \tan^2 x\,(\sec^2 x - 1) \\ &= \tan^2 x\sec^2 x - \tan^2 x. \end{aligned}

    Apply it once more to the last term:

    tan⁡4x=tan⁡2xsec⁡2x−(sec⁡2x−1)=tan⁡2xsec⁡2x−sec⁡2x+1.\begin{aligned} \tan^4 x &= \tan^2 x\sec^2 x - (\sec^2 x - 1) \\ &= \tan^2 x\sec^2 x - \sec^2 x + 1. \end{aligned}
    We cannot integrate tan⁡4x\tan^4 x directly, but we can integrate anything of the form "(function of tan⁡x\tan x⁠) ×sec⁡2x\times \sec^2 x". Converting one tan⁡2x\tan^2 x into sec⁡2x−1\sec^2 x - 1 creates exactly such a term, tan⁡2xsec⁡2x\tan^2 x\sec^2 x⁠. The leftover tan⁡2x\tan^2 x is converted the same way into sec⁡2x−1\sec^2 x - 1⁠, whose pieces are standard integrals.
    1+tan⁡2x=sec⁡2x1 + \tan^2 x = \sec^2 x⁠. Basics: trigonometric identities for integrals
  3. Integrate tan⁡2xsec⁡2x\tan^2 x\sec^2 x by substitution

    Put t=tan⁡xt = \tan x⁠, so dt=sec⁡2x dxdt = \sec^2 x\,dx⁠. Then

    ∫tan⁡2xsec⁡2x dx=∫t2 dt=t33+C1=tan⁡3x3+C1.\begin{aligned} \int \tan^2 x\sec^2 x\,dx &= \int t^2\,dt \\ &= \frac{t^3}{3} + C_1 = \frac{\tan^3 x}{3} + C_1. \end{aligned}
    The factor sec⁡2x dx\sec^2 x\,dx is precisely dtdt⁠, and tan⁡2x\tan^2 x becomes t2t^2⁠. Nothing in xx is left over, so the substitution is complete, and the power rule finishes it.
    Change of variable, Section 7.3.1; standard formula (i), Section 7.2. Lesson: integration by substitution
  4. Integrate the remaining terms and combine

    By standard formulae (iv) and (i), ∫sec⁡2x dx=tan⁡x+C2\int\sec^2 x\,dx = \tan x + C_2 and ∫1 dx=x+C3\int 1\,dx = x + C_3⁠. By Property (V),

    ∫tan⁡4x dx=∫tan⁡2xsec⁡2x dx−∫sec⁡2x dx+∫dx=tan⁡3x3−tan⁡x+x+C,\begin{aligned} \int \tan^4 x\,dx &= \int\tan^2 x\sec^2 x\,dx \\ &\quad - \int\sec^2 x\,dx + \int dx \\ &= \frac{\tan^3 x}{3} - \tan x + x + C, \end{aligned}

    where the separate constants are combined into a single CC⁠.

    The integral of a sum (or difference) is the sum (or difference) of the integrals. Three arbitrary constants added together are just one arbitrary constant.
    Property (V), Section 7.2.1; standard formulae (i) and (iv), Section 7.2. Lesson: integration as anti-differentiation
  5. Check: differentiate the answer back

    By the chain rule, ddxtan⁡3x=3tan⁡2xsec⁡2x\frac{d}{dx}\tan^3 x = 3\tan^2 x\sec^2 x⁠. So, with F(x)=13tan⁡3x−tan⁡x+xF(x) = \frac13\tan^3 x - \tan x + x⁠,

    F′(x)=tan⁡2xsec⁡2x−sec⁡2x+1=tan⁡2xsec⁡2x−tan⁡2x=tan⁡2x (sec⁡2x−1)=tan⁡2x⋅tan⁡2x=tan⁡4x.\begin{aligned} F'(x) &= \tan^2 x\sec^2 x - \sec^2 x + 1 \\ &= \tan^2 x\sec^2 x - \tan^2 x \\ &= \tan^2 x\,(\sec^2 x - 1) \\ &= \tan^2 x\cdot\tan^2 x = \tan^4 x. \end{aligned}

    The second and fourth lines use sec⁡2x−1=tan⁡2x\sec^2 x - 1 = \tan^2 x⁠. This is the integrand, so the answer is correct on every interval where cos⁡x≠0\cos x \ne 0⁠.

    Chain rule (Theorem 4, Section 5.3.1); Property (I), Section 7.2.1. Basics: integration undoes differentiation
Result ∫tan⁡4x dx=13tan⁡3x−tan⁡x+x+C,\int \tan^4 x\,dx = \frac13\tan^3 x - \tan x + x + C,

valid on any interval on which cos⁡x≠0\cos x \ne 0⁠. (Textbook answer: 13tan⁡3x−tan⁡x+x+C\frac13\tan^3 x - \tan x + x + C⁠.)

Check it with numbers

Let F(x)=13tan⁡3x−tan⁡x+xF(x) = \frac13\tan^3 x - \tan x + x and look near x=0.5x = 0.5 with h=0.0001h = 0.0001⁠:

  • F(0.5001)≈0.008053760F(0.5001) \approx 0.008053760 and F(0.4999)≈0.008035946F(0.4999) \approx 0.008035946⁠.
  • Slope estimate: F(0.5001)−F(0.4999)0.0002≈0.089070\dfrac{F(0.5001) - F(0.4999)}{0.0002} \approx 0.089070⁠.
  • Integrand at x=0.5x = 0.5⁠: tan⁡40.5≈0.089070\tan^4 0.5 \approx 0.089070⁠.

They agree.

Common mistakes
  1. Writing ∫tan⁡4x dx=tan⁡5x5\int\tan^4 x\,dx = \frac{\tan^5 x}{5}⁠. The power rule needs the derivative of tan⁡x\tan x (that is, sec⁡2x\sec^2 x⁠) as a factor; tan⁡4x\tan^4 x alone does not have it.
  2. Stopping after one use of the identity. ∫tan⁡2x dx\int\tan^2 x\,dx is not a standard formula; convert it to ∫(sec⁡2x−1) dx\int(\sec^2 x - 1)\,dx⁠.
  3. Sign slips. −tan⁡2x=−(sec⁡2x−1)=−sec⁡2x+1-\tan^2 x = -(\sec^2 x - 1) = -\sec^2 x + 1⁠: the +1+1 is what produces the +x+x in the answer.
What to take away
  1. Even powers of tan⁡x\tan x⁠: peel off tan⁡2x=sec⁡2x−1\tan^2 x = \sec^2 x - 1 repeatedly. Each round gives a term tan⁡kxsec⁡2x\tan^{k}x\sec^2 x (substitute t=tan⁡xt = \tan x⁠) and a lower power.
  2. The same idea gives ∫tan⁡2x dx=tan⁡x−x+C\int\tan^2 x\,dx = \tan x - x + C⁠, a useful result to remember.

Every fact used, and where it comes from

FactUsed inSource
1+tan⁡2x=sec⁡2x1 + \tan^2 x = \sec^2 xSteps 2, 5Class XI trigonometry (Basics: trigonometric identities)
ddxtan⁡x=sec⁡2x\frac{d}{dx}\tan x = \sec^2 x⁠; ∫sec⁡2x dx=tan⁡x+C\int\sec^2 x\,dx = \tan x + CSteps 3, 4, 5Standard formula (iv), Section 7.2
Change of variable (substitution)Step 3Section 7.3.1 (Lesson: integration by substitution)
∫tn dt=tn+1n+1+C\int t^n\,dt = \frac{t^{n+1}}{n+1} + C⁠; ∫dx=x+C\int dx = x + CSteps 3, 4Standard formula (i), Section 7.2
∫\int of a linear combinationStep 4Property (V), Section 7.2.1
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 →