| 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...
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.