当a=1时,f(x) = x|x-a| + 1 = x|x-1| + 1 = x
x|x-1| = x-1
若x > 1,则解得x = 0,不满足要求
x=1满足要求
若x < 1,则解得x = -1,满足要求
所以x = 1或-1