J. Milgram asks why this works:
> interpolate(x*sin(x)-1,x,0,%PI/2);
but this doesn't:
> x*sin(x)-1$
> interpolate(%,x,0,%PI/2);
Quick answer
This is because interpolate is trying to be user-friendly. It is
automatically quoting its arguments. In the second case, try
interpolate(''%,x,0,%PI/2) instead.
----------------
Discussion
Maxima is inconsistent in its quoting of arguments. It is trying to be
'friendly' about bound variables, but in the end it is just incoherent:
var: 23$
Cases with implicit quoting (mspec):
sum(var,var,1,2) => 3
interpolate(var,var,0,1) => 0.0
romberg(var,var,0,1) => 0.5
makelist(var,var,1,2) => [1,2]
Cases without implicit quoting:
integrate(var,var) => error (23 is not a variable name)
integrate(var,'var) => 23*var
integrate('var,'var) => var^2/2
integrate(var,'var,0,1) => 23
integrate('var,'var,0,1) => 1/2
plot2d(var,[var,1,2]) => error
plot2d(var,['var,1,2]) => flat line
plot2d('var,['var,1,2]) => diagonal line