Random goodies and visualizations to help understand mathematical and other concepts.
This repository contains interactive SageMath applets and Python visualizations for teaching and learning fundamental concepts in calculus and linear algebra. Each topic includes the original SageMath code, a Python 3 translation (using matplotlib and numpy), generated visualization images, and a detailed explanation.
-
Newton's Method -- Iterative root-finding using tangent line approximations
-
Newton's Method (Animated) -- Step-by-step visual breakdown of each iteration
-
Taylor Expansion -- Successive polynomial approximations converging to sin(x) and e^x
-
Partial Fraction Decomposition -- Step-by-step decomposition of rational functions with optional row reduction (SageMath)
-
3D Surface with Level Curves -- Paraboloid x^2 + y^2 with horizontal level curve slices and contour plot
-
3D Surface with Cross Sections -- Paraboloid x^2 + y^2 with vertical cross-section slices
-
Gradient Descent for Linear Regression -- Gradient descent optimization with regression line and cost convergence plots
-
Linearization via Jacobian -- Comparing a nonlinear R^2 -> R^2 map with its Jacobian linear approximation
All Python scripts require Python 3 with matplotlib, numpy, and scipy:
pip install matplotlib numpy scipyThen run any visualization:
python3 calculus/newtons_method/newtons_method.py
python3 calculus/taylor_expansion_animated_dir/taylor_expansion.py
python3 linear_algebra/linearize_jacobian/linearize_jacobian.py
# etc.The original SageMath code can be run without installation on SageMathCell. Simply copy the contents of any sage_code file and paste it into the cell server.
GNU General Public License v3.0 -- see calculus/LICENSE.
Keivan Hassani Monfared (k1monfared)







