Prove that $\sec^2{\theta}=(4xy)/(x+y)^2$ only when $x=y$ 
Show that the equation below is only possible when $x=y$
  $$ \sec^2{\theta}=\frac{4xy}{(x+y)^2}$$


The only way I can think of doing this is by rewriting it as 
$$ \cos^2{\theta}=\frac{(x+y)^2}{4xy} $$
then using some inequalities to prove it by using:
$$ 0\leq \cos^2{\theta}\leq 1 \;\; \text{ therefore } \;\; 0\leq \frac{(x+y)^2}{4xy}\leq 1 $$
But I have an aversion to using case-based solutions (checking for $x>0$, $y>0$ etc.) since I feel there must be a neater solution to  these kind of problems. So my question is: Is it possible to solve this and these sort of questions using techniques that don't involve checking numerous cases?

$4xy$ can be rearranged as $(x+y)^2-(x-y)^2$, and therefore $\sec^2\theta=\frac{(x+y)^2-(x-y)^2}{(x+y)^2}=1-\left ( \frac{x-y}{x+y} \right )^2$, which is always less than or equal to $1$ because $\left ( \frac{x-y}{x+y} \right )^2$ is greater than or equal to $0$.
Recall that $-1\le \cos\theta\le1\Rightarrow \cos^2\theta\le1\Rightarrow \sec^2\theta\ge1$.
We have therefore established that $\sec^2\theta\le1$ and also that $\sec^2\theta\ge1$; both of these conditions can be satisfied only if $\sec^2\theta=1$.
$\Rightarrow 1-\left ( \frac{x-y}{x+y} \right )^2=1\Rightarrow \left ( \frac{x-y}{x+y} \right )^2=0$
Now if $x$ and $y$ are not equal to $0$, then the denominator $x+y\ne 0 \Rightarrow x=y$ and neither of which is equal to $0 \blacksquare$
