MTM[compose] - compose functions
|
Calling Sequence
|
|
compose(f,g)
compose(f,g,z)
compose(f,g,x,z)
compose(f,g,x,y,z)
|
|
Parameters
|
|
f
|
-
|
expression
|
g
|
-
|
expression
|
z
|
-
|
symbol
|
x
|
-
|
symbol
|
y
|
-
|
symbol
|
|
|
|
|
Description
|
|
•
|
The function compose(f,g) interprets the expressions f and g as functions of s and t, respectively, and returns an expression that represents the function f(g(t)). Here, s and t are the default symbols of f (given by findsym(f,1)) and g (given by findsym(g,1)), respectively.
|
•
|
The function compose(f,g,z) treats f and g as functions of s and t, as described above, and returns an expression that represents the function f(g(z)).
|
•
|
The function compose(f,g,x,z) treats f as a function of x, g as a function of the default symbol, and returns an expression that represents the function f(g(z)).
|
•
|
The function compose(f,g,x,y,z) treats f as a function of x, g as a function of y, and returns an expression that represents the function f(g(z)).
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
For f(p) and g(q), compute f(g(q));
>
|
|
| (3) |
For f(p) and g(q), compute f(g(r));
>
|
|
| (4) |
For f(n) and g(q), compute f(g(r));
>
|
|
| (5) |
For f(n) and g(m), compute f(g(r));
>
|
|
| (6) |
|
|