# Does the equation $U^2+V^2=A^2+sB^2$ with $s$ squarefree have a complete integer solution?

I’m looking for a complete solution (parameterization or other) to the equation in the title, i.e., $$U^2+V^2=A^2+sB^2,$$ where $s$ is squarefree [if necessary]. When $s=1$, the solution is well-known (and easy to derive), so we can assume $s \ne 1$.

Any references would be appreciated.

• I don't seem to know the well known solution for $s=1.$ – Will Jagy Mar 15 '17 at 19:16
• @WillJagy: If $u,v,a,b$ are integers, with $uvab \ne 0$, such that $u^2+v^2 = a^2+b^2,$ then there exist integers $g,h,m,n,t$ such that \begin{align} u &= \tfrac{1}{2}t(hn+gm), &\qquad\qquad&& a &= \tfrac{1}{2}t(hn-gm), \\ v &= \tfrac{1}{2}t(hm-gn), &\qquad\qquad&& b &= \tfrac{1}{2}t(hm+gn), \end{align} where $t$ is the greatest common divisor of $u,v,a,b$, and $\gcd(m,n)=1$. – Kieren MacMillan Mar 15 '17 at 19:19
• can't see anything; will try refreshing the screen in a minute. Dickson's History, Volume 2, page 254, says Welsch (1910) claimed the full solution is... alright, same as what you type. – Will Jagy Mar 15 '17 at 19:21
• On page 503, Fricke and Klein suggest $(z_1z_4 - z_2 z_3)$ as a normal form for an isotropic quaternary quadratic form, signature $++--.$ Seems to give Welsh's result without trouble... – Will Jagy Mar 15 '17 at 20:01
• hmmm. appears that helps for $U^2 + s V^2 = A^2 + s B^2.$ Your version, not so much. You might try $u^2 + v^2 = a^2 + 27 b^2,$ where things about the cube root of two should appear. Or, worse, $u^2 + v^2 = a^2 + 23 b^2,$ – Will Jagy Mar 15 '17 at 20:28

For the equation.

$$U^2+W^2=A^2+tB^2$$

You can write such a parameterization.

$$U=2ps(z^2+tq^2+x^2-y^2)+2x((p^2-s^2)y+(p^2+s^2)z)$$

$$W=(p^2-s^2)(z^2+tq^2-x^2+y^2)+2y(2psx+(p^2+s^2)z)$$

$$A=(p^2+s^2)(z^2-tq^2+x^2+y^2)+2z(2psx+(p^2-s^2)y)$$

$$B=2q(2psx+(p^2-s^2)y+(p^2+s^2)z)$$

• Is it exhaustive though? – MathGod May 22 '17 at 18:43