Let g(x)=∣x−2∣+(x−5)2,x∈R.
a. (i) Rewrite g as separate algebraic expressions for the intervals x<2 and x≥2.
b. (ii) For each interval, find g′(x) and hence list all critical points of g.
c. (iii) Classify every critical point obtained in part (ii) using a suitable test and justify your answer clearly.
d. (iv) Determine the minimum value of g on the entire real line and the point(s) at which it occurs.