Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The answer(s) of interest is(are) the yval values, the xval values are the bounds of the search interval. If those are the bounds you are interested in, you may try :

roots=[]
for xval in [-10..5, step=.1]:
    try;
        yval = find_root(cos(x)-exp(x), xval, xval+.1
        root.append((xva, yval, xval+.1))
    except:
        pass

which gives you a list of solution bracketed by the search bounds leading to them, but I have trouble seeing the point...