The absolute value forces the answers to definite integrals to be positive on the interval [0,pi/2]. Therefore the integral needs to be split up. Looking at the graph of sin x - sqrt 3 (cos x), from [0,pi/3] the y-values are negative. From [pi/3, pi/2] the y-values are positive.
The definite integral breaks into two.
`-int sin(x)-sqrt(3)cos(x)dx` from [0,pi/3] plus
`int sin(x)-sqrt(3)cos(x)dx` from [pi/3, pi/2]
The integral is equal to -cos(x)-sqrt(3)*sin(x)
Putting in the bounds:
-[-1/2-3/2-(-1-0)] + [-0-sqrt(3)-(-1/2-3/2)] =
-[-1]+[2-sqrt(3)] = 3-sqrt(3)
The exact answer is 3-sqrt(3) which is approximately 1.268.