Graph self-nested function in Desmos

1.8k Views Asked by At

Let's say I have a function like the following:

$$f(y, x)=x^2+y$$

If I wanted to nest this in itself, I could do:

$$f_1(y, x)=f(y, f(y, x))$$

Now that I've defined what I mean, I pose the following question: using only the features available in Desmos (most mathematical functions, but no extra gizmos like recursion), how could I enter a function $f_2$ which is equivalent to $f$ nested in itself $n$ times?

E.g:

$$f_2(n, y, x)=(...)$$

such that if I do:

$$f_2(3, a, b)=f(a, f(a, f(a, b)))=((b^2+a)^2+a)^2+a$$

Note that this is not my function, and the real function I am using for $f$ is a lot more complicated and cannot be simplified into a product or sum function.