Observe that #sqrt(1-x^2)-1+x=sqrt(1-x^2)-(1-x)#
= #sqrt(1-x)(sqrt(1+x)-sqrt(1-x))#, and hence
#(sqrt(1/x^2-1)-1/x)((1-x)/(sqrt(1-x^2)-1+x)+sqrt(1+x)/ (sqrt(1+x)-sqrt(1-x)))#
= #(sqrt((1-x^2)/x^2)-1/x)(1-x+sqrt(1-x^2))/(sqrt(1-x)(sqrt(1+x)-sqrt(1-x)))#
= #1/x(sqrt(1-x^2)-1)(sqrt(1-x)(sqrt(1-x)+sqrt(1+x)))/(sqrt(1-x)(sqrt(1+x)-sqrt(1-x)))#
= #1/x(sqrt(1-x^2)-1)((sqrt(1-x)+sqrt(1+x)))/((sqrt(1+x)-sqrt(1-x)))#
= #1/x(sqrt(1-x^2)-1)((sqrt(1-x)+sqrt(1+x))^2)/((sqrt(1+x)-sqrt(1-x))(sqrt(1-x)+sqrt(1+x)))#
= #1/x(sqrt(1-x^2)-1)(1-x+1+x+2sqrt(1-x^2))/(1+x-1+x)#
= #1/x(sqrt(1-x^2)-1)(2+2sqrt(1-x^2))/(2x)#
= #1/x(sqrt(1-x^2)-1)(1+sqrt(1-x^2))/x#
= #1/x^2(1-x^2-1)#
= #-x^2/x^2#
= #-1#