Maxima 5.25.1: integrate is buggy



Robert Dodier wrote

>I suspect that's relatively easy to fix -- it is probably a minor
> branch in integrate. I wouldn't be surprised to find subst in there ....

The substitution takes a lengthy path involving the functions no-err-sub, subin, maxima-substitute, and subst1. There is a
special *atp* that might control the application of at.  But setting *atp* to true yields, for example:

 (%i12) integrate(diff(f(x),x,2),x,a+b,a-b);
 (%o12) 0

And this is a bug.

Likely there is an easy fix, but maybe maxima-substitute should know more about the meaning of expressions. Also, 
either "at" is trying to be super careful, or it's missing some simplifications:

  (%i15) at(diff(f(t),t),x=9);
  (%o15) at('diff(f(t),t,1),x=9)