Since, 1−x≥0 in [0,1] and 1−x≤0 in [1,2]
=∫10x dx−∫101 dx+∫211 dx−∫21x dx
=[x22]10−[x]10+[x]21−[x22]21 [∵∫xn dx=xn+1n+1,n≠−1]
=[122−0]−[1−0]+[2−1]−[222−122] [∵[f(x)]ba=f(b)−f(a)]
=12−1+1−2+12
=1−2
=−1
∴∫20|1−x| dx=−1