Skip to content

Numerical Integration - Midpoint, Trapezoid, Simpson's 1/3 and Simpson 3/8 Rule using Python

License

Notifications You must be signed in to change notification settings

hamzakamelen/Numerical-Integration

Repository files navigation

Numerical Integration Methods

This is a university 4th Semester project that implements various numerical integration methods including Midpoint, Trapezoid, Simpson's 1/3 and Simpson 3/8 using Python and Streamlit.

Note: This is Team/Group Project

Team Members

  • Hamza Kamelen
  • Muzamil Khalid
  • Wajahat Tariq
  • Moiz Mansoori
  • Rayyan Ahmed
  • Muhammad Sami

Overview

This project provides an interactive web application to demonstrate and compare different numerical integration techniques, including:

  • Midpoint Rule
  • Simpson's 1/3 Rule
  • Simpson's 3/8 Rule
  • Trapezoidal Rule

The application allows users to input custom functions or discrete data points and visualizes the integration process.

Features

  • Interactive user interface built with Streamlit
  • Support for both continuous functions and discrete data points
  • Real-time calculation and visualization of integration results
  • Comparison of estimated values with actual integrals (for continuous functions)
  • Error calculation and display

Requirements

To run this project, you need the following Python libraries:

  • streamlit
  • numpy
  • matplotlib
  • scipy

You can install these dependencies using the provided requirements.txt file.

Usage

  1. Clone this repository
  2. Install the required dependencies:
  3. pip install -r requirements.txt
  4. Run the Streamlit app:

Project Structure

  • main.py: The main Streamlit application
  • Trapezoidal.py: Implementation of the Trapezoidal Rule
  • simpson_1_3.py: Implementation of Simpson's 1/3 Rule
  • simpson_3_8.py: Implementation of Simpson's 3/8 Rule
  • midpoint.py: Implementation of the Midpoint Rule
  • requirements.txt: List of required Python packages

License

This project is open-source and available under the MIT License.