Question: (C++) Implement the pseudocode for the recursive Simpson algorithm found in the picture attached in C++. Test the code on these functions with =1/2 *

(C++) Implement the pseudocode for the recursive Simpson algorithm found in the(C++) Implement the pseudocode for the recursive Simpson algorithm found in the picture attached in C++.

Test the code on these functions with =1/2 * 10-5 and level max = 4

a. 410 1/(1+x2) dx

b. 801/2 ((1-x2)-x) dx

Romberg Pseudocode procedure Romberg(f, a, b,n,(ri)) integer i, j, k, n; real a, b, h, sum; real array (rijo:mx On external function f heb-a 700 + (h/2[f(a) + f(b)] for i=to n heh/2 sum 0 for k = 1 to 2 - 1 step 2 sum sum + f(a+kh) end for rior-1,0 + (sum)h for j = 1 to i lij 1-1 + ('ij-1-n-1.j-1)/(4) - 1) end for end for end procedure Romberg d = (a + c)/2 et (c+b)/2 two_simpson - h[f(a) + 4f (d) +2f (c) + 4f (e) + f(b)]/12 if level level max then simpson_result two_simpson output "maximum level reached" else if two_simpson-one simpson|

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!