This repository contains implementations of two numerical integration techniques using MATLAB: Monte Carlo Integration and Gauss-Legendre Quadrature.
Numerical integration is a fundamental technique in applied mathematics and computational sciences. While exact analytical solutions to integrals may not always exist, numerical approaches can provide accurate approximations. This repository demonstrates two popular approaches:
- Monte Carlo Integration: A probabilistic method relying on random sampling.
- Gauss-Legendre Quadrature: A deterministic method using optimized sampling points (roots of Legendre polynomials).
Monte Carlo Integration estimates the value of an integral by using random samples. It is particularly useful for higher-dimensional integrals or when the integration domain is irregular.
Gauss-Legendre Quadrature is a more precise method, especially for integrals over fixed domains. It uses specific sample points and weights derived from the roots of Legendre polynomials to approximate the integral.
Report/writeup.pdf
: Summarizes the results of the numerical integration methods.src/Monte_Carlo_and_Gauss_Legendre_Integration.mlx
: Contains the MATLAB code implementing the Monte Carlo and Gauss-Legendre integration techniques.