已知lg[(a²-1)x²+(a+1)x+1]定义域为R,求a的取值