# Help solving the quadratic equation $ax^2-4bx+4bc-\frac{d^2}{a}=0$

I have been struggling to solve this quadratic equation in the variable $x$ with integral coefficients: $$ax^2-4bx+4bc-\frac{d^2}{a}=0$$ $a\neq 0$ of course.How do I ensure that $x$ is an integer?

What I have done:

$$\Delta^2=(-4b)^2-4a(4bc-\frac{d^2}{a})$$

$$\Delta^2=16b^2-16abc+4d^2$$

I know that $d^2\equiv 0\pmod a$. So there exists a non-zero $k$ such that $d^2=ak$

$$\Delta^2=16b^2-16abc+4(ak)^2$$

$$(\dfrac{\Delta}{2})^2=(2b)^2-2(2b)ac+(ak)^2$$ Can I conclude that $c=\pm k$? How do I proceed from here?

• To clarify, you want a condition that ensures $x$ is an integer? – Aneesh Dec 6 '15 at 9:44
• that is correct. – user97615 Dec 6 '15 at 9:46
• I know this condition works, $b \equiv 0\pmod a$ , $d \equiv 0\pmod a$, $b=ac$. – Aneesh Dec 6 '15 at 9:54
• it's easy to find a condition that works. I need to find all of them. – user97615 Dec 6 '15 at 10:33
• Oh ok, you want an if and only if condition, or just all possible conditions – Aneesh Dec 6 '15 at 11:17