integrate returns undefined .. Bug in zero denominator?



This is not too pretty, but it seems to remove some bad
solutions. For simplicity, it assumes the eqn is of the form
someexpr = 0.  It checks some solutions of univariate
equations.  Multivariate cases and some complicated cases
are supposed to fall through. It also assumes that if
limit() returns a number, it is more reliable than when
solve() returns a solution!

mysolve(sin(x-y)/(x-y),x);

`solve' is using arc-trig functions to get a solution.
Some solutions will be lost.
(%o5) []

------------
removebadsolns(expr,solns,var) := block( [s,var1,lim],
    for s in solns do (
    var1:inpart(s,1),
    if mapatom(var1) and var1 = var then (
      lim:limit(expr,var,inpart(s,2)),
      if numberp(lim) and lim # 0 then
        solns:delete(s,solns))),
     solns);

mysolve(expr,var) := block([solns],
  solns:solve(expr,var),
  if not listp(var) then 
     solns:removebadsolns(expr,solns,var) else solns);