Function Composition - Maple Programming Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Math Apps : Functions and Relations : Composition : MathApps/FunctionComposition

Function Composition

Main Concept

Sometimes it is useful to apply one function, and then apply a second function to the result. For example, suppose fx=y and gy=z. First, f  takes the input value x and outputs y. Then, y is input into g which gives a new output, z. This idea can be used to create a new function, called the composition of g and f.


Let f and g be two functions. The composition of the functions g and f, written gf  ("g composed with f "), is defined by




The domain of the function gf  is the set of all numbers x in the domain of f for which fx is in the domain of g.


Input two functions f(x) and g(x) and plot their composition.

fx = 




More MathApps