@Carl Love , thank you very much!
But I've tried to go further and got another error. parameter.mw
Let's forget that it is normalization for a sake of simplicity and let's just divide the function by 5. This code works :
divide5 := proc (g)
local x, r; r := unapply((1/5)*g(x), x);
f := x-> x^2 :
f := divide5(f);
Now I want my function to be dependent on the parameter, say, i. This code doesn't work:
divide5 := proc (g, k)
local x, r;
if k < 3 then r := 0 else r := unapply((1/5)*g(k, x), k, x) end if;
f := (i, x) -> x^2+i :
f := divide5(f, i);
Error, (in divide5) cannot determine if this expression is true or false: i < 3
Could I trouble you to explain this?