One way to estimate the average value of a function on an interval is to split that interval into a number of evenly-spaced sub-intervals, N, add up the value of the function at each end point of a sub-interval (N+1 such end points in total), and then divide that sum by the total number of end points of sub-intervals. Write a function approximate_averagef(f, a, b, N) which uses the method de- scribed above to calculate, print out, and return an approximation to the average value of a given function f on an interval [a, b] using N + 1 end points of equally- spaced subintervals (i.e., N subintervals).

Algebra & Trigonometry with Analytic Geometry
13th Edition
ISBN:9781133382119
Author:Swokowski
Publisher:Swokowski
Chapter3: Functions And Graphs
Section3.2: Graphs Of Equations
Problem 78E
icon
Related questions
Question
One way to estimate the average value of a function on an interval is to split that
interval into a number of evenly-spaced sub-intervals, N, add up the value of the
function at each end point of a sub-interval (N+1 such end points in total), and then
divide that sum by the total number of end points of sub-intervals.
Write a function approximate_averagef(f, a, b, N) which uses the method de-
scribed above to calculate, print out, and return an approximation to the average
value of a given function f on an interval [a, b] using N + 1 end points of equally-
spaced subintervals (i.e., N subintervals).
Transcribed Image Text:One way to estimate the average value of a function on an interval is to split that interval into a number of evenly-spaced sub-intervals, N, add up the value of the function at each end point of a sub-interval (N+1 such end points in total), and then divide that sum by the total number of end points of sub-intervals. Write a function approximate_averagef(f, a, b, N) which uses the method de- scribed above to calculate, print out, and return an approximation to the average value of a given function f on an interval [a, b] using N + 1 end points of equally- spaced subintervals (i.e., N subintervals).
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Algebra & Trigonometry with Analytic Geometry
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
Calculus For The Life Sciences
Calculus For The Life Sciences
Calculus
ISBN:
9780321964038
Author:
GREENWELL, Raymond N., RITCHEY, Nathan P., Lial, Margaret L.
Publisher:
Pearson Addison Wesley,
College Algebra (MindTap Course List)
College Algebra (MindTap Course List)
Algebra
ISBN:
9781305652231
Author:
R. David Gustafson, Jeff Hughes
Publisher:
Cengage Learning