TITLE: Roots of polynomial and unit circle
QUESTION [6 upvotes]: Let $$p(k)=a_0+a_1x+a_2x^2+a_3x ^3+\dots+a_kx^k$$
Is possible known just looking at the coefficients $a_0,a_1,\dots,a_k$ $(a_k\in\mathbb{R})$ if the polynomial $p(k)$ will have roots out of the unit circle for values of $k=2,3,4$? 
EDIT: I'm asking about both complex and real roots and I want to know if there is a way to check if all the roots will be outside of the unit circle or in somehow verify that at least one of the roots will be inside the unit circle.

REPLY [3 votes]: Yes, this is known as the Jury Test. It has time complexity $O(n^2)$. It is documented at many places: Tests for Stability, Jury stability criterion, and A new proof of the Jury test.
Let $p(x)$ be a polynomial of degree $n>0$ defined as:
$$
p(x) = a_{0,0}x^n+a_{0,1}x^{n-1}+\ldots+a_{0,n-1}x+a_{0,n}
$$
where the coefficient $a_{0,i}$ is real, and $a_{0,0}>0$. (If $a_{0,0}$ is negative, all the coefficients of $p(x)$ can be multiplied by $-1$ to make $a_{0,0}$ positive.) All the roots (imaginary and real) of $p(x)$ lie inside the unit circle if and only if for $0<r\leq n$ and $0\leq c\leq n-r$ with:
$$
a_{r,c}=a_{r-1,c}-d_{r-1}a_{r-1,n-r-c+1}
$$
$$
d_r=\frac{a_{r,n-r}}{a_{r,0}}
$$
the smallest of all $a_{r,0}$'s is strictly greater than $0$.
The following table shows the equations of the Jury Test for polynomials of degree $n=4$.
$$
\begin{array}{|c|c|c|c|c|c|c|}
\hline
\text{$r$} & \text{$d_r$} & \text{$a_{r,0}$} & \text{$a_{r,1}$} & \text{$a_{r,2}$} & \text{$a_{r,3}$} & \text{$a_{r,4}$}  \\ \hline
\text{$0$} & \text{$a_{0,4}/a_{0,0}$} & \text{$a_{0,0}$} & \text{$a_{0,1}$} & \text{$a_{0,2}$} & \text{$a_{0,3}$} & \text{$a_{0,4}$} \\ \hline
\text{$1$} & \text{$a_{1,3}/a_{1,0}$} & \text{$a_{0,0}-d_0a_{0,4}$} & \text{$a_{0,1}-d_0a_{0,3}$} & \text{$a_{0,2}-d_0a_{0,2}$} & \text{$a_{0,3}-d_0a_{0,1}$}  \\ \hline
\text{$2$} & \text{$a_{2,2}/a_{2,0}$} & \text{$a_{1,0}-d_1a_{1,3}$} & \text{$a_{1,1}-d_1a_{1,2}$} & \text{$a_{1,2}-d_1a_{1,1}$}  \\ \hline
\text{$3$} & \text{$a_{3,1}/a_{3,0}$} & \text{$a_{2,0}-d_2a_{2,2}$} & \text{$a_{2,1}-d_2a_{2,1}$} \\ \hline
\text{$4$} & \text{} & \text{$a_{3,0}-d_3a_{3,1}$} \\ \hline
\end{array}
$$
Consider the following degree-$4$ polynomial whose roots are all inside the unit circle.
$$
p(x)=\left (x-\frac{1}{2}(1+i)\right )\left (x-\frac{1}{2}(1-i)\right )\left (x+\frac{1}{2}\right )\left (x-\frac{1}{2}\right )
$$
$$
p(x)=x^4-x^3+\frac{1}{4}x^2+\frac{1}{4}x-\frac{1}{8}
$$
Applying the Jury Test to its coefficents yields:
$$
\begin{array}{|c|c|c|c|c|c|c|}
\hline
\text{$r$} & \text{$d_r$} & \text{$a_{r,0}$} & \text{$a_{r,1}$} & \text{$a_{r,2}$} & \text{$a_{r,3}$} & \text{$a_{r,4}$}  \\ \hline
\text{$0$} & \text{$-1/8$} & \text{$1$} & \text{$-1$} & \text{$1/4$} & \text{$1/4$} & \text{$-1/8$} \\ \hline
\text{$1$} & \text{$8/63$} & \text{$63/64$} & \text{$-31/32$} & \text{$9/32$} & \text{$1/8$}  \\ \hline
\text{$2$} & \text{$326/781$} & \text{$3905/4032$} & \text{$-225/224$} & \text{$815/2016$}  \\ \hline
\text{$3$} & \text{$-30/41$} & \text{$39975/49984$} & \text{$-14625/24992$} \\ \hline
\text{$4$} & \text{} & \text{$975/2624$} \\ \hline
\end{array}
$$
Since the smallest $a_{r,0}$ is strictly greater than $0$, we conclude that all roots are inside the unit circle.
As another example, consider a polynomial that has two roots on the unit circle, one root inside the unit circle, and one root outside of the unit circle.
$$
p(x)=(x-i)(x+i)(x+1/2)(x-2)
$$
$$
p(x)=x^4-x^3-\frac{3}{2}x^3+\frac{3}{2}x^2-1
$$
Applying the Jury Test to its coefficents yields:
$$
\begin{array}{|c|c|c|c|c|c|c|}
\hline
\text{$r$} & \text{$d_r$} & \text{$a_{r,0}$} & \text{$a_{r,1}$} & \text{$a_{r,2}$} & \text{$a_{r,3}$} & \text{$a_{r,4}$}  \\ \hline
\text{$0$} & \text{$-1$} & \text{$1$} & \text{$-3/2$} & \text{$0$} & \text{$-3/2$} & \text{$-1$} \\ \hline
\text{$1$} & \text{} & \text{$0$} & \text{$-3$} & \text{$0$} & \text{$-3$}  \\ \hline
\text{$2$} & \text{} & \text{} & \text{} & \text{}  \\ \hline
\text{$3$} & \text{} & \text{} & \text{} \\ \hline
\text{$4$} & \text{} & \text{} \\ \hline
\end{array}
$$
Since $a_{1,0}$ is not strictly greater than $0$, we conclude that the polynomial has roots that are not inside the unit circle. The test stops at $r=1$.