Question: I'm not very experienced at math, though I find it very interesting most of the time. I am writing a program where I need to find $n$ in $x = \sqrt[n]{y}$, given $x$ and $y$. I have implemented it using a loop, with a 'guess and check' type of method. I keep feeling, however, like there is already some simpler way to do this. What am I looking for here?

Answer: 
Assuming that $x,y >0$ you can just take logarithms
$$
x = \sqrt[n]{y}\Leftrightarrow \log x = \frac 1n \log y \Leftrightarrow n = \frac{\log y}{\log x}.
$$
If $n$ is even then we have that $y>0$ and $x>0$ and

$$x=y^{1/n}\to \log x=\frac1n \log y \to n=\frac{\log y}{\log x}$$

If $n$ is odd then we can have $y<0$ and then $x<0$. On that case we can multuply both sides by $-1$ and then

$$-x=(-y)^{1/n}\to |x|=|y|^{1/n}\to n=\frac{\log |y|}{\log |x|}$$

So, the general solution is

$$n=\frac{\log |y|}{\log |x|}$$