# Find the solutions of equations of the form $ax^2+by^2 = z^2$ in $\mathbb{Q}_p$

How can I find the non-trivial solutions $$(x, y, z)$$ (if there are any) of the equation

$$95 x^2 + 111 y^2 = z^2$$ in $$\mathbb{Q}_p$$ ?

Is there any method I can use ?

• math.stackexchange.com/questions/1513733/… Oct 30, 2018 at 4:27
• "You might want to use properties of the Hilbert symbol, maybe there is an explicit formula in your lecture notes", Samuele Oct 30, 2018 at 11:09
• Also this wikipedia article en.wikipedia.org/wiki/Hilbert_symbol might help. Oct 30, 2018 at 11:12
• @eduard Thanks. I´ve found it in my lecture notes ;). Oct 30, 2018 at 18:01

Since your base field is $$\mathbf Q_p$$, a complete answer is naturally given by the Hilbert symbols. But let us follow a general approach, valid above any field $$K$$ of characteristic $$\neq 2$$, first concerning the existence of a solution, second the determination of all the solutions:

1) The quadratic equation $$z^2 -by^2 - az^2=0$$ admits a non zero solution iff $$b$$ is a norm in $$K(\sqrt a)/K$$, iff $$a$$ is a norm in $$K(\sqrt b)/K$$ (easy to check, this purely algebraic). In the case $$K=\mathbf Q_p$$, this existence criterion can be conveniently expressed in terms of the Hilbert symbol $$(a,b)_p$$, for the definition and first properties of which I refer to ***. The normic criterion above is equivalent to $$(a,b)_p=1$$. One must distinguish two cases : (i) If $$p$$ is odd, write $$a=a'p^\alpha$$ and $$b=b'p^\beta$$, then $$(a,b)_p=(-1)^{\frac {p-1}2\alpha \beta}(\frac {b'}p)^\alpha (\frac {a'}p)^\beta$$, where $$(\frac {.}p)$$is the classical Legendre symbol. (ii) As usual, the case $$p=2$$ requires special calculations : if $$u$$ is a unit of $$\mathbf Q_2$$, let $$\omega(u)$$ be the class mod $$2$$ of $$\frac {u^2-1}8$$, $$\epsilon (u)$$ be the class mod $$2$$ of $$\frac {u-1}2$$; then $$(2,u)_2=(-1)^{\omega(u)}$$ if $$u$$ is a unit, and $$(u,v)_2=(-1)^{\omega(u)\epsilon (u)}$$ if $$u,v$$ are units. This covers all the possible cases.

2) Once the existence criterion is met, the determination of all the solutions is purely algebraic. Start from a particular solution $$z_0=u_0+v_0\sqrt a$$ s.t. $$u_0 , v_0 \in K$$ and $$N(z_0)=b$$. All the solutions $$z=u+v\sqrt a$$ s.t. $$N(z)=b$$ are determined by $$N(z^{-1}z_0)=1$$. But the quadratic extension $$K(\sqrt a)/K$$ has cyclic Galois group, and in this situation, all the elements of norm $$1$$ are given by Hilbert's thm. 90 : $$N(w)=1$$ iff $$w$$ is the quotient of two conjugates, i.e. $$w = \frac {r-s\sqrt a}{r+s\sqrt a}=\frac{r^2+as^2}{r^2-as^2} - \frac {2rs}{r^2-as^2}\sqrt a$$. By identification, one gets the explicit expression of all the solutions $$z$$, but I'm too lazy to write them down.

• I made a bad manipulation, and posted 2 successive (almost identical) answers. I would like to delete the first one. How do I process ? Oct 30, 2018 at 17:26
• It doesn't matter if you have posted your answer 2-times, because this is really a great and very interesting answer. I admire your competence. Thank you very much ! Oct 31, 2018 at 8:45

Since your base field is $$\mathbf Q_p$$, a complete answer is naturally given by the Hilbert symbols, as pointed out by @eduard. But let us follow a general approach, valid above any field $$K$$ of characteristic $$\neq 2$$, first concerning the existence of a solution, second the determination of all the solutions:

1) The quadratic equation $$z^2 -by^2 - az^2=0$$ admits a non zero solution iff $$b$$ is a norm in $$K(\sqrt a)/K$$, iff $$a$$ is a norm in $$K(\sqrt b)/K$$ (easy to check, this purely algebraic). In the case $$K=\mathbf Q_p$$, this existence criterion can be conveniently expressed in terms of the Hilbert symbol $$(a,b)_p$$, for the definition and first properties of which I refer to https://math.stackexchange.com/a/2973449/300700. The normic criterion above is equivalent to $$(a,b)_p=1$$. One must distinguish two cases : (i) If $$p$$ is odd, write $$a=a'p^\alpha$$ and $$b=b'p^\beta$$, then $$(a,b)_p=(-1)^{\frac {p-1}2\alpha \beta}(\frac {b'}p)^\alpha (\frac {a'}p)^\beta$$, where $$(\frac {.}p)$$is the classical Legendre symbol. (ii) As usual, the case $$p=2$$ requires special calculations : if $$u$$ is a unit of $$\mathbf Q_2$$, let $$\omega(u)$$ be the class mod $$2$$ of $$\frac {u^2-1}8$$, $$\epsilon (u)$$ be the class mod $$2$$ of $$\frac {u-1}2$$; then $$(2,u)_2=(-1)^{\omega(u)}$$ if $$u$$ is a unit, and $$(u,v)_2=(-1)^{\omega(u)\epsilon (u)}$$ if $$u,v$$ are units. This covers all the possible cases.

2) Once the existence criterion is met, the determination of all the solutions is purely algebraic. Start from a particular solution $$z_0=u_0+v_0\sqrt a$$ s.t. $$u_0 , v_0 \in K$$ and $$N(z_0)=b$$. All the solutions $$z=u+v\sqrt a$$ s.t. $$N(z)=b$$ are determined by $$N(z^{-1}z_0)=1$$. But the quadratic extension $$K(\sqrt a)/K$$ has cyclic Galois group, and in this situation, all the elements of norm $$1$$ are given by Hilbert's thm. 90 : $$N(w)=1$$ iff $$w$$ is the quotient of two conjugates, i.e. $$w = \frac {r-s\sqrt a}{r+s\sqrt a}=\frac{r^2+as^2}{r^2-as^2} - \frac {2rs}{r^2-as^2}\sqrt a$$. By identification, one gets the explicit expression of all the solutions $$z$$, but I'm too lazy to write them down.