By the way: Since a function such as
fd(f,x,h) := (apply(f,[x+h]) - apply(f,[x]))/h
takes a function as an input and returns a formula for the finite
difference, it's not possible compose fd with itself without converting
the first output of fd to a lambda form (or equivalent). Further,
Maxima doesn't know the function algebra, so things such as
f(x) := x^2;
g(x) := x^3;
fd(f+g,x,1/10)
will not work. Although it seems elegant to use a function instead of a
argument formula pair, it does cause some problems (especially for
students, I think). Sometimes the pedestrian argument / formula scheme
wins.
--Barton
maxima-bounces at math.utexas.edu wrote on 09/03/2010 09:58:26 AM:
> [image removed]
>
> Re: [Maxima] scope of function-parameters
>
> Richard Fateman
>
> to:
>
> Leo Butler
>
> 09/03/2010 09:58 AM
>
> Sent by:
>
> maxima-bounces at math.utexas.edu
>
> Cc:
>
> maxima, UlrichP
>
> apply(f,[x]) works because it uses the value binding of f to find a
> function, whereas
> f(x) uses the function binding of f, and based on the conventional lisp
> way of doing this
> from 1966, it uses the global function definition.
>
> If you can use apply(f,[x]) or something similar, that would solve your
> problem.
>
> What some people do is they just use a very odd name and hope no one
> else uses it. e.g.
>
> test(%%f, x) := .....
>
> RJF
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima