Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aloramercer/integral-calculation-using-reiman-sums
This project is for calculating the area under the curve of a function over a specified interval. It uses Left Hand Rule, Right Hand Rule, and Midpoint Rule to estimate the integral.
https://github.com/aloramercer/integral-calculation-using-reiman-sums
calculate-area cpp curved function integral project
Last synced: 11 days ago
JSON representation
This project is for calculating the area under the curve of a function over a specified interval. It uses Left Hand Rule, Right Hand Rule, and Midpoint Rule to estimate the integral.
- Host: GitHub
- URL: https://github.com/aloramercer/integral-calculation-using-reiman-sums
- Owner: aloramercer
- License: mit
- Created: 2024-07-03T13:00:19.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-07-07T15:19:48.000Z (4 months ago)
- Last Synced: 2024-10-11T19:22:55.513Z (25 days ago)
- Topics: calculate-area, cpp, curved, function, integral, project
- Language: C++
- Homepage:
- Size: 731 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Integral Calculation Using Reiman Sums
## Description
This project is an implementation of numerical integration methods for calculating the area under the curve of the function f(x) = x^3 + 4x over a specified interval. It uses Left Hand Rule, Right Hand Rule, and Midpoint Rule to estimate the integral. The program prompts the user to input the interval endpoints and the number of subintervals, then calculates and displays the results for each method.## Features:
- Left Hand Rule integration
- Right Hand Rule integration
- Midpoint Rule integration
- User input for interval endpoints and number of subintervals
- Tabular display of results for each subinterval## Usage
1. Compile the program.
2. Run the program.
3. Enter the values for \( a \), \( b \), and \( n \) when prompted.
4. The program will calculate and display the integral using the Left Hand Rule, Right Hand Rule, and Midpoint Rule.## Example
If the user inputs:
- \( a = 1 \)
- \( b = 3 \)
- \( n = 4 \)The program will calculate the integral for the given function \( f(x) = x^3 + 4x \) over the interval \([1, 3]\) using the specified number of intervals.
## References
For more information on Reiman Sums and integral calculations, refer to the following resources:
- [Khan Academy: Riemann sums](https://www.khanacademy.org/math/ap-calculus-ab/ab-integration-new/ab-6-2/v/riemann-sums)
- [Paul's Online Math Notes: Riemann Sums](http://tutorial.math.lamar.edu/Classes/CalcI/RiemannSums.aspx)## Requirements:
- C++ compiler
- Standard C++ library## Note
! Please check the Instructions document for more information.