Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(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 *

image text in transcribed(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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Guide To Client Server Databases

Authors: Joe Salemi

2nd Edition

1562763105, 978-1562763107

More Books

Students also viewed these Databases questions

Question

2. How were various roles filled?

Answered: 1 week ago