Given,
f:R→R be a function defined by f(x)=logm2(sinx−cosx)+m−2, for some m,
Also given the range of f is [0,2],
Now we know that,
−2≤sinx−cosx≤2
⇒−2≤2(sinx−cosx)≤2
(Assuming 2(sinx−cosx)=k)
⇒−2≤k≤2…(1)
Now taking function f(x)=logm(k+m−2)
Given, 0≤f(x)≤2
⇒0≤logm(k+m−2)≤2
⇒1≤k+m−2≤m
⇒−m+3≤k≤2…(2)
Now from equations (1)&(2), we get
−m+3=−2
⇒m=5