This repository contains a collection of C++ programs implementing various numerical methods, developed as part of my 4th-year academic coursework at the University of Rajshahi. These programs solve problems in curve fitting, root finding, ordinary differential equations (ODEs), numerical integration, linear systems, interpolation, and partial differential equations (PDEs) mainly Heat equation and wave equation.
This project showcases my skills in C++ and numerical computing, applied to real-world mathematical problems. Each program is designed to be user-friendly, with input prompts and clear output formatting.
- Curve-Fitting: Polynomial curve fitting using Gaussian elimination.
- Root-Finding: Methods like Newton-Raphson, Bisection, and Iteration for solving equations.
- ODE-Solvers: Runge-Kutta (4th order), Euler, and Modified Euler for ODEs.
- Integration: Simpson’s 1/3, 3/8, and Trapezoidal rules for definite integrals.
- Linear-Systems: Jacobi, Gauss-Seidel, and Gauss Elimination for linear equations.
- Interpolation: Newton’s Divided Difference, Lagrange, Forward, and Backward interpolation.
- PDE-Solvers: Finite difference methods for 1D heat and wave equations.
- Interactive: Each program prompts for user input (e.g., points, initial conditions, accuracy).
- Accurate: Includes percentage error calculations for most methods.
- Well-Documented: Code comments explain key steps (to be enhanced in future updates).
- Academic Focus: Designed for educational purposes, with applications in computational mathematics.
- Clone the Repository:
git clone https://github.com/your-username/Numerical-Methods-CPP.git cd Numerical-Methods-CPP - Compile and Run:
- Use a C++ compiler (e.g., g++).
- Example for curve fitting:
g++ Curve-Fitting/curve_fit.cpp -o curve_fit ./curve_fit
- Dependencies: C++11 or later, standard libraries (
iostream,iomanip,cmath). - Input Format: Follow on-screen prompts to enter data (e.g., x/y values, initial guesses, step sizes).
Curve Fitting:
- Input: Number of points, x and y values.
- Output: Coefficients of a cubic polynomial.
Enter the number of points to be entered
4
Enter the x values
0 1 2 3
Enter the y values
1 2 4 8
The required polynomial is
y = 1.000000 + 0.500000x + 0.500000x^2 + 0.166667x^3- Add unit tests for each method.
- Include visualizations using libraries like Matplotlib (via Python bindings).
- Enhance documentation with mathematical explanations.
I’m an Applied Mathematics student at the University of Rajshahi, with interests in Mathematical Biology (Perticularly Epidemiology), Data Science, and AI Automation. Connect with me on LinkedIn: www.linkedin.com/in/soumitro-kumar-das or email me at [email protected].