Question: Develop a user-friendly computer program for adaptive quadrature based on Fig. 22.5. Test it by solving Prob. 22.10. Fig 22.5. FUNCTION quadapt(a, b) tol 0.000001
Fig 22.5.
.png)
FUNCTION quadapt(a, b) tol 0.000001 c= (a + b)12 fa-f(a) fc f(c) fb-f(b) quadapt qstep(a, b. tol. fa, fc, fb) END quadapt (main calling function) (initialization) FUNCTION qstep(a, b, tol, fa, fc, fb) (recursive function) h2 h112 c-a b)/2 fd= f( (a + c)/2) Simpson's 1/3 rule) 12=h2/6 * (fa + 4 * fd + 2 * fc + 4 * fe + fb) IF 12 11 S tol THEN (terminate after Boole's rule) ELSE I-12+ (12- I1)/15 (recursive calls if needed) la = qstep(a, c, tol, fa, fd, fc) Ib= qstep(c. b. tol. fc, fe, fb) I = Ia + Ib END IF qstep = 1 END qstep
Step by Step Solution
3.42 Rating (171 Votes )
There are 3 Steps involved in it
Here is a VBA program to implement the algorithm from Fig 225 It is set up to evaluate the integral from Prob 2210 Option Explicit Function quadadapta ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
1228-M-N-A-O(890).docx
120 KBs Word File
