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:
both exactly and using the Simpson's rule. The program should read and
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 eg
even with a small number of steps.
Hint : You can use any functions from math.h For example, you may want to use
pow to get
Hint : You may want to include a function which is an antiderivative for
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
