# Methods to solve this equation on finite fields?

Is there any analytical (exact, closed-form solution) or numerical method to solve an equation such as

$p(x) = r^x$

where $p(x)$ is a polynomial whose coefficients are drawn from a finite field, and $r$ is a primitive root of the field modulus ?

Or, is this problem known to be equivalent to solving the discrete logarithm problem ? Thank you in advance.

If the finite field $\mathbb{F}$ has a number of elements that is small enough, you can obtain the Lagrange interpolation polynomial $f \in \mathbb{F}[x]$ such that $f(x_i) = r^{x_i}$ for all elements $x_i \in \mathbb{F}$. This polynomial is identical to $r^{x}$ precisely because we are working on a finite field. Then, the problem is reduced to finding the roots of the polynomial $g = p - f \in \mathbb{F}[x]$. A brute-force approach consisting of trying every possible element in the field would work. Another possibility would be to factor $g$ using Berlekamp's algorithm and read the roots off the factors.