Solutions to $ax^2 + by^2 = cz^2$

The integer solutions to the equation $x^2 + y^2 = z^2$ are very well studied. I'm wondering if there's any literature about the integer solutions to the equation $ax^2 + by^2 = cz^2$ where a,b,c are non-zero integers. Here are some of my questions:

  1. Given a,b,c, is there an explicit way of writing all the solutions?

  2. If not, could you generate all the solutions given one of the solutions?

  3. If this is the case, are there any algorithms that are designed to look for one of these solutions?

  4. Are there any additional conditions that these solutions must satisfy?

  5. What happens when you're only given a and b?


Proof of Legendre's theorem on the ternary quadratic form

I like the discussion of Legendre's theorem in Cassels, Rational Quadratic Forms, Theorem 4.1, pages 80-82, as he is careful about pointing out that certain products must be quadratic residues for each prime dividing each entry $(a,b,c).$

Next, if $a,b,c$ are positive, and there is at least one nontrivial solution $(x_0,y_0,z_0)$ then we may find all rational points on the ellipse $a \alpha^2 + b \beta^2 = c$ by drawing all lines of rational slope through $(x_0/z_0, y_0/z_0).$ For each such line, there is a second rational point on the ellipse, with the slope $m$ as a parameter. Multiplying back through by the denominators gives a new integral solution to $a x^2 + b y^2 = c z^2.$ It is exactly this method that gives primitive Pythagorean triples $(2rs, s^2 - r^2, s^2 + r^2).$ I've done that a few times, i will try to find some of my answers on this site.

Found one anyway, Generating Pythagorean triples for $a^2+b^2=5c^2$?

Found another: note that more than one (two, here) recipe may be required to get all solutions. Pythagorean triples with additional parameters

Oh, for this few variables it is good enough to take lines with rational slope, but in general, such as $a x^2 + b y^2 + c z^2 = d w^2,$ it is better to find some rational point on the ellipsoid $(x_0/w_0, y_0/w_0, z_0/w_0)$ and then use a parameter $t$ and integers, call them $p,q,r,$ and find the other ellipsoid point $(x_0/w_0 + pt, y_0/w_0 + qt, z_0/w_0 +rt), $ where we can then eliminate $t.$


Here are the formulas! Formula generally look like this: Do not like these formulas. But this does not mean that we should not draw them. To start this equation zayimemsya, well then, and others. $aX^2+bXY+cY^2=jZ^2$

Solutions can be written if even a single root.$\sqrt{j(a+b+c)}$ , $\sqrt{b^2 + 4a(j-c)}$ , $\sqrt{b^2+4c(j-a)}$

Then the solution can be written.

$X=(2j(b+2c)^2-(b^2+4c(j-a))(j\pm\sqrt{j(a+b+c)}))s^2+2(b+2c)(\sqrt{j(a+b+c)}\mp{j})sp+(j\mp \sqrt{j(a+b+c)})p^2$

$Y=(2j(2j-b-2a)(b+2c)-(b^2+4c(j-a))(j\pm\sqrt{j(a+b+c)}))s^2+ +2((2j-2a-b)\sqrt{j(a+b+c)}\mp{j(b+2c)})sp+(j\mp\sqrt{j(a+b+c)})p^2$

$Z=(2j(b+2c)^2-(b^2+4c(j-a))(a+b+c\pm\sqrt{j(a+b+c)}))s^2+ +2(b+2c) ( \sqrt{j(a+b+c)} \mp{j})sp + ( a + b + c \mp \sqrt{j(a+b+c)})p^2 $

In the case when the root $\sqrt{b^2+4c(j-a)}$ whole.

Solutions have the form.

$X=((2j-b-2c)(8ac+2b(2j-b))-(b^2+4a(j-c))(b+2c\mp\sqrt{b^2+4c(j-a)}))s^2++2(4ac+b(2j-b)\pm{(2j-b-2c)}\sqrt{b^2+4c(j-a)})sp+(b+2c\pm\sqrt{b^2+4c(j-a)})p^2$

$Y=((b+2a)(8ac+2b(2j-b))-(b^2+4a(j-c))(2j-b-2a\mp\sqrt{b^2+4c(j-a)}))s^2++2(4ac+b(2j-b)\pm{(b+2a)}\sqrt{b^2+4c(j-a)})sp+(2j-b-2a\pm\sqrt{b^2+4c(j-a)})p^2$

$Z=((b+2a)(8ac+2b(2j-b))-(b^2+4a(j-c))(b+2c\mp\sqrt{b^2+4c(j-a)}))s^2++2(4ac+b(2j-b)\pm {(b+2a)}\sqrt{b^2+4c(j-a)})sp+(b+2c\pm\sqrt{b^2+4c(j-a)})p^2$

In the case when the root $\sqrt{b^2+4a(j-c)}$ whole.

Solutions have the form.

$X=(2j^2(b+2a)-j(a+b+c)(2j-2c-b\pm\sqrt{b^2+4a(j-c)}))p^2+ +2j(\sqrt{b^2+4a(j-c)}\mp{(b+2a)})ps+(2j-2c-b\mp\sqrt{b^2+4a(j-c)})s^2$

$Y=(2j^2(b+2a)-j(a+b+c)(b+2a\pm\sqrt{b^2+4a(j-c)}))p^2+ +2j(\sqrt{b^2+4a(j-c)}\mp{(b+2a)})ps+(b+2a\mp\sqrt{b^2+4a(j-c)})s^2$

$Z=j(a+b+c)(b+2a\mp\sqrt{b^2+4a(j-c)})p^2+ +2((a+b+c)\sqrt{b^2+4a(j-c)}\mp{j(b+2a)})ps+ (b+2a\mp\sqrt{b^2+4a(j-c)})s^2$

Since these formulas are written in general terms, require a certain specificity calculations.If, after a permutation of the coefficients, no root is not an integer. You need to check whether there is an equivalent quadratic form in which, at least one root of a whole. Is usually sufficient to make the substitution $X\longrightarrow{X+kY}$ or more $Y\longrightarrow{Y+kX}$ In fact, this reduces to determining the existence of solutions in certain Pell's equation. Of course with such an idea can solve more complex equations. If I will not disturb anybody, slowly formula will draw. number $p,s$ integers and set us. I understand that these formulas do not like. And when they draw - or try to ignore or delete.

Formulas but there are no bad or good. They either are or they are not. In equation $aX^2+bY^2+cZ^2=qXY+dXZ+tYZ$

$a,b,c,q,d,t$ integer coefficients which specify the conditions of the problem.

For a more compact notation, we introduce a replacement.

$k=(q+t)^2-4b(a+c-d)$

$j=(d+t)^2-4c(a+b-q)$

$n=t(2a-t-d-q)+(2b-q)(2c-d)$

Then the formula in the general form is:

$X=(2n(2c-d-t)+j(q+t-2b\pm\sqrt{k}))p^2+2((d+t-2c)\sqrt{k}\mp{n})ps++(2b-q-t\pm\sqrt{k})s^2$

$Y=(2n(2c-d-t)+j(2(a+c-d)-q-t\pm\sqrt{k}))p^2+2((d+t-2c)\sqrt{k}\mp{ n })ps++(q+t+2(d-a-c)\pm\sqrt{k})s^2$

$Z=(j(q+t-2b\pm\sqrt{k})-2n(2(a+b-q)-d-t))p^2+2((2(a+b-q)-d-t)\sqrt{k}\mp{n})ps+(2b-q-t\pm\sqrt{k})s^2$

And more.

$X=(2n(q+t-2b)+k(2c-d-t\pm\sqrt{j}))p^2+2((2b-q-t)\sqrt{j}\mp{n})ps++(d+t-2c\pm\sqrt{j})s^2$

$Y=(2n(2(a+c-d)-q-t)+k(2c-d-t\pm\sqrt{j}))p^2++2((q+t+2(d-a-c))\sqrt{j}\mp{n})ps+(d+t-2c\pm\sqrt{j})s^2$

$Z=(2n(q+t-2b)+k(d+t+2(q-a-b)\pm\sqrt{j}))p^2+2((2b-q-t)\sqrt{j}\mp{n})ps++(2(a+b-q)-d-t\pm\sqrt{j})s^2$

$p,s$ are integers and are given us. Since formulas are written in general terms, in the case where neither the root is not an integer, it is necessary to check whether there is such an equivalent quadratic form in which at least one root of a whole. If not, then the solution in integers of the equation have not.


I do not understand! What is the point? Then try to guess the solution to solve the equation on it and build solutions.

Here's an example equation: $X^2+Y^2=5Z^2$

Many difficulties in the calculation. What's the point? When substituting into the formula we get solutions immediately.

$X=4p^2+6ps+s^2$

$Y=-2p^2+2ps+2s^2$

$Z=2p^2+2ps+s^2$

more:

$X=2p^2+14ps+2s^2$

$Y=11p^2+2ps-4s^2$

$Z=5p^2+2ps+2s^2$

more:

$X=-5p^2+10ps+4s^2$

$Y=10p^2+10ps-2s^2$

$Z=5p^2+2ps+2s^2$

more:

$X=10p^2+10ps+2s^2$

$Y=20p^2+10ps+s^2$

$Z=10p^2+6ps+s^2$

When numerical coefficients little else can guess the first solution, but when there are large number guessing does not help. Do not we want, but still have to use the formula. And the formula is easier - we immediately obtain the formula for the solution.