Clearly, domain of the function is [2,4]. Now, f′(x)=x−21−24−x1 f′(x)=0 or x−2=24−x
or x−2=16−4x or x=518
Now, f(2)=2,f(518) =2518−2+4−518=10 f(4)=22
Hence, range of the function is [2,10].
Also, here x=(18/5) is the point of global maxima.