If $\tan x\tan y=\frac{b}{a},\,a,\,b\ne 0$, prove that $\frac{\sec^2x}{a\tan^2x+b}+\frac{\sec^2y}{a\tan^2y+b}=\frac{a+b}{ab}$
I solved it in the following way:
$\frac{1+\tan^2x}{a\tan^2x+b}+\frac{1+\tan^2y}{a\tan^2y+b}$
$=\frac{a\tan^2y+b+a\tan^2x\tan^2y+b\tan^2x+a\tan^2x+a\tan^2x\tan^2y+b+b\tan^2y}{2b^2+ab(\tan^2x+\tan^2y)}$
$=\frac{a(\tan^2y+\tan^2x)+b(\tan^2x+\tan^2y)+tb+2a\tan^2x\tan^2y}{2b^2+ab(\tan^2x+\tan^2y)}$
$=\frac{(\tan^2x+\tan^2y)(a+b)+2a\tan^2x\tan^2y+2b}{2b^2+ab(\tan^2x+\tan^2y)}$
$2b^2=2ab\tan x\tan y$
$\therefore \frac{1+\tan^2x}{a\tan^2x+b}+\frac{1+\tan^2y}{a\tan^2y+b}=\frac{(\tan^2x+\tan^2y)(a+b)+2a\tan^2x+\tan^2y+2b}{ab(\tan^2x+\tan^2y+2\tan x\tan y)}$
It remains to prove that:
$2a\tan^2x\tan^2y+2b=2(a+b)\tan x\tan y$
$2a\tan^2x\tan^2y+2b=ta\tan x\tan y+2b\tan x\tan y$
$2a\tan^2x\tan^2y+2b=2b+2b\tan x\tan y$
$2a\tan^2x\tan^2y=2b\tan x\tan y$
$\tan^2x\tan^2y=\frac{b}{a}\tan x\tan y$
Which is true.
$\therefore \frac{1+\tan^2x}{a\tan^2x+b}+\frac{1+\tan^2y}{a\tan^2y+b}=\frac{(a+b)(\tan x+\tan y)^2}{ab(\tan x+\tan y)^2}=\frac{a+b}{ab}$
Which completes the proof.
This proof is overly complex and took me over an hour to think of and write. Could you please explain to me a simpler, less messy and more intuitive proof?
Let $t:=\tan x$ so $\tan y=\frac{b}{at}$ and we want$$\frac{1+t^2}{at^2+b}+\frac{1+b^2/(a^2t^2)}{b^2/(at^2)+b}=\frac{b(1+t^2)+at^2+b^2/a}{b(at^2+b)}=\frac{a+b}{ab},$$taking out a factor of $t^2+b/a$.