解:因为x^2-x-1=0,所以x^2=x+1,x^2-X=1, x^3-2x+1 =x^2*x-2x+1 =(x+1)x-2x+1 =x^2+x-2x+1 =x^2-x+1 =1+1 =2
x^3-2x+1=x(x^2-x-1)+(x^2-x-1)+2=0+0+2=2