You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A comprehensive collection of 30 Python programs implementing numerical methods for advanced calculus and mathematical analysis. Each program is self-contained, educational, and demonstrates step-by-step computation with clear output.
No external dependencies beyond NumPy — every algorithm is implemented from scratch.
# Clone the repository
git clone https://github.com/yourusername/python-calculus-analysis.git
cd python-calculus-analysis
# Install dependencies
pip install -r requirements.txt
# Run any single program
python src/01_root_finding/bisection.py
python src/06_ode_solvers/runge_kutta4.py
python src/08_advanced_analysis/heat_equation_1d.py
Output Example
Every program prints a formatted, step-by-step output. For example, bisection.py:
Bisection Method for f(x) = x^3 - x - 2
Searching on interval [1.000, 2.000]
Iter | a | b | f(a) | f(b) | c | f(c) | Error
-----|---------|---------|---------|---------|---------|----------|----------
1 | 1.00000 | 2.00000 | -2.0000 | 4.0000 | 1.50000 | -0.12500 | 0.50000
2 | 1.50000 | 2.00000 | -0.1250 | 4.0000 | 1.75000 | 1.35938 | 0.25000
...
Result: Root = 1.521379706799053 in 33 iterations
Running All Programs
# Run all 30 programs
python run_all.py
# Run only a specific category
python run_all.py 01 # Root Finding
python run_all.py 04 # Integration
python run_all.py 08 # Advanced Analysis
Requirements
Package
Version
Purpose
NumPy
>= 1.21.0
Array operations, linear algebra (verification only)
Python
>= 3.8
f-strings, type hints
Note: All numerical algorithms are implemented from scratch using only NumPy for array operations. No SciPy dependency is required.