Question: Use MATLab*** Problem: Inte grate the following function numerically using a combined method that uses Simpson's 1/3 and Simpson's 3/8 rules. To accomplish this you

Use MATLab***

Use MATLab*** Problem: Inte grate the following function numerically using a combined

Problem: Inte grate the following function numerically using a combined method that uses Simpson's 1/3 and Simpson's 3/8 rules. To accomplish this you will use the follovw structure (note that the conditions below are not in any kind of order) ing procedure in a single if-elseif...-else-end 1. if the number of subdivisions, n, is even use Simpson's 1/3 rule to caculate the area 2. if the number of subdivisions, n, is odd use a combination of Simpson's 3/8 rule and Simpson's 1/3 rule to calculate the area. Simpson's 3/8 rule will be applied to the first4 points and Simpson's 1/3 rule for the remaining range. 3. if n- 2 use Simpson's 1/3 rule to calculate area 4, if n = 3 use Simpson's 3/8 rule to calculate area uirements 1. You will need a driver program and a function program. 2. Driver program will be used to a. define f(x) as a function handle enter the values for a, b, and n i.e, the range and the number of subdivisions between x -a and x-b. These numbers are to be entered using the input command b. i. You can assume that n is greater than 1 c. call the function program calc_ area to determine the area using Simpson's rule d. print out the results of the integral Output should be as follows The value of the integral from a = # to b # using # equally spaced divisions is: #?##### 3. Function Programm a name your function b. inputs to function program are: a,b, n, and your function handle c. output will be the area program calc_area Example Enter 1ower limit of range: 0 Enter upper limit of range: 3 Enter number of subdivisions (must be greater than 1):7 The value of the integral from a = 0 to b = 3 using 7 equally spaced divisions is: 247.65698 Problem: Inte grate the following function numerically using a combined method that uses Simpson's 1/3 and Simpson's 3/8 rules. To accomplish this you will use the follovw structure (note that the conditions below are not in any kind of order) ing procedure in a single if-elseif...-else-end 1. if the number of subdivisions, n, is even use Simpson's 1/3 rule to caculate the area 2. if the number of subdivisions, n, is odd use a combination of Simpson's 3/8 rule and Simpson's 1/3 rule to calculate the area. Simpson's 3/8 rule will be applied to the first4 points and Simpson's 1/3 rule for the remaining range. 3. if n- 2 use Simpson's 1/3 rule to calculate area 4, if n = 3 use Simpson's 3/8 rule to calculate area uirements 1. You will need a driver program and a function program. 2. Driver program will be used to a. define f(x) as a function handle enter the values for a, b, and n i.e, the range and the number of subdivisions between x -a and x-b. These numbers are to be entered using the input command b. i. You can assume that n is greater than 1 c. call the function program calc_ area to determine the area using Simpson's rule d. print out the results of the integral Output should be as follows The value of the integral from a = # to b # using # equally spaced divisions is: #?##### 3. Function Programm a name your function b. inputs to function program are: a,b, n, and your function handle c. output will be the area program calc_area Example Enter 1ower limit of range: 0 Enter upper limit of range: 3 Enter number of subdivisions (must be greater than 1):7 The value of the integral from a = 0 to b = 3 using 7 equally spaced divisions is: 247.65698

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!