I am trying to figure out integer solutions to the following equation
$$\sqrt{x_1}+\sqrt{x_2}+\cdots+\sqrt{x_k}=\sqrt{y},$$
where $x_1,...,x_k,y$ are variables and $k$ is a positive integer $\geq2$.
It is easy to see that if $a_1+a_2+\cdots+a_k=b$, then $(x_1,x_2,...,x_k,y)=(a_1^2,a_2^2,...,a_k^2,b^2)$ is a solution.
It is also easy to see that for all $a\in\mathbb{N}$, $(x_1,x_2,...,x_k,y)=(a,a,...,a,k^2a)$ is a solution.
Are these all the solutions we have?
As pointed out by @dxiv, the set $\{\sqrt{n}:n\text{ is squarefree}\}$ is $\mathbb{Q}$-linearly independent. This means that $\forall \lambda_1,...,\lambda_k\in\mathbb{Q},n_1,...,n_k\geq1$ squarefree $\lambda_1\sqrt{n_1}+...+\lambda_k\sqrt{n_k}=0$ necessarily implies that $\lambda_1=...=\lambda_k=0$. Let's now prove that the set of solutions of the diophantine equation $$\sqrt{x_1}+...+\sqrt{x_k}=\sqrt{y}$$ is $S=\{(ab_1^2,...,ab_k^2,a(b_1+...+b_k)^2)\in\mathbb{N}^{k+1}:a,b_1,...,b_k\in\mathbb{N}\}$ where I consider $0\in\mathbb{N}$. Note that, given a positive integer $x$ with prime decomposition $x=\prod_j p_j^{\nu_j}$, we can decompose it as $$x=s^2t\ \text{ with }\ s=\prod_{j}p_j^{\left\lfloor{\frac{\nu_j}{2}}\right\rfloor}\ \text{ and }\ t = \prod_{j}p_j^{\nu_j(\text{mod }2)}$$ where, clearly, $s^2$ is the greatest square divisor of $x$, e.g. $24 = 2^2\cdot 6$. This decomposition is unique. With this in mind, write $\forall1\leq j\leq k:x_j=s_j^2t_j$ with $t_j$ squarefree and $y=s^2t$ with $t$ squarefree as well. Then, the equation becomes $$s_1\sqrt{t_1}+...+s_k\sqrt{t_k}-s\sqrt{t}=0$$ So, since squarefree numbers are $\mathbb{Q}$-linearly independent, and $s$ and the $s_i$ are all positive, there are only two possibilities: