Is there a function that returns the degree of a polynomial?

In general, if $f(x)$ is a polynomial of degree $n$, then $$\lim_{x\to\infty} \frac{\log(|f(x)|)}{\log(x)} = n$$

This works because, for large values of $x$, we would have $|f(x)| \approx |a_n| x^n$, where $a_n$ is the leading coefficient, and therefore $\log(|f(x)|) \approx \log(|a_n|) + n\log(x)$. Divide this by $\log(x)$, and we get $\frac{\log(|f(x)|)}{\log(x)} \approx \frac{\log(|a_n|)}{\log(x)} + n$. In the limit as $x \to \infty$, the first term goes to $0$.

Moreover, even if $f(x)$ is not a polynomial, but (say for example) something like $f(x) = x^{1/2} - 3x^{1/3}$, this method works, in that it returns the largest non-negative exponent among the terms; in this case, we get $1/2$.


According to the GeoGebra wiki, the function you're looking for is Degree[<Polynomial]. If you have a polynomial in several variables, you can also use Degree[<Polynomial>,<Variable>] to get the degree of the polynomial in the specified variable.