Skip to content

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.

License

Notifications You must be signed in to change notification settings

aloramercer/Integral-Calculation-Using-Reiman-Sums

Repository files navigation

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:

Requirements:

  • C++ compiler

  • Standard C++ library

    Note

    ! Please check the Instructions document for more information.

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages