subject

An approximation to the integral of a function f(x) over an interval [a, b] can be found by first approximating f(x) by the straight line that goes through the end points (a, f(a)) and (b, f(b)), and then finding the area under the straight line, which is the area of the trapezoid. The resulting formula becomes:

lim(a→b) ∫ f(x)d(x) = (b-a)/2[f(a) + f(b)]

Write a function trapezint1( f, a,b) that returns this approximation to the integral. The argument f is a Python implementation f(x) of the mathematical function f(c). For instance, the result of trapezint1( math. sin,0,0.5* math. pi ) should be 0.7854 (with some numerical error). The result of trapezint1( abs, -1,1 ) should be 2.0.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:10
10. when you create a pivottable, you need to specify where to find the data for the pivottable. is it true
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
The next button in the review section shows the next available comment. next slide with no comment. previous comment. edited comment.
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
question
Computers and Technology, 23.06.2019 03:30
Hashtags serve to identify the topic of a given tweet true false
Answers: 2
You know the right answer?
An approximation to the integral of a function f(x) over an interval [a, b] can be found by first ap...
Questions
question
Mathematics, 28.06.2020 20:01
question
Mathematics, 28.06.2020 20:01
question
Mathematics, 28.06.2020 20:01
Questions on the website: 13722360