$\begingroup$

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

e 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

e 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.