Find_root with function



I've seen several messages on the mailing list about changes in the
way find_root treats its first argument.

The following is a madeup proxy for a more involved calculation which
involves using quad_qags(...) inside a block(...) definition of a function.

Here myg(x) is supposed to be equivalent to the function x^2 -5, and
I am using find_root to find the positive root of this function, but with
the indirect route using myg(x):

myg(x) := block([val,qlist, numer],
      numer:true,
   qlist: quad_qags(2*y,y,sqrt(5.0),x),
   val : qlist[1],
   val
   )$

In xmaxima 5.13 (windows xp) I get the following responses:

(%i3) grind(myg);
myg(x):=block([val,qlist,numer],numer:true,qlist:quad_qags(2*y,y,sqrt(5.0),x),val:qlist[1],
    val)$
(%o3)                                        done
(%i4) myg(1.0);
(%o4)                                - 4.000000000000001
(%i5) myg(3.0);
(%o5)                                 3.999999999999999
(%i6) find_root(myg(y),y,1,3);
function has same sign at endpoints
[f(1.0) = - 5.000000000000002, f(3.0) = - 5.000000000000002]
 -- an error.  To debug this try debugmode(true);
(%i7) find_root(''myg(y),y,1,3);
function has same sign at endpoints
[f(1.0) = - 5.000000000000002, f(3.0) = - 5.000000000000002]
 -- an error.  To debug this try debugmode(true);
(%i8) find_root(ev(myg(y)),y,1,3);
function has same sign at endpoints
[f(1.0) = - 5.000000000000002, f(3.0) = - 5.000000000000002]
 -- an error.  To debug this try debugmode(true);

Any suggestions??

Ted Woollett