Considering Y=2sinx-cosx and taking both side log and then differentiating function
logy=(sinx-cosx)log2
dy/dx=ylog2(cosx+sinx)
dy/dx=2sinx-cosxlog2(cosx+sinx)
for maxima or minima dy/dx=0
as exponential function cant be zero so neglecting 2sinx-cosx and constant(log2) we get
cosx+sinx=0
The maximum and minimum value of (a cosx + b sinx) is relatively easy to find +/-root(a2+b2)
so x=+/-root2
we get maximum and minimum values as 2-sin(root2)-cos(root2) and 2sin(root2)-cos(root2)