已知a+1a=3,求a2+1a2的值.