Substitution handles composite functions; integration by parts handles products of functions. It is nothing but the product rule of differentiation, read backwards.
If u and v are differentiable functions of x, the product rule says dxd(uv)=udxdv+vdxdu. Integrating both sides and rearranging:
∫udxdvdx=uv−∫vdxdudx
Writing u=f(x) (the first function) and dxdv=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
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)].
Choosing the first function — why it matters
Try ∫xcosxdx both ways. With f=x, g=cosx: the new integral is ∫sinxdx — easier, and we finish with xsinx+cosx+C. With f=cosx, g=x: the new integral is ∫2x2sinxdx — harder than what we started with, because the power of x went up. The proper choice of first function decides whether by parts helps or hurts.
NCERT's rule of thumb: take the power of x (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: logx and tan−1x beat x2, and x2 beats sinx and ex.
Key Point: By parts trades one integral for another. The trade is good only if f′(x)∫g(x)dx is easier to integrate than f(x)g(x) — choose the first function so that differentiating it simplifies it.
Three remarks from NCERT
By parts is not universal. It applies to products, but not to every product: ∫xsinxdx cannot be done by parts (no choice works — there is no elementary answer at all).
No constant with the second function. While computing ∫g(x)dx inside the formula, do not add a constant: if you write sinx+k instead of sinx, the k-terms cancel in the final answer. The constant C appears once, at the very end.
Functions without visible products.∫logxdx and ∫tan−1xdx have no product — until you write them as logx⋅1 and tan−1x⋅1, take the constant function 1 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), a loop back to the original integral (as in ∫exsinxdx), or the disguised ex[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
Split the integral: ∫exf(x)dx+∫exf′(x)dx. Integrate the first piece by parts (with f as first function): it equals exf(x)−∫exf′(x)dx. The two ∫exf′(x)dx terms cancel, leaving
∫ex[f(x)+f′(x)]dx=exf(x)+C
The skill is recognition: given ∫ex(something)dx, ask whether the bracket splits as some function plus its own derivative. For example, in ∫ex(tan−1x+1+x21)dx, the bracket is f+f′ with f=tan−1x — answer extan−1x+C, no working needed.
Key Point: Whenever ex 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)+C — the one whose derivative also appears.
Pattern 2: the three square-root integrals (NCERT 7.6.2)
Taking 1 as the second function and integrating by parts (the integral loops back to itself, just like ∫exsinxdx), NCERT derives three more standard results:
∫x2−a2dx=2xx2−a2−2a2logx+x2−a2+C
∫x2+a2dx=2xx2+a2+2a2logx+x2+a2+C
∫a2−x2dx=2xa2−x2+2a2sin−1ax+C
Memory scheme: every answer starts 2x⋯ (half of x times the same root). The tail copies the Section 7.4 formula for the reciprocal of that root, scaled by 2a2 — a log for x2±a2, a sin−1 for a2−x2 — with a minus sign only in the first formula.
General quadratics. For ∫ax2+bx+cdx, 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=atanθ, x=asinθ 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 ∫xcosxdx.
Solution:
Choose: ILATE — Algebraic x before Trigonometric cosx, so f=x, g=cosx.
Apply the formula:∫xcosxdx=xsinx−∫(1)(sinx)dx.
Finish:=xsinx+cosx+C.
Final Answer:xsinx+cosx+C.
Takeaway: Check by differentiating: dxd(xsinx+cosx)=sinx+xcosx−sinx=xcosx. ✓
Example 2: The constant-function trick
Find ∫logxdx.
Solution:
Create a product: write logx=(logx)⋅1; take f=logx (Logarithmic), g=1.
Apply:∫logxdx=(logx)(x)−∫x1⋅xdx.
Finish:=xlogx−∫1dx=xlogx−x+C.
Final Answer:xlogx−x+C.
Example 3: Polynomial times exponential
Find ∫xexdx.
Solution:
Choose:f=x (Algebraic before Exponential), g=ex.
Apply:∫xexdx=xex−∫1⋅exdx=xex−ex+C.
Final Answer:(x−1)ex+C.
Example 4: By parts twice
Find ∫x2exdx.
Solution:
Round 1:f=x2, g=ex: ∫x2exdx=x2ex−2∫xexdx.
Round 2: by Example 3, ∫xexdx=(x−1)ex.
Combine:x2ex−2(x−1)ex+C=(x2−2x+2)ex+C.
Final Answer:(x2−2x+2)ex+C.
Takeaway: Each round of by parts drops the power of x by one. A polynomial of degree n times ex needs n rounds — and the signs alternate.
Example 5: Inverse trig as first function
Find ∫xtan−1xdx.
Solution:
Choose: ILATE — Inverse tan−1x before Algebraic x, so f=tan−1x, g=x.
Apply:∫xtan−1xdx=tan−1x⋅2x2−21∫1+x2x2dx.
Simplify the remainder:1+x2x2=1−1+x21, so ∫1+x2x2dx=x−tan−1x.
Combine:2x2tan−1x−2x+21tan−1x+C.
Final Answer:21(x2+1)tan−1x−2x+C.
Takeaway: The add-and-subtract move 1+x2x2=1−1+x21 is the standard finisher whenever by parts leaves a proper-degree rational function.
Example 6: A hybrid with substitution
Find ∫1−x2xsin−1xdx.
Solution:
Choose:f=sin−1x (first), g=1−x2x (second).
Integrate the second function: put t=1−x2, dt=−2xdx: ∫1−x2xdx=−21∫tdt=−t=−1−x2.
Apply by parts:∫1−x2xsin−1xdx=sin−1x⋅(−1−x2)−∫1−x21⋅(−1−x2)dx.
Round 2 on I1 (f=ex, g=cosx): I1=exsinx−∫exsinxdx=exsinx−I.
The loop:I=−excosx+exsinx−I, so 2I=ex(sinx−cosx).
Final Answer:∫exsinxdx=2ex(sinx−cosx)+C.
Takeaway: When the original integral reappears on the right, don't panic — move it to the left and solve algebraically for I. Keep the same choice-type of first function in both rounds, or the two rounds undo each other.
Example 8: Spotting ex[f+f′]
Find ∫ex(tan−1x+1+x21)dx.
Solution:
Test the bracket: with f=tan−1x, f′=1+x21 — the bracket is exactly f+f′.
Quote the pattern:∫ex[f+f′]dx=exf(x)+C.
Final Answer:extan−1x+C.
Example 9: Hidden f+f′
Find ∫(x+1)2(x2+1)exdx.
Solution:
Rewrite the numerator:x2+1=(x2−1)+2, so the integrand is ex[(x+1)2x2−1+(x+1)22]=ex[x+1x−1+(x+1)22].
Test: with f=x+1x−1, the quotient rule gives f′=(x+1)2(x+1)−(x−1)=(x+1)22 — again f+f′.
Final Answer:x+1x−1ex+C.
Takeaway: The f+f′ pattern is often disguised by algebra. When ex 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+cosx1+sinx)dx.
Solution:
Half-angle everything:1+cosx=2cos22x and 1+sinx=(sin2x+cos2x)2… a cleaner split: 1+cosx1+sinx=21sec22x+tan2x (using sinx=2sin2xcos2x).
Test: with f=tan2x, f′=21sec22x — the bracket is f+f′.
Final Answer:extan2x+C.
Example 11: Completing the square under the root
Find ∫x2+2x+5dx.
Solution:
Complete the square:x2+2x+5=(x+1)2+4.
Shift: put y=x+1, dy=dx: the integral is ∫y2+22dy — root formula (2).
Apply:2yy2+4+24logy+y2+4+C.
Return to x: substitute y=x+1 back.
Final Answer:2x+1x2+2x+5+2logx+1+x2+2x+5+C.
Example 12: The sin−1 case
Find ∫3−2x−x2dx.
Solution:
Complete the square:3−2x−x2=4−(x+1)2.
Shift:y=x+1: the integral is ∫22−y2dy — root formula (3).
Apply:2y4−y2+24sin−12y+C.
Return:y=x+1.
Final Answer:2x+13−2x−x2+2sin−1(2x+1)+C.
Takeaway: Same decision rule as Section 7.4: minus in front of x2 under the root → the sin−1 formula; plus → a log formula. The completed square hands you the shift and the value of a.
Example 13: Scaling first
Find ∫1−4x2dx.
Solution:
Factor out the coefficient:1−4x2=241−x2, so the integral is 2∫(21)2−x2dx.
Apply formula (3) with a=21: 2[2x41−x2+81sin−1(2x)]+C.
Tidy:x41−x2=2x1−4x2.
Final Answer:2x1−4x2+41sin−1(2x)+C.
Example 14: A root with real zeros
Find ∫x2+4x−5dx.
Solution:
Complete the square:x2+4x−5=(x+2)2−9.
Shift:y=x+2: integral becomes ∫y2−32dy — root formula (1), the one with the minus sign.
Apply:2yy2−9−29logy+y2−9+C.
Return:y=x+2.
Final Answer:2x+2x2+4x−5−29logx+2+x2+4x−5+C.
Takeaway: Only the x2−a2 formula carries a minus sign before the log term — the sign of a2 in the completed square tells you which formula (and which sign) you need.
Ready to test your knowledge?
Take a quick interactive quiz on this topic —
free, works without login.