Question
Evaluate ∫0πxsinxdx using integration by parts.
Solution — Step by Step
Integration by parts formula:
∫udv=uv−∫vdu
Using the ILATE rule (Inverse trig → Logarithmic → Algebraic → Trigonometric → Exponential), we choose the function that comes first in ILATE as u.
Here we have x (Algebraic) and sinx (Trigonometric). Algebraic comes before Trigonometric in ILATE.
So: u=x, dv=sinxdx
u=x⟹du=dx
dv=sinxdx⟹v=∫sinxdx=−cosx
∫xsinxdx=uv−∫vdu
=x(−cosx)−∫(−cosx)dx
=−xcosx+∫cosxdx
=−xcosx+sinx+C
Now evaluate from 0 to π:
[−xcosx+sinx]0π
At x=π:
−πcosπ+sinπ=−π(−1)+0=π
At x=0:
−0⋅cos0+sin0=0+0=0
∴∫0πxsinxdx=π−0=π
Why This Works
Integration by parts is derived from the product rule for differentiation:
dxd(uv)=udxdv+vdxdu
Rearranging and integrating both sides:
∫udxdvdx=uv−∫vdxdudx
The key idea is that we “transfer” the differentiation burden from one factor to another. By choosing u=x (which simplifies to a constant when differentiated) and dv=sinxdx (easy to integrate), we reduce the problem from “integrate xsinx” to “integrate cosx” — much simpler.
Alternative Method — King’s Property
For this particular integral, there’s an elegant shortcut using the King’s property of definite integrals:
∫0af(x)dx=∫0af(a−x)dx
Let I=∫0πxsinxdx
Apply King’s property with a=π, replacing x with (π−x):
I=∫0π(π−x)sin(π−x)dx=∫0π(π−x)sinxdx
(since sin(π−x)=sinx)
Adding both expressions:
2I=∫0πxsinxdx+∫0π(π−x)sinxdx=∫0ππsinxdx
2I=π[−cosx]0π=π(−cosπ+cos0)=π(1+1)=2π
I=π
Same answer — but this method avoids integration by parts entirely.
In JEE Main, King’s property (sometimes called the “mirror property”) is one of the most time-saving tricks for symmetric definite integrals. Whenever you see ∫0π with expressions involving x and sinx or cosx, check if King’s property simplifies it before reaching for integration by parts.
Common Mistake
The most common error: forgetting the negative sign when integrating sinx. Students write ∫sinxdx=cosx instead of −cosx. This flips the sign of the entire solution. Always double-check: dxd(−cosx)=sinx — yes, the negative sign is correct.