Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using c++ Write a program that reads in values double a and double b, the boundaries of the inter- val [a, b, and the number

image text in transcribedimage text in transcribed

using c++

Write a program that reads in values double a and double b, the boundaries of the inter- val [a, b, and the number of subintervals unsigned int n and then computes approzimately the value for the definite integral 325r dr which is equal to (b365) (a3 a5), using the left Riemann sum. The program must print out the numerically computed value and the error of the numetical integration; see the explanation below Explanation: Recall that the integral f(x)dr is the area under the graph of the function f(x) on the interval [a, , whenever the function f(r) is nonnegative. If f(r) takes both positive and negative values, then the integral represents a signed area, comprising of the difference of the areas above and below the graph of f(r). The integral can be computed approximately using a numerical procedure. Given an integer n n>0, define ha band let a be a grid of points on the interval [a, b]. Then the integral can be approximated as follows f(x) dr Ln-(i -ro)f(ro) (2) f().+(n-n-1)-f(rn-1) The sum Ln is called the left Riemann sum, it is the sum of the areas of n rectangles. The error of numerica l integration is then defined by

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_2

Step: 3

blur-text-image_step3

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

KEY QUESTION Refer to columns 1 and 6 in the table for question

Answered: 1 week ago