The integral to evaluate is:
∫123−x+xxdx
For definite integrals, the following property holds:
∫abf(x)dx=∫abf(a+b−x)dx
Here a=1 and b=2, so a+b=3.
Let I=∫123−x+xxdx
Replacing x with 3−x:
I=∫123−(3−x)+3−x3−xdx
I=∫12x+3−x3−xdx
Adding both expressions for I:
I+I=∫123−x+xxdx+∫123−x+x3−xdx
2I=∫123−x+xx+3−xdx
2I=∫121dx
2I=[x]12
2I=2−1
2I=1
I=21
Therefore, the integral equals 21.