Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program: Riemann Sum. Your task in this assignment is to write a program that estimates the integration of a given mathematical function using the Riemann

Program: Riemann Sum.
Your task in this assignment is to write a program that estimates the integration of a given mathematical function using the Riemann sum method. After printing some introductory message to the screen, the program will prompt the user for 3 pieces of data that represent the lower limit, upper limit, and the step size. It will then use those three values to calculate the integral of the function
f(x)=3x3-2x2
between the provided limits using the provided step size.
Below is a sample run with the user input in red:
This program will calculate the integral of the function 3x???3-2x???2
between user defined limits: a and b
What is the value of "a": 1
What is the value of "b": 5
The accuracy of this calculation depends on the value
of n that you use.
What is the value of "n": 1
The integral over the provided limits is 1304.0
Here's output of another sample run (again, user input is shown in bold red):
This program will calculate the integral of the function
3x???3-2x???2
between user defined limits: a and b
What is the value of "a":1
What is the value of "b": 5
The accuracy of this calculation depends on the value
of n that you use.
What is the value of "n": 100
The integral over the provided limits is 378.8800000000008
image text in transcribed

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

Database Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

More Books

Students also viewed these Databases questions