In this MSE question/thread, I have been discussing the equation $$ (x^2+ay^2)(u^2+bv^2) = p^2+cq^2, \tag{$\star$} $$ where $x,a,y,u,b,v,p,c,q$ are integers. I posed a conjecture which turned out to be false. Now, as an alternative, I'm looking for a "complete integer solution" (a.k.a. integer parameterization); MO seemed like a better place to look for one, since the issue of the composition of binary quadratic forms is notoriously challenging.

Is a complete solution or parameterization already known?

If not, what's the right way to go about deriving one? I can imagine trying to resolve $x^2+ay^2=mn^2$, where [hopefully] $m$ is squarefree; doing the same for $u^2+bv^2=jk^2$ would then leave $p^2+cq^2=jm(kn)^2 = j'm'(\delta kn)^2$ where $\delta=\gcd(j,m)$, which could be resolved the same way. Is that likely the best approach?

The main application is the solution of higher-degree equations which have been reduced to the form ($\star$).

  • 1
    $\begingroup$ Is there any reason to expect a complete solution even for $a=b=c=1$? For instance, there are two distinct ways of writing $n=pq$ (with my $p$ and $q$ representing primes) as a sum of two squares if $p$ and $q$ can each be (i.e., if they're $\equiv 1\pmod 4$); this means that for a product of $k$ distinct primes there are $2^{k-1}$ ways of writing it as a sum of two squares, and many many ways of writing that sum as a product of two sums of two squares, and I can't imagine how you would parametrize all of them at once. $\endgroup$ – Steven Stadnicki Sep 19 '14 at 0:44
  • $\begingroup$ With $a=b=c=1$, multiply everything out to get $$ (xu)^2+(uy)^2+(vx)^2+(yx)^2 = p^2+q^2. $$ There are certainly complete integer parameterizations for the 2.4.2 equation (cf. Barnett & Mendel, or Bradley). This would be a special case of that, I would imagine. $\endgroup$ – Kieren MacMillan Sep 19 '14 at 0:48
  • $\begingroup$ For instance, taking the 'product' of the representations $5=1^2+2^2$ ($=\left|1+2i\right|^2$) and $13=2^2+3^2$ ($=\left|2+3i\right|^2$) yields the representation $65=4^2+7^2$, whereas using $13=3^2+2^2=\left|3+2i\right|^2$ yields $65=1^2+8^2$. Now you need to find a parametrization that yields both $(1^2+2^2)(2^2+3^2)=4^2+7^2$ and $(1^2+2^2)(3^2+2^2)=1^2+8^2$. $\endgroup$ – Steven Stadnicki Sep 19 '14 at 0:52
  • $\begingroup$ Euler observed $$ (aAp^2 + bBq^2)(abr^2 + ABs^2) = Ab(apr \pm Bqs)^2 + aB(Aps \mp bqr)^2, $$ but this is simply an identity, not a complete solution/parameterization. $\endgroup$ – Kieren MacMillan Sep 19 '14 at 1:06
  • 2
    $\begingroup$ That's sort of my point, though - the fact that you can 'chain' repeated instances of the product-of-two-squares identities means that you can get arbitrarily many ways of expressing one sum-of-two-squares (for instance) as a product of two others, and it's not clear to me that a single parametrization can capture all of those distinct expressions. $\endgroup$ – Steven Stadnicki Sep 19 '14 at 2:16

I don't think it has been explicitly mentioned yet, but presumably you are interested in integer solutions for given values of $a, b, c$.

L E Dickson's "History of the Theory of Numbers" vol 2 [ http://books.google.co.uk/books?id=eNjKEBLt_tQC ] page 433 details necessary and sufficient conditions for a homogenous quaternary quadratic $a x^2 + b y^2 + c z^2 + d t^2 = 0$ to have non-zero integer solutions, for a given set of non-zero integers $a, b, c, d$.

So if you can find numerical integer values of $x, y$ such that, denoting $A := x^2 + a y^2$, $A u^2 + A b v^2 - p^2 - c q^2 = 0$ has no non-zero integer solutions $u, v, p, q$, then that would rule out a general parametrisation, at least for unrestricted values of $a, b, c$. I suspect there are such numeric values of $A, b, c$.

If on the other hand $a, b, c$ are also thrown into the pot, i.e. as variables on the same footing as $x, y$ etc, then it is trivial to find every integer solution by simply taking $a, b, p, q = x A, z B, x z P, x z Q$ respectively to obtain an equation (in general *) bilinear in x, z which can then be expressed in the form $(x + F)(z + G) = H$, in which $F, G, H$ do not depend on $x, z$, and then one can simply take $x + F, z + G = H / t, t$ respectively for some parameter $t$ and clear denominators.

(*) In the special case when $P^2 + c Q^2$ = 1 we have an equation linear in $x, z$. But in that case we can take $x, z = y^2 X, t^2 Z$ respectively to obtain $(A + X)(B + Z) = X Z$, and solve this as above for $A, B$ to obtain $A + X, B + Z = X/t, Z t$ respectively.

  • $\begingroup$ I about it to him and spoke. Only in the given literature formulas solving these equations no. They look pretty bulky. For example: artofproblemsolving.com/blog/98937 $\endgroup$ – individ Oct 2 '14 at 14:21
  • $\begingroup$ Unfortunately (q.v. Dickson’s "Fallacies in Diophantine Analysis"), writing a rational parameterization and clearing denominators is demonstrably not the same as finding all integer solutions to an equation. The latter is far more difficult. $\endgroup$ – Kieren MacMillan Dec 16 '14 at 14:11

I think that this method of calculation it is necessary to separately draw.

As I have repeatedly said formula in General looks pretty bulky. And still remain questions about the completeness of the solution. So I decided that solutions should be found a little differently.

In Diofantos equation:


Put some numbers: $t,y$

Decompose to factor the following expression: $ct^2-ay^2=AB$

Then we can define the following numbers:



Next, you can specify the desired number: $v$

Subject to the following expression for the multiplier: $cs^2-bv^2=FJ$

This will allow us to unambiguously identify numbers:



And for the full solution will be found by the formula two other numbers.



  • $\begingroup$ Very ingenious method! But you must have a sign incorrect, or another similar error: when I plug all those numbers in, the products don't match identically. $\endgroup$ – Kieren MacMillan Oct 2 '14 at 13:32

As posted in my comment above, the case $a=b=c=1$ is relatively trivial to solve, using existing (nearly "classical") solutions to the 2.2.4 Diophantine sums-of-squares equation $$X_1^2 + X_2^2 = Y_1^2+Y_2^2+Y_3^2+Y_4^2.$$

Since nobody else was able or willing to develop a complete solution for the more general equation in the title, I am working on it myself. The complete solution will be complicated — as fully expected/anticipated — but is within reach. I will post it back here when I've fully verified my proof/algorithm.


Still not clear what you want. If you need a method, the method of finding solutions I have already in a previous post wrote. If regarding the parameterization.

Then for the equation:


You can write many upgrades parameterization similar to the previous one.







$q,n,p,k,s,t$ - integers asked us.

If this formula is not satisfied, then you can write in another form. But the point remains the same. Decisions revolve around the same equation.

If such a decision is not satisfied - tell.

  • $\begingroup$ If $x_1, x_2, y_1, y_2, y_3$ are integers satisfying $$X_1^2 + X_2^2 = Y_1^2+Y_2^2+Y_3^2$$ and $(x_1,x_2) \ne (y_1,y_2)$, then there exist integers $k,m,n,r,s,t,w$ such that $\gcd(r,s,t)=1$, $rm-sk \ge 1$, and \begin{align} x_1 &= \tfrac{1}{2}\bigl(m(t^2+r^2) - rsk - s(nt-w)\bigr), & y_1 &= \tfrac{1}{2}\bigl(m(t^2-r^2) + rsk - s(nt-w)\bigr), \\ x_2 &= \tfrac{1}{2}\bigl(-k(t^2+s^2) + rsm + r(nt-w)\bigr), & y_2 &= \tfrac{1}{2}\bigl(-k(t^2-s^2) - rsm + r(nt-w)\bigr), \\ && y_3 &= -t(rm-sk) \end{align} holds. This gives all solutions. I'm looking for a similar solution for $(\star)$. $\endgroup$ – Kieren MacMillan Dec 16 '14 at 13:55
  • 1
    $\begingroup$ Since $y$ and $v$ in your parameterization are necessarily even, and there are certainly solutions to $(\star)$ with $y,v$ odd, your solution is necessarily not complete. $\endgroup$ – Kieren MacMillan Dec 16 '14 at 14:09
  • 1
    $\begingroup$ The problem with having to explain what must be cut is this: What about solutions where $y$ is not divisible by $3$, or $5$, or any given prime or composite factor? It is not immediately obvious whether that is a restriction that needs to be "reduced" from your solution. Without proof that your solution gives all possible solutions, with the possible exception of a division by 2, one can't trust it to be the complete solution. (n.b. My solution, above, is proveable.) $\endgroup$ – Kieren MacMillan Dec 16 '14 at 14:56
  • 2
    $\begingroup$ Yes, you say that all over MO and MSE. And it seems many people are tired of hearing it. Until you are able or willing to reveal your proofs or methods, perhaps it's better to refrain from offering half-solutions like this one. $\endgroup$ – Kieren MacMillan Dec 16 '14 at 15:03
  • 1
    $\begingroup$ I suspect part of the communication issue revolves around the phrase "complete solution". individ is producing things which, if they are solutions, leave no variable alone, and are complete in providing an answer for each variable. What is wanted (and which may be explained elsewhere, but I don't see it clearly yet) is a system of expressions which will capture ALL solutions of the original system, and in a nice way which allows easy and uniform generation of any solution: a "complete" and nice description of all solutions. Gerhard "Words: Can't Live Without 'Em" Paseman, 2014.12.16 $\endgroup$ – Gerhard Paseman Dec 16 '14 at 22:20

Once these equations are referred to - it is necessary to write and solutions.

For the equation:


Solutions have the form:






For the equation:


Solutions have the form:







$k,y,t,p,s$ - integers asked us.

  • 2
    $\begingroup$ I'll take it on faith that these do provide solutions. Whether they provide all solutions is left completely unclear. $\endgroup$ – Todd Trimble Dec 26 '14 at 13:25
  • 10
    $\begingroup$ @ToddTrimble You better answer the question. Why is this forum so it is not like solving Diophantine equations? The formula will write and all we try to remove the formulas. $\endgroup$ – individ Dec 26 '14 at 13:30
  • 2
    $\begingroup$ The original question is asking for a way of producing all of the solutions. Your answer does not explain why your formulas will produce every possible solution $\endgroup$ – Yemon Choi Dec 26 '14 at 14:55

For the equation:


This solution will suit you?







$t,p,k,s$ - integers of any sign.

  • 2
    $\begingroup$ That may be (well, presumably is) an integer solution; but I would be surprised if it is a complete integer solution! $\endgroup$ – John R Ramsden Sep 29 '14 at 16:21
  • $\begingroup$ @JohnRRamsden Another solution out there: math.stackexchange.com/questions/931782/… $\endgroup$ – individ Sep 29 '14 at 16:43
  • 2
    $\begingroup$ @individ: That's the point — you are giving a solution, but not the complete solution. I'm looking for a complete solution. $\endgroup$ – Kieren MacMillan Sep 29 '14 at 20:17
  • $\begingroup$ @KierenMacMillan I have not once told You that the formula is in General very cumbersome. Don't see the reason to write them. So try to replace it with a more simple formula. $\endgroup$ – individ Sep 30 '14 at 3:47
  • 2
    $\begingroup$ For my purposes, only a complete solution — with proof that it is indeed the complete solution — will do. $\endgroup$ – Kieren MacMillan Sep 30 '14 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.