Composition of Functions in a Cube
- GeoGebra Materials Team
This shows how the composition of functions from [0,1] to [0,1] can be visualized in a unit cube. If, for example, f(x)=x^2 is the curve in blue and g(x)=1-x the curve in red, then g(f(x))=1-x^2 appears in green. The dotted line in the middle is the curve whose coordinates are (x,f(x),g(f(x))), and its "shadow" in the three coordinate planes represents the functions f(x), g(x), and g(f(x)). The functions f and g may be changed by typing into the Input window "ff(x)=whatever" and "gg(x)=whatever", where whatever is the function of x desired.
[For geogebra users: The view can be rotated by adjusting theta and phi... the perspective can be similarly adjusted by changing A_x and chi. The parametric curve is described as a locus, requiring the creation of a custom slider (at the top of the page).]