解由a^2-3a+1=0
得a^2+1=3a
即a+1/a=3
故a^2+1/a^2
=(a+1/a)^2-2a×1/a
=3^2-2*1
=7
(a-1a)^2
=a^2+1/a^2-2a×1/a
=a^2+1/a^2+2a×1/a-4a×1/a
=(a+1/a)^2-4
=7-4
=3
解由a^2-3a+1=0
得a^2+1=3a
即a+1/a=3
故a^2+1/a^2
=(a+1/a)^2-2a×1/a
=3^2-2*1
=7
(a-1a)^2
=a^2+1/a^2-2a×1/a
=a^2+1/a^2+2a×1/a-4a×1/a
=(a+1/a)^2-4
=7-4
=3