subject

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

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:00
Give an example of a case where a two-way handshake to establish a connection could leave one side of the connection live while the other side does not believe there is a connection.
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
What type of slide show is a dynamic and eye-catching way to familiarize potential customers with what your company has to offer? a. ole b. photo album c. brochure d. office clipboard
Answers: 2
question
Computers and Technology, 23.06.2019 20:30
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
Answers: 1
You know the right answer?
Python problemMake a function defined as: def GaussIntegration(fcn, a, b, n=4): Purpose: use the Ga...
Questions
question
Health, 29.10.2020 15:40
Questions on the website: 13722363