Lab Five
Results Summary
| BISECTION | sin(5x)/x | cos(x)-x |
| iterations | 12 | 10 |
| result | 2.51 | 0.739 |
| accuracy | 1E-3 | 1E-3 |
| SECANT | sin(5x)/x | cos(x)-x |
| iterations | 2 | 3 |
| result | 3.1414 | .739 |
| accuracy | 1E-3 | 1E-3 |
Bisection
>>> rootfinder.bisect(0,1,rootfinder.cosf) [0.7392578125, 10]
>>> rootfinder.bisect(1,3.15,rootfinder.sinf) [2.5132934570312502, 12]
Secant
>>> rootfinder.secant(0,1,rootfinder.cosf) [0.73911936191162919, 3]
>>> rootfinder.secant(1,3.15,rootfinder.sinf) [3.1414236375956812, 2]
