Pre-Solve Roots of Polynomial with Varying Constant Term?

28 Views Asked by At

I am writing an algorithm that will need to find the first positive real root of a given polynomial, over and over again, where the only thing that changes in each iteration is the constant term. I need this algorithm to be as efficient as possible and want to avoid redundant computation in each iteration. Is there some calculation or manipulation that can be done before the constant term is known in order to reduce the calculation after it's known?

Specifically, given that we want the first positive real root (if it exists) of the following,

$a_n x^n + a_{n-1}x^{n-1} + \ldots + a_0 = 0$,

where $a_k \in \mathbb{Z} \space \forall \space k$, and $a_0$ is not yet known, what can be done now in order to minimize computation after $a_0$ becomes known? I am asking in the mathematical sense, but if it helps, I will be implementing this in C++.