Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You may use compose as in the following sample:

sage: h = compose(sin, cos)

sage: h(1.23456)
0.323982971162499

sage: sin(cos(1.23456))
0.323982971162499

sage: plot( compose(sin, cos), (0, pi) )
Launched png viewer for Graphics object consisting of 1 graphics primitive

(The explicit composition works, of course, but sometimes one needs the composition without passing through the explicit evaluation, as in the above plot example.)

See also: http://doc.sagemath.org/html/en/reference/misc/sage/misc/misc.html