Prove that


We know that

|cos x| = cos x in [0, π/2)


|cos x| = -cos x in [π/2, 3π/2)


|cos x| = cos x in [3π/2, 2π]





y=(1-0)—1-1+(0+1)


=4


1