I have a list of functions that I would like to add up to one "big" function. Example:
funlist=list()
funlist[[1]]=exp(x1)
funlist[[2]]=sin(x2)
Desired Result:
bigfun = exp(x1) + sin(x2)
I know that for numerical cases it is possible to use reduce("+", list), but what about non-numerical cases as indicated above?
Please note: I am looking for a general automated solution, i.e. the list of functions may vary (the functions themselves and the length of the list / number of functions), but all functions of the list must be added to one final member at the end. Each function must have its own value that must be provided (for example, x1 for funlist [[1]], x2 for funlist [[2]], etc.).
: bigfun (), , .
EDIT:
exp (x1) sin (x2). ,
(x) {y1 * x + y2 * x ^ 2 + y3 * x ^ 3}, y1, y2, y3 .