Computers and Technology

Python problemMake a function defined as: def GaussIntegration(fcn, a, b, n=4): Purpose: use the Gauss Integration method to estimate the integral of fcn(x), between the limits of a and b.
fcn: the function we want to integrate
a and b: the lower and upper limits of integration
n: The number of integration points used. The only acceptable values are 2, 3 and 4. If a value other that 2, 3 or 4 is passed, use n = 4.
return value: the estimate of the integral
Write and call a main() function that uses your GaussIntegration function to estimate and print the integral of:
x - 3 * cos(x) , with a = 1, b = 3 and n = 4
x - 3 * cos(x) , with a = 1, b = 3 and n = 5
cos(2x)*x3, with a = 2, b = 3 and n = 2

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 07:00, sudotoxic
Into what form does the barcode reader convert individual bar patterns?
Answers: 1
image
Computers and Technology, 24.06.2019 14:00, ratpizza
Which describes careers that have similar education requirements but different qualifications? product safety engineers and materials engineers industrial safety engineers and industrial health engineers quality control systems managers and inspectors industrial safety and health engineers and hand packers
Answers: 3
image
Computers and Technology, 25.06.2019 09:00, Jenifermorales101
Janet has to prepare a presentation on business strategies for work. which guideline should she follow to create an effective presentation? a. use a readable font b. use a multicolored background c. use a small, but stylish font d. include detailed text
Answers: 1
image
Computers and Technology, 25.06.2019 10:00, alexandroperez13
One way news orginaztions can influence people is by: a. slanting information b. accepting all beliefs c. sharing a true perspective d. giving people money
Answers: 1
Do you know the correct answer?
Python problemMake a function defined as: def GaussIntegration(fcn, a, b, n=4): Purpose: use the Ga...

Questions in other subjects:

Konu
Mathematics, 23.09.2020 14:01
Konu
English, 23.09.2020 14:01