Your first line should be f(x):=log(x)+x.
But you probably did that correctly, and you still
have this behavior.
In the first case, log(x) is globally associated with 1. Then the
function f(x) is evaluated.
within the body of the function f, various constructions
based on the argument x of f are put together. one of
them happens to be log(x), It is done without reference
to the global association for log(x).
In the second case, there is no local argument x.
I suggest that you never use ev, but use subst, whose semantics
are usually clear. If you cannot do what you wish with subst,
then consider using ev.
subst(log(x)=1,f(x));
RJF
Gosse Michel wrote:
> Hello
>
> I don't understand why Maxima has two behavior upon the same problem.
> First :
> f(x)=log(x)+x;
> ev(f(x),log(x)=1);
> returns log(x)+x
> Second
> f : f(x);
> ev(f,log(x)=1);
> returns 1+x qui is correct.
>
> Why Maxima doen't do the substitution in the first case ?
>