Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions

Question

Find the pH of a 0.075M solution of benzoic acid (HC7H5O2)

Answered: 1 week ago