Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use python please a) Write a function defined as: def Simpson(fen, a, b, npoints = 11): Purpose: use Simpson's 1/3 rule to estimate the integral

use python please image text in transcribed
a) Write a function defined as: def Simpson(fen, a, b, npoints = 11): Purpose: use Simpson's 1/3 rule to estimate the integral of fen(x), between the limits of a and b. fen: the function we want to integrate a and b: the lower and upper limits of integration npoints: The number of integration points used in the range a to b (inclusive). Npoints must be an ODD number. If npoints is not ODD, then add 1 to make it odd! return value: the estimate of the integral Write and call a main() function that uses your Simpson function to estimate and print the integral of: X-3 * cos(x) with a = 1, b = 3 and npoints = 14 cos(2x).XY with a = 2, b = 3 and npoints = 29

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_2

Step: 3

blur-text-image_3

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

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions

Question

What tools might be helpful?

Answered: 1 week ago