\(\text{Your answer is:}\sqrt{1-(\frac{1}a)^2}\\ \text{But the answer is:}\frac{\sqrt{a^2-1}}{a}\)
\(\sin\theta = \frac{1}{a}\\\text{Opposite side of }\theta = 1\\\text{Hypotenuse}=a \\\therefore \text{Adjacent side of }\theta = \sqrt{a^2-1}\text{<---- Pythagoras' Theorem}\\ \therefore\cos\theta = \dfrac{\text{Adjacent side}}{\text{Hypotenuse}}\\\qquad\quad=\dfrac{\sqrt{a^2-1}}{a}\)
.