First calculate g'(x)
Then find out where g'(x) = 0 or undefined. Reject any x-values that are not in your given interval [0,π/2].
Now compute g(x) for x=0, x= π/2, and the x values found above.The absolute max will be the largest g value found in the last step. Same for the absolute min.
Post back with your work.