Question: You only need to submit the . c file for each assignment. Your assignments are: You are asked to show how good Simpson's rule can

You only need to submit the . c file for each assignment. Your assignments are:
You are asked to show how good Simpson's rule can be, and decide to write a
program to demonstrate. Write a program to calculate:
18ax+bx+cdx
both exactly and using the Simpson's rule. The program should read ,a,b and
c and the number of steps for Simpson's rule. It should then print out the exact
integral, the estimate using Simpson's rule and the difference in the two answers.
Experiment with the program to see when the answer is exact (e.g.=1,2,3,4?),
even with a small number of steps.
Hint 1: You can use any functions from math.h. For example, you may want to use
pow (x,y) to get xy.
Hint 2: You may want to include a function F(x) which is an anti-derivative for
f(x)=ax+bx+c.
 You only need to submit the . c file for each

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!