Roots of composite polynomial function For a polynomial function a(x), is there a generalized solution for the roots of:
$$a(a_2(a_3(...(a_m(x))...)))$$
As an example, if:
$$a(x)=x^2-5x+2, m=2$$
How would I find the roots of
$$a(a(x))=(x^2-5x+2)^2-5(x^2-5x+2)+2$$

Expand the polynomial and solve it the usual way..
In this case,
\begin{align}
   (x^2 - 5x + 2)^2 - 5(x^2 - 5x + 2) + 2 &= x^4 - 10 x^3 + 24 x^2 + 5 x - 4
\end{align}
(by Wolfram Alpha)
Then carry out the usual root-finding methods for non-linear equations. For example, using Newton's method,
\begin{align}
  f(x) &=  x^4 - 10 x^3 + 24 x^2 + 5 x - 4\\
  f'(x) &= 4x^3 - 30x^2 + 48x + 5\\
  x_{i + 1} &= x_i - \frac{f(x_i)}{f'(x_i)}
\end{align}
With $x_0 = 4$ we get,
\begin{array}{c | c}
  i & x_i\\
  \hline
  0 & 4 \\
  1 & 4.5926 \\
  2 & 4.6617 \\
  3 & 4.6653 \\
  4 & 4.6653 \\
\end{array}
Alternatively, you can also get already existing software like Wolfram Alpha to also solve your polynomial for you. The bottom line, however, is that there aren't really any shortcuts. You just need to expand the messy polynomial and do the root-finding. Thankfully, we have computers to take care of such a process.
EDIT:
I just realized that there is indeed an alernative..
You have $a_i(x) = x^2 - 5x + 2$. Then for $a_1(a_2(x)) = 0$, 
\begin{align}
  a_2^2 - 5a_2 + 2 &= 0\\
  \Rightarrow a_2 &= \frac{5 \pm \sqrt{17}}{2}\\
  \Rightarrow x^2 - 5x + 2 &= \frac{5 \pm \sqrt{17}}{2}\\
  \Rightarrow x^2 - 5x + \frac{-1 \pm \sqrt{17}}{2} &= 0\\
  \Rightarrow x &= \frac{5 \pm \sqrt{25 - 2\left(-1 \pm \sqrt{17} \right)}}{2}\\
  \Rightarrow x &= \frac{5 \pm \sqrt{27 \pm 2 \sqrt{17}}}{2}
\end{align}
You can then repeat this again if with $a(x)$ instead of $x$ if you had $a_1(a_2(a_3(x)))$. That is, instead of $x$ on the LHS you'd have $x^2 - 5x + 2$ and you could use the quadratic formula once more.
