Integration · Class 12 · Lesson 04

Integration by parts: the product rule, undone.

Short answer

\[\int u\,dv = uv - \int v\,du\]

Choose \(u\) as the function that gets simpler when differentiated (the ILATE order helps). Example: \(\int x\,e^x\,dx\) with \(u = x\), \(v = e^x\) gives \(x\,e^x - \int e^x\,dx = e^x(x - 1) + C\).

Class 12HSC & CBSEEngineering
01

The formula and where it comes from

Substitution undoes the chain rule. Integration by parts undoes the product rule. Start from

\[\frac{d}{dx}(uv) = u\frac{dv}{dx} + v\frac{du}{dx}\]

Integrate both sides with respect to \(x\): \(uv = \int u\,dv + \int v\,du\). Move one term across and you have the formula.

Integration by parts

\[\int u\,dv = uv - \int v\,du\]

The same formula in textbook notation

\[\int f(x)\,g(x)\,dx = f(x)\int g(x)\,dx\]

\[- \int \left[f'(x)\int g(x)\,dx\right]dx\]

In words: keep the first function, multiply by the integral of the second, then subtract the integral of (derivative of the first) times (integral of the second). The point is to swap \(\int u\,dv\) for \(\int v\,du\), which should be easier. If it is harder, you picked the wrong \(u\).

02

Choosing u: the ILATE rule

The function you call \(u\) gets differentiated; the other one gets integrated. A common rule of thumb picks \(u\) as whichever comes first in this list:

LetterTypeExamples
IInverse trigonometric\(\sin^{-1}x\), \(\tan^{-1}x\)
LLogarithmic\(\log x\), \(\log(1 + x)\)
AAlgebraic\(x\), \(x^2\), \(\sqrt{x}\)
TTrigonometric\(\sin x\), \(\cos 2x\), \(\sec^2 x\)
EExponential\(e^x\), \(e^{2x}\), \(2^x\)

The logic: inverse trig and log functions are hard to integrate but simplify when differentiated, so they should be \(u\). Exponentials and \(\sin\), \(\cos\) integrate easily, so they make a good \(dv\).

ILATE is a habit, not a law. Take \(\int x^3 e^{x^2}\,dx\). ILATE says \(u = x^3\) and \(dv = e^{x^2}dx\), but nobody can integrate \(e^{x^2}\) in elementary terms, so that choice is a dead end. Split it differently: \(u = x^2\) and \(dv = x\,e^{x^2}dx\), so \(v = \dfrac{1}{2}e^{x^2}\) by substitution. Then

\[\int x^3 e^{x^2}\,dx = \frac{x^2}{2}e^{x^2} - \int x\,e^{x^2}\,dx\]

\[= \frac{1}{2}e^{x^2}(x^2 - 1) + C\]

So if ILATE leaves you with a \(dv\) you can't integrate, regroup the factors.

03

Results worth knowing

Each of these is derived in the examples below or in the practice questions. In the last three, \(a > 0\).

IntegralResult
\(\int \log x\,dx\)\(x\log x - x + C\)
\(\int \tan^{-1}x\,dx\)\(x\tan^{-1}x - \dfrac{1}{2}\log(1 + x^2) + C\)
\(\int \sin^{-1}x\,dx\)\(x\sin^{-1}x + \sqrt{1 - x^2} + C\)
\(\int e^x[f(x) + f'(x)]\,dx\)\(e^x f(x) + C\)
\(\int e^{ax}\sin bx\,dx\)\(\dfrac{e^{ax}}{a^2 + b^2}(a\sin bx - b\cos bx) + C\)
\(\int e^{ax}\cos bx\,dx\)\(\dfrac{e^{ax}}{a^2 + b^2}(a\cos bx + b\sin bx) + C\)
\(\int \sqrt{a^2 - x^2}\,dx\)\(\dfrac{x}{2}\sqrt{a^2 - x^2} + \dfrac{a^2}{2}\sin^{-1}\dfrac{x}{a} + C\)
\(\int \sqrt{x^2 + a^2}\,dx\)\(\dfrac{x}{2}\sqrt{x^2 + a^2} + \dfrac{a^2}{2}\log\left|x + \sqrt{x^2 + a^2}\right| + C\)
\(\int \sqrt{x^2 - a^2}\,dx\)\(\dfrac{x}{2}\sqrt{x^2 - a^2} - \dfrac{a^2}{2}\log\left|x + \sqrt{x^2 - a^2}\right| + C\)

Why does \(\int e^x[f(x) + f'(x)]\,dx = e^x f(x) + C\)? Integrate \(\int e^x f(x)\,dx\) by parts with \(u = f(x)\): you get \(e^x f(x) - \int e^x f'(x)\,dx\). That last integral cancels the \(\int e^x f'(x)\,dx\) you started with. In practice, split the bracket and check whether one piece is the derivative of the other.

The \(\sqrt{a^2 - x^2}\) result needs \(|x| \le a\), and the \(\sqrt{x^2 - a^2}\) one needs \(|x| \ge a\).

04

The tabular method (engineering note)

When \(u\) is a polynomial and \(dv\) can be integrated again and again (like \(e^x\), \(\sin x\), \(\cos x\)), repeated parts can be laid out in a table. Many engineering and Diploma students find it quicker. Differentiate \(u\) down one column until you reach 0, integrate \(dv\) down the other, and attach signs \(+, -, +, -\) in turn.

SignDifferentiate \(x^3\)Integrate \(e^x\)
\(+\)\(x^3\)\(e^x\)
\(-\)\(3x^2\)\(e^x\)
\(+\)\(6x\)\(e^x\)
\(-\)\(6\)\(e^x\)
\(0\)\(e^x\)

Multiply each entry in the middle column by the entry one row down in the right column, with that row's sign:

\[\int x^3 e^x\,dx = e^x\left(x^3 - 3x^2 + 6x - 6\right) + C\]

It is exactly the same as doing parts four times. It only works when the left column eventually hits zero.

05

Solved examples

Example 1: Polynomial times exponential

Easy

Evaluate \(\int x\,e^x\,dx\).

  1. ILATE: \(x\) is algebraic, \(e^x\) exponential. So \(u = x\), \(dv = e^x\,dx\), giving \(du = dx\) and \(v = e^x\).
  2. \(\int x\,e^x\,dx = x\,e^x - \int e^x\,dx = x\,e^x - e^x + C\).

Answer\(e^x(x - 1) + C\)

Example 2: Polynomial times cosine

Easy

Evaluate \(\int x\cos x\,dx\).

  1. \(u = x\), \(dv = \cos x\,dx\), so \(du = dx\) and \(v = \sin x\).
  2. \(x\sin x - \int \sin x\,dx = x\sin x + \cos x + C\).

Answer\(x\sin x + \cos x + C\)

Example 3: The integral of log x

Easy

Evaluate \(\int \log x\,dx\), for \(x > 0\).

  1. There is only one function, so treat it as \(\log x \cdot 1\). Take \(u = \log x\), \(dv = dx\): \(du = \dfrac{dx}{x}\), \(v = x\).
  2. \(x\log x - \int x\cdot\dfrac{1}{x}\,dx = x\log x - \int dx\).

Answer\(x\log x - x + C\)

Example 4: The integral of tan⁻¹x

Medium

Evaluate \(\int \tan^{-1}x\,dx\).

  1. Same trick: \(u = \tan^{-1}x\), \(dv = dx\). Then \(du = \dfrac{dx}{1 + x^2}\) and \(v = x\).
  2. \(x\tan^{-1}x - \displaystyle\int \frac{x}{1 + x^2}\,dx\).
  3. The last integral is \(\dfrac{1}{2}\log(1 + x^2)\), by the \(\dfrac{f^{\prime}}{f}\) pattern from substitution.

Answer\(x\tan^{-1}x - \dfrac{1}{2}\log(1 + x^2) + C\)

Example 5: Parts twice

Medium

Evaluate \(\int x^2 e^x\,dx\).

  1. \(u = x^2\), \(v = e^x\): \(\int x^2 e^x\,dx = x^2 e^x - 2\int x\,e^x\,dx\).
  2. From Example 1, \(\int x\,e^x\,dx = x\,e^x - e^x\).
  3. So the integral is \(x^2 e^x - 2x\,e^x + 2e^x + C\). Watch the sign of the last term: \(-2 \times (-e^x) = +2e^x\).

Answer\(e^x(x^2 - 2x + 2) + C\)

Example 6: The cyclic case

Exam level

Evaluate \(I = \int e^x\sin x\,dx\).

  1. Take \(u = \sin x\), \(dv = e^x\,dx\): \(I = e^x\sin x - \int e^x\cos x\,dx\).
  2. Parts again, still with the trig function as \(u\): \(\int e^x\cos x\,dx = e^x\cos x + \int e^x\sin x\,dx = e^x\cos x + I\).
  3. Substitute back: \(I = e^x\sin x - e^x\cos x - I\).
  4. The original integral has come back. Move it to the left: \(2I = e^x(\sin x - \cos x)\).

Answer\(\dfrac{e^x}{2}(\sin x - \cos x) + C\)

Example 7: The ex[f + f′] pattern

Exam level

Evaluate \(\displaystyle\int e^x\,\frac{x + 1}{(x + 2)^2}\,dx\).

  1. Write \(x + 1 = (x + 2) - 1\). Then \(\dfrac{x + 1}{(x + 2)^2} = \dfrac{1}{x + 2} - \dfrac{1}{(x + 2)^2}\).
  2. If \(f(x) = \dfrac{1}{x + 2}\), then \(f'(x) = -\dfrac{1}{(x + 2)^2}\). So the integrand is \(e^x[f(x) + f'(x)]\).
  3. By the pattern, the integral is \(e^x f(x) + C\). It holds for \(x \ne -2\).

Answer\(\dfrac{e^x}{x + 2} + C\)

Example 8: The area-of-a-circle integral

Exam level

Show that \(\displaystyle\int \sqrt{a^2 - x^2}\,dx = \frac{x}{2}\sqrt{a^2 - x^2} + \frac{a^2}{2}\sin^{-1}\frac{x}{a} + C\), for \(|x| < a\).

  1. Let \(I\) be the integral. Take \(u = \sqrt{a^2 - x^2}\), \(dv = dx\): \(du = \dfrac{-x}{\sqrt{a^2 - x^2}}\,dx\), \(v = x\).
  2. \(I = x\sqrt{a^2 - x^2} + \displaystyle\int \frac{x^2}{\sqrt{a^2 - x^2}}\,dx\).
  3. Write \(x^2 = a^2 - (a^2 - x^2)\). The integral splits as \(\displaystyle a^2\int \frac{dx}{\sqrt{a^2 - x^2}} - \int \sqrt{a^2 - x^2}\,dx\).
  4. That is \(a^2\sin^{-1}\dfrac{x}{a} - I\). So \(I = x\sqrt{a^2 - x^2} + a^2\sin^{-1}\dfrac{x}{a} - I\).
  5. Solve for \(I\): \(2I = x\sqrt{a^2 - x^2} + a^2\sin^{-1}\dfrac{x}{a}\). ✓

Answer\(\dfrac{x}{2}\sqrt{a^2 - x^2} + \dfrac{a^2}{2}\sin^{-1}\dfrac{x}{a} + C\)

Vipul Sir's tip

When a question has only one function, like \(\log x\), \(\tan^{-1}x\) or \(\sqrt{a^2 - x^2}\), multiply it by 1 and take \(dv = dx\). Students forget that by parts works with a single function. I'd say it is the most used trick in this chapter.

06

Common mistakes

1. Picking the wrong \(u\)

In \(\int x\,e^x\,dx\), taking \(u = e^x\) and \(dv = x\,dx\) gives \(\dfrac{x^2}{2}e^x - \int \dfrac{x^2}{2}e^x\,dx\). The new integral is harder than the old one. When that happens, stop and swap: \(u = x\) finishes it in one line.

2. Losing a minus sign the second time

Wrong: \(\int x^2 e^x\,dx = e^x(x^2 - 2x - 2) + C\).

Right: \(x^2 e^x - 2(x\,e^x - e^x) = e^x(x^2 - 2x + 2) + C\). The minus in front of the second integral multiplies everything inside the bracket. Put brackets in every time.

3. Switching choices halfway through a cyclic integral

In \(\int e^x\sin x\,dx\), if you take \(u = \sin x\) the first time and \(u = e^x\) the second time, the second step just undoes the first and you end with \(I = I\). Keep the same type of function as \(u\) both times, as in Example 6.

07

Practice questions

Try each one on paper before you open the answer.

Q1Evaluate \(\int x\sin x\,dx\).

\(u = x\), \(v = -\cos x\): \(-x\cos x + \int \cos x\,dx\).

Answer: \(-x\cos x + \sin x + C\).

Q2Evaluate \(\int x\log x\,dx\), for \(x > 0\).

Log comes before algebraic, so \(u = \log x\), \(v = \dfrac{x^2}{2}\).

\(\dfrac{x^2}{2}\log x - \displaystyle\int \frac{x}{2}\,dx = \frac{x^2}{2}\log x - \frac{x^2}{4} + C\).

Q3Evaluate \(\int x\sec^2 x\,dx\).

\(u = x\), \(v = \tan x\): \(x\tan x - \int \tan x\,dx\).

Answer: \(x\tan x + \log|\cos x| + C\), on any interval where \(\cos x \ne 0\).

Q4Evaluate \(\int \sin^{-1}x\,dx\), for \(|x| < 1\).

\(u = \sin^{-1}x\), \(v = x\): \(x\sin^{-1}x - \displaystyle\int \frac{x}{\sqrt{1 - x^2}}\,dx\).

The last integral is \(-\sqrt{1 - x^2}\), so the answer is \(x\sin^{-1}x + \sqrt{1 - x^2} + C\).

Q5Evaluate \(\int e^x(\sin x + \cos x)\,dx\).

With \(f(x) = \sin x\), \(f'(x) = \cos x\), so this is \(e^x[f + f']\).

Answer: \(e^x\sin x + C\).

Q6Evaluate \(\int (\log x)^2\,dx\), for \(x > 0\).

\(u = (\log x)^2\), \(v = x\): \(x(\log x)^2 - 2\int \log x\,dx\).

Using Example 3: \(x(\log x)^2 - 2x\log x + 2x + C\).

Stuck on a question?

Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.

08

Frequently asked questions

What is the formula for integration by parts?

\(\int u\,dv = uv - \int v\,du\). In textbook form, \(\int f\,g\,dx = f\int g\,dx - \int \left(f'\int g\,dx\right)dx\). It comes from integrating the product rule.

What does ILATE stand for?

Inverse trigonometric, Logarithmic, Algebraic, Trigonometric, Exponential. Choose \(u\) (the function to differentiate) as the one that comes first. It is a rule of thumb that works for most questions, but if it leaves you something you can't integrate, regroup the factors.

What is the integral of log x?

\(\int \log x\,dx = x\log x - x + C\), for \(x > 0\). Write \(\log x\) as \(\log x \cdot 1\) and integrate by parts with \(u = \log x\).

Should I use substitution or by parts?

Try substitution first: if an inner function and its derivative both appear, substitution is faster. Use by parts for a product of two unrelated types, like \(x\,e^x\) or \(x\cos x\), or for a single function that is easier to differentiate than integrate. See the substitution lesson for the other side.

Related lessons

← All integration lessons
Vipul Sir
Written by Vipul Sir

Vipul Sir has taught mathematics for over 15 years to HSC, CBSE, ICSE, IGCSE/IB, Diploma, Engineering and BSc students at VVS Classes in Goregaon and Vile Parle, Mumbai. He teaches every class himself, concepts first and exam technique second.

Class 11 & 12 Maths

Integration gets easier once you can spot the method.

Concept-first classes in small batches in Goregaon and Vile Parle, or online, for HSC, CBSE and ICSE students. Your first class is free.

WhatsApp↗