Maximize $(1-a)(1-c)+(1-b)(1-d)$ over $a^2+b^2=c^2+d^2=1$. Let $a,b,c,d$ be real numbers such that $a^2+b^2=c^2+d^2=1$. Find the maximum value of $(1-a)(1-c)+(1-b)(1-d)$.

I tried substituting $a=\sin x, b =\cos x, c = \sin y, d=\cos y$, then expanded $(1-a)(1-c)+(1-b)(1-d)$. However this just leads to an ugly expression, and I'm not sure how to proceed

By the Cauchy-Schwarz inequality, we have:
$$1 \times 1=(a^2+b^2)(c^2+d^2) \geq (ac+bd)^2 \implies 1 \geq ac+bd;$$
and,
$$(a^2+b^2)(1^2+1^2)\geq (a+b)^2 \implies \sqrt 2 \geq -a-b, $$
similarly, $\sqrt 2 \geq -c-d$.
Therefore,
$$(1-a)(1-c)+(1-b)(1-d) \\ =2+(-a-b)+(-c-d)+(ac+bd) \\ \leq 2+2\sqrt 2+1=3+2\sqrt 2.$$
The equality case happens at $a=b=c=d=-\frac{\sqrt 2}{2}.$
