Can $\frac{1}{2a}\left(-b+\sqrt{b^2-4ac}\right)$ be rational if $a=3n_1$, $b=-3n_1^2$, $c=n_1^3-n_2^3$, for positive rational $n_i$ with $n_1
Let $n_{1}$ and $n_{2}$ be positive rational numbers such that $n_{1}<n_{2}$. Let $a=3n_{1}$, $b=-3n_{1}^2$, $c=n_{1}^3-n_{2}^3$.
Can $$\frac{-b+\sqrt{b^2-4ac}}{2a}$$ be a rational number?
In my problem, see Parcly Taxel answer, I want $h_{w_1},h_{w_2}$ and $h$ all to be positive rational numbers with $(h_{w_1}<h_{w_2})$. Is that possible?
 A: EDIT: This post has missed one important factor that $n_1 < n_2$, what means that this post does not answer the question.
I assume your talking about quadratic equations and the quadratic formula. Then you have the input $3n_1x^2 - 3n_1x + n_1^3 - n_2^3 = 0$, then the quadratic formula $\frac{-b + \sqrt{b^2 -4ac}}{2a}$. If we insert all the values, we get the following term:
$$\frac{3n_1 + \sqrt{9n_1^2 -4(3n_1)(n_1^3 - n_2^3)}}{6n_1} \in \mathbb{N}$$
$$n_1 \ne 0$$
Since the question only asks "Can it be rational?", we just need to find a pair that makes the equation rational: Since $n_1$ is rational, we can ignore everything outside of the root, giving us:
$$\sqrt{9n_1^2 -4(3n_1)(n_1^3 - n_2^3)} \in \mathbb{N}$$
$$n_1 \ne 0$$
Reform the equation
$$\sqrt{9n_1^2 -4(3n_1)(n_1^3 - n_2^3)} = \sqrt{9n_1^2 - 12n_1^4 + 12n_1n_2^3}$$
Now the goal is to show that $\sqrt{9n_1^2 - 12n_1^4 + 12n_1n_2^3}$ is a rational number, which reformed gives $\sqrt3\sqrt{3n_1^2 - 4n_1^4 + 4n_1n_2^3}$. This means that the right root must be of the form $3 \cdot x^2$, so the output makes sense.
A: We look at a more general case where we only require $a,b,c$ and $(-b+\sqrt{b^2-4ac})/(2a)$ to be rational.
A necessary condition is
$$y^2 = b^2-4ac = 3n_1(4n_2^3-n_1^3)$$
for some rational $y$. Since we cannot have $n_1=0$ due to the denominator of $2a$, we may assume that $n_1\neq 0$.  
Multiplying by $144/n_1^4$ and setting $n_2 = \dfrac{n_1X}{12},y=\dfrac{n_1^2Y}{12}$, we get an Elliptic Curve $E$ over the rationals
$$
E: Y^2=X^3-432
$$
This tells us that every rational solution $(a,b,c,y)$ to our original equation must map to some rational point $(X,Y)$ on $E$. Hence we can start from $E$ and work backwards.  
Now the critical part is this Elliptic Curve $E$ is well-known to only have the solutions $(X,Y) = (12,\pm 36)$ over the rationals. One reference from here.
This means that the only possible solutions of $(a,b,c,y)$ must satisfy
$$
\begin{align*}
(12,\pm 36) &= (X,Y) = \left(\frac{12n_2}{n_1}, \frac{12y}{n_1^2}\right)\\
(1,\pm 3) &= \left(\frac{n_2}{n_1},\frac{y}{n_1^2}\right)
\end{align*}
$$
This shows that we must have $n_2/n_1=1$.  
Now going back to the original question, since we require $n_1<n_2$ this is impossible.
