For p=1, e.g. for f : (x)→ x*sin(x), input :
or :
Output :
If p>1, e.g. for f : (x,y)→ x*sin(y), input :
or :
Output :
Warning !!! the expression after -> is not evaluated. You should use unapply if you expect the second member to be evaluated before the function is defined.
For example:
Warning !!! The expression after -> is not evaluated.
Suppose that the function f: (x,y) → f(x,y) is defined, and we want to define a family of functions g(t) such that g(t)(y):=f(t,y) (i.e. t is viewed as a parameter). Since the expression after -> (or :=) is not evaluated, we should not define g(t) by g(t):=y->f(t,y), we have to use the unapply command.
For example, assuming that f:(x,y)→ xsin(y) and g(t): y→ f(t,y), input :
Output :
Input :
Output :
Input :
Output :
Next example, suppose that the function h: (x,y) → [x*cos(y),x*sin(y)] is defined, and we want to define the family of functions k(t) having t as parameter such that k(t)(y):=h(t,y). To define the function h(x,y), input :
To define properly the function k(t), input :
Output :
Input :
Output :
Input :
Output :