# solution of the equation $a^2+pb^2-2c^2-2kcd+(p+k^2)d^2=0$

i am wondering if there is a complete solution for the equation $a^2+pb^2-2c^2-2kcd+(p+k^2)d^2=0$ in which $a,b,c,d,k$ are integer(not all zero) and $p$ is odd prime.

-
Evidently, there are solutions when $p=3$. wolframalpha.com/input/?i=diophantine+a^2%2B3*b^2%E2%88%922*c^2%E2%88‌​%922*kcd%2B%283%2Bk^2%29*d^2%3D0 –  Charles Siegel Sep 10 '10 at 21:20
Extremely unlikely that there is a parametrization of all solutions. What is your background in integral quadratic forms, and, as usual, why do you want to know this? –  Will Jagy Sep 10 '10 at 21:41

I'm not getting much 2-adic information for this one, but it should be easy enough to check all solutions mod 8 and mod 16 and see what happens.

To restrict anything, one property requires $p \equiv \pm 3 \pmod 8$ and the other requires $p \equiv 3 \pmod 4.$ Put them together, when $$p \equiv 3 \pmod 8$$ and $$p | k,$$ then all four of your letters $$a,b,c,d = 0.$$ The proof uses two flavors of anisotropy for binaries. The assumption is that at least one of $a,b,c,d$ is nonzero and $\gcd(a,b,c,d) = 1.$ First we have forced $a^2 - 2 c^2 \equiv 0 \pmod p,$ so $a,c \equiv 0 \pmod p$ as $(2 | p) = -1.$ But then $p b^2 + p d^2 \equiv 0 \pmod {p^2},$ or $b^2 + d^2 \equiv 0 \pmod p,$ so $b,d \equiv 0 \pmod p$ as $(-1 | p) = -1.$ So $p | \gcd(a,b,c,d)$ contrary to assumption.

Otherwise, given a fixed $(p,k)$ once you have a nontrivial solution you get infinitely many using automorphs of the indefinite part in variables $(c,d).$ That is, there may be many parametrized families of solutions of one type or another. But you can figure some of those out with a computer algebra system more easily than I can by hand.

The next interesting case is when $12 k^2 + 8p$ is a square, which means that the binary form $T(c,d)=2c^2+2kcd-(p+k^2)d^2$ factors. So $3 k^2 + 2p$ is a square, which is not possible for even $k,$ so $k$ is odd and $2p \equiv 6 \pmod 8,$ or $p \equiv -1 \pmod 4.$ Unless $p=3$ we also need $p \equiv -1 \pmod 3,$ or $p \equiv -1 \equiv 11 \pmod {12}.$

For example, with $p=11, k=1,3 k^2 + 2p = 25, p + k^2 = 12,$ we have $$a^2+11b^2-2c^2-2cd+12d^2 = a^2+11b^2-2(c-2d)(c+3d).$$ The value of the factorization is that we can take, for instance, $c = 2 d + 1, c + 3 d = 5 d + 1,$ and $$a^2+11b^2-2(5d+1) = 0.$$ Now $a^2 + 11 b^2$ is not even unless it is also divisible by $4.$ We also need $a^2 \equiv b^2 \equiv 1 \pmod 5.$ Put them together, we have a parametrized solution of sorts, with $$a \equiv 1,4 \pmod 5, \; \; b \equiv 1,4 \pmod 5, \; \; a \equiv b \pmod 2$$ take $c = 2 d + 1$ and $$d = \frac{ a^2+11b^2-2}{10}.$$

-

Perhaps it would help if we knew where the question is coming from.

For what it's worth, you can write the equation in the form $$a^2 + (c-kd)^2 + pb^2 + pd^2 = 3c^2,$$ so you are looking at a parametrized subset of the equation $$A^2 + B^2 + pC^2 + pD^2 = 3c^2.$$ If $p \equiv 1 \bmod 4$, then $p(B^2+D^2) = R^2 + S^2$ is a sum of two squares, and your solutions must occur among those of $$R^2 + S^2 + T^2 + U^2 = 3c^2.$$ Both quadrics can be parametrized by the standard method of sweeping lines if you know one solution. For arbitrary primes $p$ such a solution seems to be difficult to find. And even armed with such a parametrization you then would have to figure out which of them satisfy the additional conditions coming from the original equation.

-

There are lots! Here is a selection:

$(a,b,c,d,k,p)=(3,3,4,1,1,3)$

$(a,b,c,d,k,p)=(3,3,4,1,7,3)$

$(a,b,c,d,k,p)=(3,3,4,2,2,3)$

-
thank you but i need complete solution –  M.S Sep 10 '10 at 21:25
If $k=0$ and $p \equiv 3 \pmod 8$ then all the other variables are $0$ also. –  Will Jagy Sep 10 '10 at 21:32