The logic in radical symplification I'm having troubles while studying radicals, namely with converting expressions with the form $$\sqrt{a+b\sqrt{c}}$$ to $$a+b\sqrt{c}$$ and vice versa. When I'm dealing with these kind of problem, I usually add and subtract $\sqrt{c}^2$. In example: $$\sqrt{27+10\sqrt{2}}$$ I factor ${27+10\sqrt{2}} = 27+10\sqrt{2}+\sqrt{2}^2-2=\left(\sqrt{2}^2+5\sqrt{2}\right)+\left(5\sqrt{2}+25\right)$ ... until I get to $\sqrt{\left(\sqrt{2}+5\right)^2}$ and finally $\sqrt{2}+5$. However, either I'm missing something, or this does not always work. For instance, I cannot solve $\sqrt{113+8\sqrt{7}}$ using this technique.I would like to fully comprehend the logic behind these conversions so that I can apply it indiscriminately.  

Do not expect integer solutions for problems like that.
For $$\sqrt{27+10\sqrt{2}}= a+b\sqrt{2}$$
We square both sides to get $$27+10\sqrt{2}=a^2+2b^2 +2ab\sqrt 2$$
Thus we solve a system $$ 2ab=10, a^2+2b^2=27$$ and we are lucky to find $$a=5, b=1$$ 
Therefore  $$\sqrt{27+10\sqrt{2}}= 5+\sqrt{2}$$
On the other hand for $$\sqrt{113+8\sqrt{7}} =a+b\sqrt 7$$
We need to solve $$ ab=4, a^2+7b^2=113 $$
We get $a=1$ and $b=4$ thus $$\sqrt{113+8\sqrt{7}} =1+4\sqrt 7$$
