Name:

substitute replace the occurrences of the free variable in an expression.

Library name:

sollya_obj_t sollya_lib_substitute(sollya_obj_t, sollya_obj_t)

Usage:

substitute(f,g) : (function, function) -> function substitute(f,t) : (function, constant) -> constant

Parameters:

Description:

Example 1:

   > f=sin(x);
   > g=cos(x);
   > substitute(f,g);
   sin(cos(x))
   > f(g);
   sin(cos(x))

Example 2:

   > a=1;
   > f=sin(x);
   > substitute(f,a);
   0.84147098480789650665250232163029899962256306079837
   > f(a);
   0.84147098480789650665250232163029899962256306079837
See also: evaluate, composepolynomials
Go back to the list of commands