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 04:30
Dr. wisteria is a prominent chiropractor in the chicago area. she wants to provide a forum for her patients to discuss their health concerns and to seek and offer advice to other patients. which telecommunications tool is most appropriate for dr. wisteria's needs?
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
Which of the following is an example of intellectual properly! oa. new version of a novelb. journal of ideasc. pages of a bookood. lines of a poem
Answers: 2
question
Computers and Technology, 24.06.2019 11:30
Why is body language an important factor in a business meeting
Answers: 1
question
Computers and Technology, 24.06.2019 23:00
The valves of the heart and veins are similar in that they both
Answers: 1
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
English, 05.01.2020 13:31
Questions on the website: 13722362