Mathematical functions in an expression

The procedure `Math_Func` allows one to obtain a list of mathematical
functions (in the `Maple` sense) and of their power in a given
expression. For example

Math_Func([(sin(x)^2+cos(x)^3)/x+sin(x)^2*cos(x)^3+1/sin(x)^2])returns in the global variable

3 2 1 [cos(x) , sin(x) , -------] 2 sin(x)If these terms appears more than once in the expression the

ALIAS_FSIMPLIFY:=proc(fid,expr) local aux,ai: if type(expr,string) then fprintf(fid,"INTERVAL_VECTOR ALIAS_S(%d);\n",nops(ALIAS_MATH_FUNC)): for ai from 1 to nops(ALIAS_MATH_FUNC) do aux:=Convert_Frac_Cons(Code(ALIAS_MATH_FUNC[ai],[x,y,z,w])): fprintf(fid,"ALIAS_S(%d)=%s;\n",ai,aux): od: RETURN(0): fi: aux:=expr: for ai from 1 to nops(ALIAS_MATH_FUNC) do aux:=subs(ALIAS_MATH_FUNC[ai]=ALIAS_S(ai),aux): od: RETURN(aux): end:Note the use of the

Jean-Pierre Merlet 2012-12-20