Question: has testeq a bug?

testeq() gives inconsistent results. See this example:

Equation (1):

Y*(1-h*p^Phi)*(1-t)+sum(Y*(1-t)/(1+r)^s, s = 1 .. infinity)

computes to

Y*(1-h*p1^Phi)*(1-t)+sum(Y*(1-t)/(1+r)^s, s = 1 .. infinity)

Equation (2):

Y*(1-h*p1^Phi+1/r)*(1-t)

computes to

Y*(1-h*p1^Phi+1/r)*(1-t)

Comparing (the results of) (1) and (2) with testeq((1),(2)) gives

FAIL

When I transform equation (2) with collect((2),r), I get equation (3)

 (1-h*Pi[1]^Phi)*(1-t)+Y*(1-t)/r

which looks identical to (1) and testeq((1),(3)) now confirms this:

true

 

Very strange, isn't it? And disturbing, if you can't trust testeq !

 

A maple worksheet is attached: testeq_bug.mw

 

 

Please Wait...