| > | 
|
| > | 
|
I was recently surprised thatisolve cannot solve the following simple Diophantine equation | > | 
|
which has the obvious (to a human) solution . This led me to think about the case of conic sections, which have the following general equation (= 0 implied), where I assume are integers. | > | 
|

The above equation has discriminant positive, indicating that is is a hyperbola. | > | 
|





Here's a parabola case (discriminant = 0) thatisolve also has trouble with | > | 
|





But this has at least one solution | > | 
|

Maple seems to do better in the elliptic case (discriminant negative) and finds two solutions. Examination of the plot suggests there are no other solutions. | > | 
|





I show that transformation of the general equation to the form , where D is the discriminant, allows Maple to solve the hyperbolic case, as well as the elliptic case it already knows how to solve; another transformation works for the parabolic case. Maple appears to be able to solve all (solvable) cases of the transformed equations, though this is not clear from the help page. The transformation is discussed in Bogdan Grechuk, Polynomial Diophantine Equations: A Systematic Approach, Springer, 2024, Sec. 3.1.7.doi: 10.1007/978-3-031-62949-5 A complete classification of the conics, including degenerate cases, is given inhttps://en.wikipedia.org/wiki/Matrix_representation_of_conic_sections. If the determinant, , of the following matrix is zero, we have a degenerate case. | > | ![A__Q := Matrix(3, 3, [a, (1/2)*b, (1/2)*d, (1/2)*b, c, (1/2)*e, (1/2)*d, (1/2)*e, f]); delta := LinearAlgebra:-Determinant(A__Q)](/image.pl?url=https%3a%2f%2fwww.mapleprimes.com%2fview.aspx%3fsf%3d233513_post%2f31d652a4c7d08fef03640cd0b901ebbb.gif&f=jpg&w=240)
|


The case of is just the linear case, which Maple can solve, and is one case where . Other degenerate parabola cases are two coincident lines or two parallel lines. Degenerate hyperbolas are two intersecting lines, and degenerate ellipses are a single point. Maple can solve all these cases, e.g., | > | 
|








(The intersecting lines case above only finds one of the lines.) The transformation will consider only the case where at least one of or is non-zero. This misses hyperbolas with ; Maple seems to handle these bilinear equations, e.g., | > | 
|



Transformation for non-zero discriminant At least one of or must be non-zero; if necessary exchange and to ensure is non-zero. We multiply by and change to new variables and . | > | 
|


The transformed equation has the form or , where D is the discriminant. | > | 
|


For positive discriminant D, this is a generalPell's equation, , which Maple knows how to solve. (The definition of Pell's equation requires that D is not a square, but Maple can also solve the simpler case where D is a square.) For the hyperbola above, we have an infinite number of solutions, parameterized by an arbitrary integer _Z1. | > | 
|


Transforming back to the original coordinates | > | 
|

Evaluate for some _Z1 values, say _Z1=0 and _Z1=5. It is evident from above that integer solutions in may transform to non-integer solutions in but that doesn't occur for these two cases | > | 
|


Check they are solutions to | > | 
|

For negative discriminant and negative , the equation has no solutions. In theclassification scheme for the conics, the "imaginary ellipse" case (no real solutions) occurs when . For negative discriminant, we must have and the same sign, and this is the case of negative . | > | 
|


.In this case Maple returns NULL for both the untransformed and transformed case, which can mean no solutions or just thatisolve couldn't find any. | > | 
|





For negative discriminant and positive or , the ellipse is real, and there are a finite number of solutions. Maple solves the untransformed and transformed equations. Here we need to filter out non-integer solutions | > | 
|






Transformation for zero discriminant For the case of zero discriminant (parabola), we need a different transformation. | > | 
|


The transformed equation is of the form | > | 
|

We consider the parabolic example above, for which Maple finds no solutions without transformation. | > | 
|


For the transformed problem, Maple finds an infinite number of solutions | > | 
|



Two of the general solutions will not give integer solutions, so could be filtered out, but it is easier to filter after choosing some specific _Z1 values. | > | 
|




Check they are solutions to | > | 
|

| > | 
|
|