If $ab=3$ and $\frac1{a^2}+\frac1{b^2}=4,$ then $(a-b)^2=\;$? If $ab=3$ and $\frac1{a^2}+\frac1{b^2}=4$, what is the value of $(a-b)^2$?  I think $a^2+b^2=36$, please confirm and is it possible to to figure out one of the variables?

$$\frac1{a^2}+\frac1{b^2}=4$$
$$a^2b^2\left(\frac1{a^2}+\frac1{b^2} \right)=4a^2b^2$$
$$b^2+a^2=(2ab)^2$$
$$a^2-2ab+b^2=(2ab)^2-2ab$$
$$(a-b)^2=(2ab)^2-2ab=(2\cdot3)^2-2\cdot3=30$$
