Suppose I have two functions
f(x)=1−x2
g(x)=x2
and the number 1. If I am allowed to compose these functions as many times as I like and in any order, what numbers can I get to if I must take 1 as the input? For example, I can obtain 15/16 by using
(f∘g∘g)(1)=1516
It is obvious that all obtainable numbers are in the set Q∩[0,1], but some numbers in this set are not obtainable, like 5/8 (which can be easily verified).Can someone identify a set of all obtainable numbers, or at least a better restriction than Q∩[0,1]? Or, perhaps, a very general class of numbers which are obtainable?
Answer
Here’s a sorted plot of all distinct values of compositions of up to 22 elementary functions f
and g
:
Mathematica code:
f[x_] := 1 - x^2;
g[x_] := x/2;
DeleteDuplicates[
Sort[
(Apply[Composition, #][x] /. x -> 1/2) & /@
Flatten[Table[Tuples[{f, g}, i], {i, 22}], 1]]]
ListPlot[%]
This graph confirms the obvious fact that the value can never be greater than 1 and that there is a gap between 1/2 and 3/4.
Attribution
Source : Link , Question Author : Franklin Pezzuti Dyer , Answer Author : David G. Stork