Find all the integer solutions of $x^2-y^2=a^2+mb^2$

156 Views Asked by At

Let $x,y,a,b,m$ be non-zero integers where $m$ is square free. I am trying to find all the integer solutions of $$x^2-y^2=a^2+mb^2$$ I tried to factorize both sides but the righthand side equation is not too friendly. Any hints?

1

There are 1 best solutions below

1
On BEST ANSWER

$$a^2+mb^2=(zc+mvq)^2+m(zq-vc)^2=(z^2+mv^2)(c^2+mq^2)=(x-y)(x+y)$$

$$x=\frac{1}{2}(c^2+z^2+m(q^2+v^2))$$

$$y=\frac{1}{2}(c^2-z^2+m(q^2-v^2))$$