TITLE: Integer solutions to $\sqrt{a} + \sqrt{b} = \sqrt{c}$
QUESTION [24 upvotes]: An example I can see using basic algebra is $\sqrt{2} + \sqrt{8} = \sqrt{18}$, but is there a general method to find integer solutions to the problem? Another question: say you are given the value of $c$; can you find the values of $a$ and $b$?

REPLY [4 votes]: Let $c=d n^2$ with $n\ge 0$ and with $d \gt 0$ square-free, i.e. $d$ has no repeated prime factors. $d$ is the product of the individual prime factors of $c$ which occur an odd number of times. 
Then $a=d k^2$ and $b=d (n-k)^2$ with $0 \le k \le n$ are the only solutions to $\sqrt a + \sqrt b = \sqrt c$, and there are $n+1$ such pairs. 
This is similar to N.S.'s solution, except for the restriction on $d$. 
$18 = 2^1 \times 3^2$ so $d=2$ and thus $n=3$.  So there are $n+1=4$ solutions to $\sqrt a + \sqrt b = \sqrt{18}$ namely 

$\sqrt{0^2 \times 2} + \sqrt{3^2 \times 2} = \sqrt{3^2 \times 2}$ i.e.$\sqrt{0} + \sqrt{18} = \sqrt{18}$ 
$\sqrt{1^2 \times 2} + \sqrt{2^2 \times 2} = \sqrt{3^2 \times 2}$ i.e.$\sqrt{2} + \sqrt{8} = \sqrt{18}$ 
$\sqrt{2^2 \times 2} + \sqrt{1^2 \times 2} = \sqrt{3^2 \times 2}$ i.e.$\sqrt{8} + \sqrt{2} = \sqrt{18}$ 
$\sqrt{3^2 \times 2} + \sqrt{0^2 \times 2} = \sqrt{3^2 \times 2}$ i.e.$\sqrt{18} + \sqrt{0} = \sqrt{18}$