f(x) = x^2-2mx+1 = (x-m)^2 - m^2 + 1
开口向上,对称轴x = m
当m≤-1时,区间在对称轴右侧单调增
最小值f(-1) = 1+2m+1 = 2m+2
最大值f(1) = 1-2m+1 = -2m+2
当m≥1时,区间在对称轴左侧单调减
最大值f(-1) = 1+2m+1 = 2m+2
最小值f(1) = 1-2m+1 = -2m+2
当-1<m≤0时,
最大值f(1) = 1-2m+1 = -2m+2
最小值 = 极值 = - m^2 + 1
当0≤m<1时,
最大值f(-1) = 1+2m+1 = 2m+2
最小值 = 极值 = - m^2 + 1