- #1

- 7,799

- 1,550

- TL;DR Summary
- How can we express nested expressions as a compositions of functions?

How can we write (finite) nested expressions as compositions of functions?

For example (using Horner's technique), consider:

##P(x) = 3 + 2x + 4x^2 + 6 x^3 = 3 + x(2 + x(4 + x(6) ) )##

The way I see to do it is to use functions of two variables.

##f_3(x,y) = 6##

##f_2(x,y) = 4 + xy##

##f_1(x,y) = 2 + xy##

##f_0(x,y) = 3 + xy##

##P(x) = f_0(x,(f_1(x,f_2(x,f_3(x,x)))))##

It seems unnatural to introduce two variables in order to get a nested expression in one variable, but I see no way around it.

For example (using Horner's technique), consider:

##P(x) = 3 + 2x + 4x^2 + 6 x^3 = 3 + x(2 + x(4 + x(6) ) )##

The way I see to do it is to use functions of two variables.

##f_3(x,y) = 6##

##f_2(x,y) = 4 + xy##

##f_1(x,y) = 2 + xy##

##f_0(x,y) = 3 + xy##

##P(x) = f_0(x,(f_1(x,f_2(x,f_3(x,x)))))##

It seems unnatural to introduce two variables in order to get a nested expression in one variable, but I see no way around it.