Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Im not understanding this python code s = 69704723 This question shows how to use the area of rectangles to estimate the definite integral of
Im not understanding this python code
s = 69704723
This question shows how to use the area of rectangles to estimate the definite integral of a function. Consider the definite integral, f(x) dz Divide the interval fron 1-a tol-b into n equal subintervals of length 1 each. Let ck be the midpoint in the k-th subinterval. For example, ci-a + ca-a + 1. . . . and c"-b-t Then the definite integral can be approximated by Recall that this is just the midpoint Riemann sum in Calculus1 Now take f(1)-12 and end points a 0, b-10. Approximate 10 using the above method. Requirement: define a function with name "Approxintegral" ### Solution to Question 2 def Approx.integral(n) Your codes The input n to the function is the number of subintervals used to approximated the definite integral. The function should return the above sum J(G). You should choose the number n such that E/(c.lar, r) da somi 0.001 Write the number n explicitly in the code. Note this implies that the error between the true value and the approximated value is tiny. The true value can be computed easilyStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started