We have,
g(x)={\begin{matrix}\underset{0\leq t\leq x}{\mathrm{max}{{t}^{3}-6{t}^{2}+9t-3}}, & 0\leq x\leq 3 \\ 4-x, & 3<x\leq 4\end{matrix}
Let
f(x)=x3−6x2+9x−3
⇒f′(x)=3x2−12x+9
⇒f′(x)=3(x−1)(x−3)
For critical points:
f′(x)=0
⇒x=1,3
And,
f"(x)=6x−12
Then,
f"(1)=6−12=−6<0(maxima)
f"(3)=6>0(minima)
Hence,
g(x)=[f(x),1,4−x,0≤x≤11≤x≤33<x≤4

Hence, g(x) is continuous function.
g′(x)=[3(x−1)(x−3),0,−1,0<x<11<x<33<x<4
Clearly, g(x) is non-differentiable at x=3.