We have `f(x) =max.{sinx,cos 2x}`
We first draw the graphs of `y==sinx " and " y=cos2x`
To find the points of intersection,
`sinx=cos2x`
` implies sinx=1-2sin^(2)x`
`=2sin^(2)x+sinx-1=0`
`implies (2sinx-1)(sinx+1)=0`
`implies sinx=1//2 " or " sinx= -1`
`implies sinx=1//2 " or " sinx= -1`
`implies x=pi//6, 5pi//6 " or " x=3 pi//2`
From the graph,
`f(x)={(cos 2x",",0le x lt (pi)/(6)),(sinx",",(pi)/(6) le x lt (5pi)/(6)),(cos2x",",(5pi)/(6) le x le2pi):}`
Clearly, range of the function is `[-1,1].`