Let \(x = \pi/4\), then:
\[
\cos(\pi/4) = \frac{1}{\sqrt{2}} \Rightarrow 1 - \cos x = 1 - \frac{1}{\sqrt{2}} = \frac{\sqrt{2} - 1}{\sqrt{2}},\quad \text{so: } (1 - \cos x)^2 = \left(\frac{\sqrt{2} - 1}{\sqrt{2}}\right)^2
\]
\[
\tan^2 x = 1,\quad \sin^2 x = \left(\frac{1}{\sqrt{2}}\right)^2 = \frac{1}{2}
\Rightarrow \tan^2 x - \sin^2 x = 1 - \frac{1}{2} = \frac{1}{2}
\]
\[
\Rightarrow \text{Limit} = \frac{(\sqrt{2} - 1)^2/\ 2}{1/2} = (\sqrt{2} - 1)^2
\]