Roots of Composite Functions

Find the roots of

C(x) = q_0 \bigg(q_1\Big(q_2\big(\cdots q_n(x)\big)\Big)\cdots\bigg) = q_0 \circ q_1 \circ q_2 \circ \cdots \circ q_n  ,

the composition of q_0(x), q_1(x), \dots, q_n(x), where

q_i(x) = c_{i} + b_{i}x + a_{i}x^2, where c_{i}, b_{i}, a_{i} \neq 0 \in \textbf{R}

Let’s begin with an example.

Let C(x) = q_0\big(q_1(x)\big), where

\begin{array}{rcl}  q_0(x) & = & 12 - 8x + x^2\\  q_1(x) & = & 12 - 7x + x^2  \end{array}

Then, C(x) = 12 - 8q_1(x) + [q_1(x)]^2. So, if we can find the values of x such that the value of q_1(x) is a root of q_0(x), we will find the roots of C(x).

By the quadratic equation,

\begin{array}{rcl}  q_1(x) & = & \frac{8}{2} \pm \frac{1}{2}\sqrt{64-48}\\  & = & 2,6  \end{array}

So when q_1(x) is 2 or 6, q_0\big(q_1(x)\big) will be 0.

From the quadratic equation, q_1(x) = 2 when x = 2,5 and q_1(x) = 6 when x = 1,6

So, the 4 roots of C(x) are 1, 2, 5 and 6.


For the general case, let Q_{i,j}(x) = q_i \circ q_{i+1} \circ \cdots \circ q_j, where i \leq j. Our goal is to find the roots of Q_{0,n}(x).

Then,

\begin{array}{rcl}  C(x) & = & \displaystyle Q_{0,n}(x)\\  & = & \displaystyle q_0\big(Q_{1,n}(x)\big)\\  & = & \displaystyle c_{0} + b_{0}Q_{1,n}(x) + a_{0}[Q_{1,n}(x)]^2  \end{array}

This may look a little disconcerting, but this is nothing more than a quadratic equation of the form c + by + ay^2, where y = Q_{1,n}(x). Therefore, by the quadratic formula,

\displaystyle Q_{1,n}(x) = -\frac{b_{0}}{2a_{0}} \pm \frac{1}{2a_{0}}\sqrt{\big({b_{0}}\big)^2-4a_{0}c_{0}}

For simplicity, call the right side of the above equality \phi_{1,n}. Thus, q_0(\phi_{1,n}) = 0.

But,

\begin{array}{rcl}  C(x) & = & \displaystyle q_0\big(Q_{1,n}(x)\big)\\  & = & \displaystyle q_0\Big(q_1\big(Q_{2,n}(x)\big)\Big)\\  & = & \displaystyle q_0(\phi_{1,n})  \end{array}

So, q_1\big(Q_{2,n}(x)\big) = \phi_{1,n} and

\begin{array}{rcl}  c_{1} + b_{1}Q_{2,n}(x) + a_{1}[Q_{2,n}(x)]^2 & = & \phi_{1,n}\\  \big(c_{1} - \phi_{1,n}\big) + b_{1}Q_{2,n}(x) + a_{1}\big[Q_{2,n}(x)\big]^2 & = & 0  \end{array}

Once again we have a quadratic equation that can be easily solved.

\displaystyle Q_{2,n}(x) = -\frac{b_{1}}{2a_{1}} \pm \frac{1}{2a_{1}}\sqrt{\big({b_{1}}\big)^2-4a_{1}\big(c_{1} - \phi_{1,n}\big)}

Thus, q_0\big(q_1(\phi_{2,n})\big) = 0.

Extending this pattern we obtain:

\displaystyle Q_{m,n}(x) = -\frac{b_{m-1}}{2a_{m-1}} \pm \frac{1}{2a_{m-1}}\sqrt{\big({b_{m-1}}\big)^2-4a_{m-1}\big(c_{m-1} - \phi_{m-1,n}\big)} = \phi_{m,n}

When m = n, Q_{n,n}(x) = q_n(x) = \phi_{n,n} can be solved to find the roots of C(x).

\begin{array}{rcl}  c_{n} + b_{n}x + a_{n}x^2 & = & \phi_{n,n}\\  \big(c_{n} - \phi_{n,n}\big) + b_{n}x + a_{n}x^2 & = & 0  \end{array}

Using the quadratic equation,

\displaystyle x = -\frac{b_{n}}{2a_{n}} \pm \frac{1}{2a_{n}}\sqrt{\big({b_{n}}\big)^2-4a_{n}\big(c_{n} - \phi_{n,n}\big)}

where

\begin{array}{rcl}  \phi_{j,n} & = & \displaystyle -\frac{b_{j-1}}{2a_{j-1}} \pm \frac{1}{2a_{j-1}}\sqrt{\big({b_{j-1}}\big)^2-4a_{j-1}\big(c_{j-1} - \phi_{j-1,n}\big)}, \; j=1. 2, \dots, n\\  \phi_{0,n} & = & 0  \end{array}

So, C(x) has 2^n roots (assuming the radical is never 0) and can be written algebraically using the following recursive relation.

x^* = \displaystyle -\frac{b_{n}}{2a_{n}} \pm \frac{1}{2a_{n}}\sqrt{\big({b_{n}}\big)^2-4a_{n}(c_{n} - \phi_{n,n})}

where

\begin{array}{rcl}  \phi_{j,n} & = & \displaystyle -\frac{b_{j-1}}{2a_{j-1}} \pm \frac{1}{2a_{j-1}}\sqrt{\big({b_{j-1}}\big)^2-4a_{j-1}\big(c_{j-1} - \phi_{j-1,n}\big)}, \; j=1. 2, \dots, n\\  \phi_{0,n} & = & 0  \end{array}


If we apply this to the example above:

\begin{array}{ccccccccc}  c_0 & = & 12 & b_0 & = & -8 & a_0 & = & 1\\  c_1 & = & 12 & b_1 & = & -7 & a_1 & = & 1  \end{array}

j = 1:

\begin{array}{rcl}  \phi_{1,n} & = & \displaystyle -\frac{b_{0}}{2a_{0}} \pm \frac{1}{2a_{0}}\sqrt{\big({b_{0}}\big)^2-4a_{0}\big(c_{0} - \phi_{0,n}\big)}\\  & = & \displaystyle \frac{8}{2} \pm \frac{1}{2}\sqrt{(-8)^2-4(12 - 0)}\\  & = & 2, 6  \end{array}

j = 2:

\begin{array}{rcl}  \phi_{2,n} & = & \displaystyle -\frac{b_{1}}{2a_{1}} \pm \frac{1}{2a_{1}}\sqrt{\big({b_{1}}\big)^2-4a_{1}\big(c_{1} - \phi_{1,n}\big)}\\  & = & \displaystyle \frac{7}{2} \pm \frac{1}{2}\sqrt{(-7)^2-4(12 - (2 \:\rm{or}\: 6))}\\  & = & \frac{1}{2}(7 \pm \sqrt{9}) = 2 \:\rm{and}\: 5, \:\rm{and}\: \frac{1}{2}(7 \pm \sqrt{25}) = 1 \:\rm{and}\: 6  \end{array}

Leave a comment