Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 easily

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What aspects would it be impossible to capture?

Answered: 1 week ago

Question

Enhance your words with effective presentation aids

Answered: 1 week ago