The Product Rule in Reverse

Substitution handles composite functions; integration by parts handles products of functions. It is nothing but the product rule of differentiation, read backwards.

If uu and vv are differentiable functions of xx, the product rule says ddx(uv)=udvdx+vdudx\frac{d}{dx}(uv) = u\frac{dv}{dx} + v\frac{du}{dx}. Integrating both sides and rearranging:

∫u dvdx dx=uv−∫v dudx dx\int u\,\frac{dv}{dx}\,dx = uv - \int v\,\frac{du}{dx}\,dx

Writing u=f(x)u = f(x) (the first function) and dvdx=g(x)\frac{dv}{dx} = g(x) (the second function), this becomes the working formula:

∫f(x) g(x) dx=f(x)∫g(x) dx  −  ∫[f′(x)∫g(x) dx]dx\int f(x)\,g(x)\,dx = f(x)\int g(x)\,dx \;-\; \int\left[f'(x)\int g(x)\,dx\right]dx

In words (NCERT's statement): the integral of the product of two functions = (first function) × (integral of the second function) − integral of [(derivative of the first function) × (integral of the second function)].

Anatomy of integration by parts applied to integral of x cos x

Choosing the first function — why it matters

Try ∫xcos⁡x dx\int x\cos x\,dx both ways. With f=xf = x, g=cos⁡xg = \cos x: the new integral is ∫sin⁡x dx\int \sin x\,dx — easier, and we finish with xsin⁡x+cos⁡x+Cx\sin x + \cos x + C. With f=cos⁡xf = \cos x, g=xg = x: the new integral is ∫x22sin⁡x dx\int \frac{x^2}{2}\sin x\,dx — harder than what we started with, because the power of xx went up. The proper choice of first function decides whether by parts helps or hurts.

NCERT's rule of thumb: take the power of xx (or polynomial) as the first function — except when the other function is an inverse trigonometric or logarithmic function, in which case that becomes the first function (its derivative is algebraic and simpler, and it often has no elementary integral to serve as second function).

The ILATE memory aid: pick as first function whichever comes earlier in the list — Inverse trig, Logarithmic, Algebraic, Trigonometric, Exponential. It encodes exactly NCERT's advice: log⁡x\log x and tan⁡−1x\tan^{-1}x beat x2x^2, and x2x^2 beats sin⁡x\sin x and exe^x.

Key Point: By parts trades one integral for another. The trade is good only if f′(x)∫g(x) dxf'(x)\int g(x)\,dx is easier to integrate than f(x)g(x)f(x)g(x) — choose the first function so that differentiating it simplifies it.

Three remarks from NCERT

  1. By parts is not universal. It applies to products, but not to every product: ∫x sin⁡x dx\int \sqrt{x}\,\sin x\,dx cannot be done by parts (no choice works — there is no elementary answer at all).
  2. No constant with the second function. While computing ∫g(x) dx\int g(x)\,dx inside the formula, do not add a constant: if you write sin⁡x+k\sin x + k instead of sin⁡x\sin x, the kk-terms cancel in the final answer. The constant CC appears once, at the very end.
  3. Functions without visible products. ∫log⁡x dx\int \log x\,dx and ∫tan⁡−1x dx\int \tan^{-1}x\,dx have no product — until you write them as log⁡x⋅1\log x \cdot 1 and tan⁡−1x⋅1\tan^{-1}x \cdot 1, take the constant function 11 as the second function, and integrate by parts. This trick is examined constantly.

[JEE Tip] In JEE Main, by-parts questions are rarely a single application: expect two rounds (as in ∫x2exdx\int x^2 e^x dx), a loop back to the original integral (as in ∫exsin⁡x dx\int e^x\sin x\,dx), or the disguised ex[f+f′]e^x[f + f'] pattern of the next block. Learn to recognise which of the three scripts is running before you start writing.

Two Special Patterns Built on By Parts

Pattern 1: ∫ex[f(x)+f′(x)] dx=exf(x)+C\int e^x[f(x) + f'(x)]\,dx = e^x f(x) + C

Split the integral: ∫exf(x) dx+∫exf′(x) dx\int e^x f(x)\,dx + \int e^x f'(x)\,dx. Integrate the first piece by parts (with ff as first function): it equals exf(x)−∫exf′(x) dxe^x f(x) - \int e^x f'(x)\,dx. The two ∫exf′(x) dx\int e^x f'(x)\,dx terms cancel, leaving

∫ex[f(x)+f′(x)]dx=exf(x)+C\int e^x\left[f(x) + f'(x)\right]dx = e^x f(x) + C

The skill is recognition: given ∫ex(something) dx\int e^x(\text{something})\,dx, ask whether the bracket splits as some function plus its own derivative. For example, in ∫ex(tan⁡−1x+11+x2)dx\int e^x\left(\tan^{-1}x + \frac{1}{1+x^2}\right)dx, the bracket is f+f′f + f' with f=tan⁡−1xf = \tan^{-1}x — answer extan⁡−1x+Ce^x\tan^{-1}x + C, no working needed.

Key Point: Whenever exe^x multiplies a sum of two terms, test whether one term is the derivative of the other. If yes, the answer is ex×(the original term)+Ce^x \times (\text{the original term})+ C — the one whose derivative also appears.

Pattern 2: the three square-root integrals (NCERT 7.6.2)

Taking 11 as the second function and integrating by parts (the integral loops back to itself, just like ∫exsin⁡x dx\int e^x \sin x\,dx), NCERT derives three more standard results:

Card of the three standard square root integrals from section 7.6.2

  1. ∫x2−a2 dx=x2x2−a2−a22log⁡∣x+x2−a2∣+C\displaystyle\int \sqrt{x^2 - a^2}\,dx = \frac{x}{2}\sqrt{x^2 - a^2} - \frac{a^2}{2}\log\left|x + \sqrt{x^2 - a^2}\right| + C
  2. ∫x2+a2 dx=x2x2+a2+a22log⁡∣x+x2+a2∣+C\displaystyle\int \sqrt{x^2 + a^2}\,dx = \frac{x}{2}\sqrt{x^2 + a^2} + \frac{a^2}{2}\log\left|x + \sqrt{x^2 + a^2}\right| + C
  3. ∫a2−x2 dx=x2a2−x2+a22sin⁡−1xa+C\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

Memory scheme: every answer starts x2⋯\frac{x}{2}\sqrt{\cdots} (half of xx times the same root). The tail copies the Section 7.4 formula for the reciprocal of that root, scaled by a22\frac{a^2}{2} — a log for x2±a2x^2 \pm a^2, a sin⁡−1\sin^{-1} for a2−x2a^2 - x^2 — with a minus sign only in the first formula.

General quadratics. For ∫ax2+bx+c dx\int\sqrt{ax^2 + bx + c}\,dx, complete the square, substitute the shifted variable, and apply whichever of the three fits — exactly the Section 7.4 workflow, now with the root outside the denominator. (Alternatively the three can be derived by the trigonometric substitutions x=asec⁡θx = a\sec\theta, x=atan⁡θx = a\tan\theta, x=asin⁡θx = a\sin\theta respectively.)

[JEE Tip] These three formulas are in the JEE Main syllabus and appear directly — usually after a completing-the-square step. Quote them; deriving by parts under exam pressure wastes three minutes.

Solved Examples

Example 1: The model case

Find ∫xcos⁡x dx\displaystyle\int x\cos x\,dx.

Solution:

  1. Choose: ILATE — Algebraic xx before Trigonometric cos⁡x\cos x, so f=xf = x, g=cos⁡xg = \cos x.
  2. Apply the formula: ∫xcos⁡x dx=xsin⁡x−∫(1)(sin⁡x) dx\int x\cos x\,dx = x\sin x - \int (1)(\sin x)\,dx.
  3. Finish: =xsin⁡x+cos⁡x+C= x\sin x + \cos x + C.

Final Answer: xsin⁡x+cos⁡x+Cx\sin x + \cos x + C.

Takeaway: Check by differentiating: ddx(xsin⁡x+cos⁡x)=sin⁡x+xcos⁡x−sin⁡x=xcos⁡x\frac{d}{dx}(x\sin x + \cos x) = \sin x + x\cos x - \sin x = x\cos x. ✓

Example 2: The constant-function trick

Find ∫log⁡x dx\displaystyle\int \log x\,dx.

Solution:

  1. Create a product: write log⁡x=(log⁡x)⋅1\log x = (\log x)\cdot 1; take f=log⁡xf = \log x (Logarithmic), g=1g = 1.
  2. Apply: ∫log⁡x dx=(log⁡x)(x)−∫1x⋅x dx\int \log x\,dx = (\log x)(x) - \int \frac{1}{x}\cdot x\,dx.
  3. Finish: =xlog⁡x−∫1 dx=xlog⁡x−x+C= x\log x - \int 1\,dx = x\log x - x + C.

Final Answer: xlog⁡x−x+Cx\log x - x + C.

Example 3: Polynomial times exponential

Find ∫xex dx\displaystyle\int x e^x\,dx.

Solution:

  1. Choose: f=xf = x (Algebraic before Exponential), g=exg = e^x.
  2. Apply: ∫xexdx=xex−∫1⋅exdx=xex−ex+C\int x e^x dx = x e^x - \int 1\cdot e^x dx = x e^x - e^x + C.

Final Answer: (x−1)ex+C(x - 1)e^x + C.

Example 4: By parts twice

Find ∫x2ex dx\displaystyle\int x^2 e^x\,dx.

Solution:

  1. Round 1: f=x2f = x^2, g=exg = e^x: ∫x2exdx=x2ex−2∫xexdx\int x^2 e^x dx = x^2 e^x - 2\int x e^x dx.
  2. Round 2: by Example 3, ∫xexdx=(x−1)ex\int x e^x dx = (x-1)e^x.
  3. Combine: x2ex−2(x−1)ex+C=(x2−2x+2)ex+Cx^2 e^x - 2(x - 1)e^x + C = (x^2 - 2x + 2)e^x + C.

Final Answer: (x2−2x+2)ex+C(x^2 - 2x + 2)e^x + C.

Takeaway: Each round of by parts drops the power of xx by one. A polynomial of degree nn times exe^x needs nn rounds — and the signs alternate.

Example 5: Inverse trig as first function

Find ∫xtan⁡−1x dx\displaystyle\int x\tan^{-1}x\,dx.

Solution:

  1. Choose: ILATE — Inverse tan⁡−1x\tan^{-1}x before Algebraic xx, so f=tan⁡−1xf = \tan^{-1}x, g=xg = x.
  2. Apply: ∫xtan⁡−1x dx=tan⁡−1x⋅x22−12∫x21+x2 dx\int x\tan^{-1}x\,dx = \tan^{-1}x\cdot\frac{x^2}{2} - \frac{1}{2}\int \frac{x^2}{1 + x^2}\,dx.
  3. Simplify the remainder: x21+x2=1−11+x2\frac{x^2}{1+x^2} = 1 - \frac{1}{1+x^2}, so ∫x21+x2dx=x−tan⁡−1x\int \frac{x^2}{1+x^2}dx = x - \tan^{-1}x.
  4. Combine: x22tan⁡−1x−x2+12tan⁡−1x+C\frac{x^2}{2}\tan^{-1}x - \frac{x}{2} + \frac{1}{2}\tan^{-1}x + C.

Final Answer: 12(x2+1)tan⁡−1x−x2+C\frac{1}{2}(x^2 + 1)\tan^{-1}x - \frac{x}{2} + C.

Takeaway: The add-and-subtract move x21+x2=1−11+x2\frac{x^2}{1+x^2} = 1 - \frac{1}{1+x^2} is the standard finisher whenever by parts leaves a proper-degree rational function.

Example 6: A hybrid with substitution

Find ∫xsin⁡−1x1−x2 dx\displaystyle\int \frac{x\sin^{-1}x}{\sqrt{1 - x^2}}\,dx.

Solution:

  1. Choose: f=sin⁡−1xf = \sin^{-1}x (first), g=x1−x2g = \frac{x}{\sqrt{1-x^2}} (second).
  2. Integrate the second function: put t=1−x2t = 1 - x^2, dt=−2x dxdt = -2x\,dx: ∫x dx1−x2=−12∫dtt=−t=−1−x2\int\frac{x\,dx}{\sqrt{1-x^2}} = -\frac{1}{2}\int\frac{dt}{\sqrt t} = -\sqrt t = -\sqrt{1 - x^2}.
  3. Apply by parts: ∫xsin⁡−1x1−x2dx=sin⁡−1x⋅(−1−x2)−∫11−x2⋅(−1−x2) dx\int\frac{x\sin^{-1}x}{\sqrt{1-x^2}}dx = \sin^{-1}x\cdot(-\sqrt{1-x^2}) - \int\frac{1}{\sqrt{1-x^2}}\cdot(-\sqrt{1-x^2})\,dx.
  4. Finish: =−1−x2 sin⁡−1x+∫1 dx=x−1−x2 sin⁡−1x+C= -\sqrt{1-x^2}\,\sin^{-1}x + \int 1\,dx = x - \sqrt{1-x^2}\,\sin^{-1}x + C.

Final Answer: x−1−x2 sin⁡−1x+Cx - \sqrt{1 - x^2}\,\sin^{-1}x + C.

Example 7: The loop-back integral

Find ∫exsin⁡x dx\displaystyle\int e^x\sin x\,dx.

Solution:

  1. Round 1 (f=exf = e^x, g=sin⁡xg = \sin x): I=ex(−cos⁡x)+∫excos⁡x dx=−excos⁡x+I1I = e^x(-\cos x) + \int e^x\cos x\,dx = -e^x\cos x + I_1.
  2. Round 2 on I1I_1 (f=exf = e^x, g=cos⁡xg = \cos x): I1=exsin⁡x−∫exsin⁡x dx=exsin⁡x−II_1 = e^x\sin x - \int e^x\sin x\,dx = e^x\sin x - I.
  3. The loop: I=−excos⁡x+exsin⁡x−II = -e^x\cos x + e^x\sin x - I, so 2I=ex(sin⁡x−cos⁡x)2I = e^x(\sin x - \cos x).

Final Answer: ∫exsin⁡x dx=ex2(sin⁡x−cos⁡x)+C\displaystyle\int e^x \sin x\,dx = \frac{e^x}{2}(\sin x - \cos x) + C.

Takeaway: When the original integral reappears on the right, don't panic — move it to the left and solve algebraically for II. Keep the same choice-type of first function in both rounds, or the two rounds undo each other.

Example 8: Spotting ex[f+f′]e^x[f + f']

Find ∫ex(tan⁡−1x+11+x2)dx\displaystyle\int e^x\left(\tan^{-1}x + \frac{1}{1 + x^2}\right)dx.

Solution:

  1. Test the bracket: with f=tan⁡−1xf = \tan^{-1}x, f′=11+x2f' = \frac{1}{1+x^2} — the bracket is exactly f+f′f + f'.
  2. Quote the pattern: ∫ex[f+f′] dx=exf(x)+C\int e^x[f + f']\,dx = e^x f(x) + C.

Final Answer: extan⁡−1x+Ce^x\tan^{-1}x + C.

Example 9: Hidden f+f′f + f'

Find ∫(x2+1)ex(x+1)2 dx\displaystyle\int \frac{(x^2 + 1)e^x}{(x + 1)^2}\,dx.

Solution:

  1. Rewrite the numerator: x2+1=(x2−1)+2x^2 + 1 = (x^2 - 1) + 2, so the integrand is ex[x2−1(x+1)2+2(x+1)2]=ex[x−1x+1+2(x+1)2]e^x\left[\frac{x^2-1}{(x+1)^2} + \frac{2}{(x+1)^2}\right] = e^x\left[\frac{x-1}{x+1} + \frac{2}{(x+1)^2}\right].
  2. Test: with f=x−1x+1f = \frac{x-1}{x+1}, the quotient rule gives f′=(x+1)−(x−1)(x+1)2=2(x+1)2f' = \frac{(x+1) - (x-1)}{(x+1)^2} = \frac{2}{(x+1)^2} — again f+f′f + f'.

Final Answer: x−1x+1 ex+C\dfrac{x - 1}{x + 1}\,e^x + C.

Takeaway: The f+f′f + f' pattern is often disguised by algebra. When exe^x multiplies a rational function, split it into two pieces and check whether one is the derivative of the other.

Example 10: A trig disguise

Find ∫ex(1+sin⁡x1+cos⁡x)dx\displaystyle\int e^x\left(\frac{1 + \sin x}{1 + \cos x}\right)dx.

Solution:

  1. Half-angle everything: 1+cos⁡x=2cos⁡2x21 + \cos x = 2\cos^2\frac{x}{2} and 1+sin⁡x=(sin⁡x2+cos⁡x2)21 + \sin x = \left(\sin\frac{x}{2} + \cos\frac{x}{2}\right)^2… a cleaner split: 1+sin⁡x1+cos⁡x=12sec⁡2x2+tan⁡x2\frac{1+\sin x}{1+\cos x} = \frac{1}{2}\sec^2\frac{x}{2} + \tan\frac{x}{2} (using sin⁡x=2sin⁡x2cos⁡x2\sin x = 2\sin\frac{x}{2}\cos\frac{x}{2}).
  2. Test: with f=tan⁡x2f = \tan\frac{x}{2}, f′=12sec⁡2x2f' = \frac{1}{2}\sec^2\frac{x}{2} — the bracket is f+f′f + f'.

Final Answer: extan⁡x2+Ce^x\tan\dfrac{x}{2} + C.

Example 11: Completing the square under the root

Find ∫x2+2x+5 dx\displaystyle\int \sqrt{x^2 + 2x + 5}\,dx.

Solution:

  1. Complete the square: x2+2x+5=(x+1)2+4x^2 + 2x + 5 = (x+1)^2 + 4.
  2. Shift: put y=x+1y = x + 1, dy=dxdy = dx: the integral is ∫y2+22 dy\int\sqrt{y^2 + 2^2}\,dy — root formula (2).
  3. Apply: y2y2+4+42log⁡∣y+y2+4∣+C\frac{y}{2}\sqrt{y^2 + 4} + \frac{4}{2}\log\left|y + \sqrt{y^2 + 4}\right| + C.
  4. Return to xx: substitute y=x+1y = x + 1 back.

Final Answer: x+12x2+2x+5+2log⁡∣x+1+x2+2x+5∣+C\dfrac{x+1}{2}\sqrt{x^2 + 2x + 5} + 2\log\left|x + 1 + \sqrt{x^2 + 2x + 5}\right| + C.

Example 12: The sin⁡−1\sin^{-1} case

Find ∫3−2x−x2 dx\displaystyle\int \sqrt{3 - 2x - x^2}\,dx.

Solution:

  1. Complete the square: 3−2x−x2=4−(x+1)23 - 2x - x^2 = 4 - (x+1)^2.
  2. Shift: y=x+1y = x + 1: the integral is ∫22−y2 dy\int\sqrt{2^2 - y^2}\,dy — root formula (3).
  3. Apply: y24−y2+42sin⁡−1y2+C\frac{y}{2}\sqrt{4 - y^2} + \frac{4}{2}\sin^{-1}\frac{y}{2} + C.
  4. Return: y=x+1y = x+1.

Final Answer: x+123−2x−x2+2sin⁡−1(x+12)+C\dfrac{x+1}{2}\sqrt{3 - 2x - x^2} + 2\sin^{-1}\left(\dfrac{x+1}{2}\right) + C.

Takeaway: Same decision rule as Section 7.4: minus in front of x2x^2 under the root → the sin⁡−1\sin^{-1} formula; plus → a log formula. The completed square hands you the shift and the value of aa.

Example 13: Scaling first

Find ∫1−4x2 dx\displaystyle\int \sqrt{1 - 4x^2}\,dx.

Solution:

  1. Factor out the coefficient: 1−4x2=214−x2\sqrt{1 - 4x^2} = 2\sqrt{\frac{1}{4} - x^2}, so the integral is 2∫(12)2−x2 dx2\int\sqrt{\left(\frac{1}{2}\right)^2 - x^2}\,dx.
  2. Apply formula (3) with a=12a = \frac{1}{2}: 2[x214−x2+18sin⁡−1(2x)]+C2\left[\frac{x}{2}\sqrt{\tfrac{1}{4} - x^2} + \frac{1}{8}\sin^{-1}(2x)\right] + C.
  3. Tidy: x14−x2=x21−4x2x\sqrt{\tfrac14 - x^2} = \frac{x}{2}\sqrt{1 - 4x^2}.

Final Answer: x21−4x2+14sin⁡−1(2x)+C\dfrac{x}{2}\sqrt{1 - 4x^2} + \dfrac{1}{4}\sin^{-1}(2x) + C.

Example 14: A root with real zeros

Find ∫x2+4x−5 dx\displaystyle\int \sqrt{x^2 + 4x - 5}\,dx.

Solution:

  1. Complete the square: x2+4x−5=(x+2)2−9x^2 + 4x - 5 = (x+2)^2 - 9.
  2. Shift: y=x+2y = x + 2: integral becomes ∫y2−32 dy\int\sqrt{y^2 - 3^2}\,dy — root formula (1), the one with the minus sign.
  3. Apply: y2y2−9−92log⁡∣y+y2−9∣+C\frac{y}{2}\sqrt{y^2 - 9} - \frac{9}{2}\log\left|y + \sqrt{y^2 - 9}\right| + C.
  4. Return: y=x+2y = x + 2.

Final Answer: x+22x2+4x−5−92log⁡∣x+2+x2+4x−5∣+C\dfrac{x+2}{2}\sqrt{x^2 + 4x - 5} - \dfrac{9}{2}\log\left|x + 2 + \sqrt{x^2 + 4x - 5}\right| + C.

Takeaway: Only the x2−a2\sqrt{x^2 - a^2} formula carries a minus sign before the log term — the sign of a2a^2 in the completed square tells you which formula (and which sign) you need.