Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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.