22.(14分)(2013•浙江)已知 $a\in\mathbb{R}$,函数 $f(x)=x^3-3x^2+3ax-3a+3$.
(1)求曲线 $y=f(x)$ 在点 $(1,f(1))$ 处的切线方程;
(2)当 $x\in[0,2]$ 时,求 $|f(x)|$ 的最大值.
参考答案
(1)$y=(3a-3)x-3a+4$;(2)当 $a\leq0$ 时,$\max|f(x)|=3-3a$;当 $0<a<1$ 时,$\max|f(x)|=\max\{|f(0)|,|f(2)|,|f(1)|\}$;当 $a\geq1$ 时,$\max|f(x)|=3a-1$