Problem #9, p. 602

#9, p. 602

;; first we define the function:
(func f(x) 800000*(exp (-x/5000))/(x+20000) - 16)

;; Now we find a root using newton's method:
(setq root (newton-root f 100))

(Iterate, Function value)

(100 23.012882519671848) 
(2461.8663610190847 5.76753005612191) 
(3545.4601514129026 0.71968337195662) 
(3722.9827139373874 0.015722113442816266) 
(3727.036624477624 7.948007109348509E-6) 
(3727.0386759266275 2.0321522242738865E-12) 

function value at final iterate 3727.04: 2.032152E-12

Following is the list of iterates and their function values:

           100.000             23.0129
           2461.87             5.76753
           3545.46             0.719683
           3722.98             1.572211E-2
           3727.04             7.948007E-6
           3727.04             2.032152E-12

;; Here's a plot of f-16 on the interval (0,7000) or so:
(plot f 0 (* 2 root))
;; We can now approximate the integral using Simpson's method: (simpson f 0 3727.04 1e-12) 37753.01014492836

Website maintained by Andy Long. Comments appreciated.