Integer Solutions to $\sqrt{1+2cx_1}+\sqrt{1+2cx_2}=c$ where $c$ is constant integer

linear algebranumber theory

The following equation has infinite number of solutions in real numbers and information is not enough to solve for $x_1$ and $x_2$.

$$\begin{align*}
\sqrt{1+2cx_1}+\sqrt{1+2cx_2}=c\quad(1)\end{align*}$$

I am wondering that if we assume all variables can only take integer values that is $x_1,x_2,c\in\mathbb{N}$ will there be a way to first check if there is a solution and if yes how to find $x_1$ and $x_2$.

As an example I have taken the case where $c=42$:
$$\begin{align*}
\sqrt{1+84x_1}+\sqrt{1+84x_2}=42\quad(2)\end{align*}$$

Checking all possible integer values I could find that $x_1=2, x_2=10$ is a solution.

So far as a clue I think I need to use the sequence of perfect square numbers but I don't know how. Please guide me if you know the solution or a way that might result in the solution. Algorithmic methods are just fine as well.

Best Answer

\begin{align*} \sqrt{1+2cx_1} + \sqrt{1+2cx_2} &= c \\ (\sqrt{1+2cx_1} - \sqrt{1+2cx_2})(\sqrt{1+2cx_1} + \sqrt{1+2cx_2}) &= (\sqrt{1+2cx_1} - \sqrt{1+2cx_2})c \\ (1+2cx_1) - (1+2cx_2) &= (\sqrt{1+2cx_1} - \sqrt{1+2cx_2})c \\ (\sqrt{1+2cx_1} - \sqrt{1+2cx_2})c &= 2c(x_1 - x_2) \\ \sqrt{1+2cx_1} - \sqrt{1+2cx_2} &= 2(x_1 - x_2) \\ \end{align*}

\begin{align*} \sqrt{1+2cx_1} + \sqrt{1+2cx_2} &= c \\ \sqrt{1+2cx_1} - \sqrt{1+2cx_2} &= 2(x_1 - x_2) \\ \hline 2\sqrt{1+2cx_1} &= 2(x_1-x_2)+c \\ \sqrt{1+2cx_1} &= (x_1-x_2)+ \dfrac c2 \\ 1+2cx_1 &= (x_1-x_2)^2 + (x_1-x_2)c + \dfrac{c^2}{4} \\ \hline 2\sqrt{1+2cx_2} &= c - 2(x_1-x_2) \\ \sqrt{1+2cx_2} &= \dfrac c2 - (x_1-x_2) \\ 1+2cx_2 &= (x_1-x_2)^2 - (x_1-x_2)c + \dfrac{c^2}{4} \\ \hline 2c(x_1 + x_2) + 2 &= 2(x_1-x_2)^2 + \dfrac{c^2}{2} \\ 4c(x_1 + x_2) + 4 &= 4(x_1-x_2)^2 + c^2 \\ c^2 - 4(x_1 + x_2)c + (4(x_1-x_2)^2 - 4) &= 0 \\ \end{align*}

\begin{align*} c &= \dfrac{4(x_1+x_2) \pm \sqrt{16(x_1+x_2)^2-16(x_1-x_2)^2 + 16}}{2} \\ c &= \dfrac{4(x_1+x_2) \pm \sqrt{64x_1x_2+16}}{2} \\ c &= 2(x_1+x_2) \pm 2\sqrt{4x_1x_2+1} \\ \end{align*}

INTEGER SOLUTIONS?

Lets suppose that $4x_1 x_2 + 1$ is a perfect square. Say, for some integer $N$, \begin{align} 4x_1 x_2 + 1 &= (2N+1)^2 \\ x_1 x_2 &= N(N+1) \end{align}

Then $c = 2(x_1+x_2) \pm 2\sqrt{4x_1x_2+1} = 2(x_1+x_2) \pm(4N + 2)$.

Assuming $c = 2(x_1+x_2) + 2\sqrt{4x_1x_2+1} = 2(x_1+x_2) + (4N + 2)$, we find

\begin{align} \sqrt{1+2cx_1} &= \sqrt{1+2[2(x_1+x_2) + (4N + 2)]x_1} \\ &= \sqrt{4 x_1^2 + 4 x_1 x_2 + 8 x_1 N + 4 x_1 + 1} \\ &= \sqrt{4 x_1^2 + 4N(N+1) + 8 x_1 N + 4 x_1 + 1} \\ &= \sqrt{4 x_1^2 + 4 x_1(2N +1) + (2N+1)^2} \\ &= 2x_1 + (2N+1) \end{align}

So we must also have $\sqrt{1+2cx_2} = 2x_2 + (2N+1)$ and we see that

$$\sqrt{1+2cx_1} + \sqrt{1+2cx_2} = c$$