Let I=∫2−1|x|xdx
⇒I=∫1−1|x|x dx+∫21|x|x dx(∵∫baf(x) dx=∫caf(x) dx+∫bcf(x) dx,where a<c<b)
Consider∫1−1|x|x dxLet g(x)=|x|xThen, g(−x)=|−x|−x=−|x|x=−g(x)
⇒ g(x) is an odd function.
∴∫1−1|x|x dx=0
Now, ∫21|x|x dx=∫211 dx (∵|x|=x for x∈[1,2]
=[x]21=2−1=1
∴ I=0+1=1