using integrate programmatically



When integrate prompts the user for input (such as  "Is <stuff> zero or 
nonzero?"), the
information the user supplies gets lost  when integrate terminates.  My DE 
solver uses
integrate and the lost information causes trouble;  an example

(%i13) de : x^2 * 'diff(y,x,2) + (1 - a - b) * x * 'diff(y,x) + a*b*y;

(%o13) x^2*'DIFF(y,x,2)+(-b-a+1)*x*'DIFF(y,x,1)+a*b*y

(%i14) odelin(de,y,x);
Is  b-a  zero or nonzero?

nonzero;

(%o14) SET(x^a, x^b)

For a # b, this  is a correct.  The user prompt comes from integrate --- 
not from
my code. Let's try again, but this time we'll  answer zero.

(%i15) odelin(de,y,x);

Is  b-a  zero or nonzero?

zero;

should vanish, but it does not -x^a*b+x^a*a

(%o15) SET(GAUSS_A(a-b,0,0,%R28*x+1)*x^a,GAUSS_B(a-b,0,0,%R28*x+1)*x^a)

The routine that checks the solution doesn't know that integrate assumed 
that b - a = 0.  So 
the check fails and the DE solver goes on to try other methods.   The 
solution it finds
is correct, but overly complicated.   If I  removed my checking code, the 
DE solver would 
return {x^a, x^a * log(x)}  and it would not proceed on to using the 2F1 
Gauss
hypergeometic solver.
 
It would be nice if  integrate made user input available outside 
integrate.  Oh sure, this 
data might be too messy to do anything with.  It could even be 
inconsistent.  Commercial 
Macsyma had a proviso  facility---it isn't all that powerful, but it's a 
start.

Just something to think about ....

Barton