已知x+1/x=3,求x^2+1/x^2和(x-1/x)^2的值