Compositions
Calculus I
Andy Long

I created this file to attempt to help students understand Compositions, by checking out some examples.

In these examples, I plot f, g, and the composition f(g(x)). In each case can you see which is which? 
Then I graph each function in its own plane, so hopefully you can see how the composition falls out of each of f and g operating on each other.

g[x_]:=x^2
f[x_]:=Sin[x]
H[x_]:=f[g[x]]
Plot[{g[x],f[x],H[x]},{x,0,Pi}]
ParametricPlot3D[{{x,g[x],0},{0,g[x],f[g[x]]},{x,0,H[x]}},{x,0,Pi},AxesLabel->{x,y,z}]

g[x_]:=x Sin[x]
f[x_]:=x^3
H[x_]:=f[g[x]]
Plot[{g[x],f[x],H[x]},{x,0,Pi}]
ParametricPlot3D[{{x,g[x],0},{0,g[x],f[g[x]]},{x,0,H[x]}},{x,0,Pi},AxesLabel->{x,y,z}]

g[x_]:=x^3Cos[x]
f[x_]:=Sin[x]
H[x_]:=f[g[x]]
Plot[{g[x],f[x],H[x]},{x,0,Pi}]
ParametricPlot3D[{{x,g[x],0},{0,g[x],f[g[x]]},{x,0,H[x]}},{x,0,Pi},AxesLabel->{x,y,z}]