This repository collects small, self‑contained physics and numerical simulation projects intended for learning, teaching, and quick experimentation. Each subfolder contains one or more Jupyter notebooks plus a focused README that explains the underlying mathematics and how to run the code.
-
mProject_0/— Projectile motion- Constant‑gravity projectile motion in 2D without air resistance.
- The theoretical trajectory of a projectile launched with initial speed
v0and angleθ(from horizontal) is:x(t) = v0 cos(θ) · ty(t) = y0 + v0 sin(θ) · t − 0.5 g t²
- The notebook compares numerical trajectories with these analytic expressions and explores how the range
R = (v0² · sin(2θ)) / gdepends on launch angle.
-
mProject_1/— Random walk- 2D random walk (drunkard’s walk) with independent steps in
xandy. - Demonstrates that the typical displacement after
Nsteps scales like:<r²>^(1/2) ∝ √Nwhich is a fundamental result in diffusion and stochastic processes.
- 2D random walk (drunkard’s walk) with independent steps in
-
Numerical Analysis/— Numerical methods and dynamical systemsNumerical_Integration.ipynb: Approximates integrals of the formI = ∫_a^b f(x) dxusing the trapezoidal and Simpson rules, and compares numerical errors as the step sizehis refined.
Root_Finding.ipynb: Solves nonlinear equationsf(x) = 0using bisection and Newton–Raphson iterations, for examplex_(k+1) = x_k − f(x_k) / f'(x_k).
Logistic Map.ipynb: Iterates the logistic mapx_(n+1) = r x_n (1 − x_n)and builds a bifurcation diagram showing period‑doubling and chaos as the control parameterrvaries.
See the README in each subfolder for more detailed mathematical background and notebook‑specific instructions.
- Python 3.8+
numpymatplotlib- A Jupyter environment (
jupyterlabornotebook)
You can install dependencies either from requirements.txt (if present) or manually:
pip install numpy matplotlib jupyterlab- Create and activate a virtual environment (recommended).
- Install dependencies, e.g.
or
pip install -r requirements.txt
pip install numpy matplotlib jupyterlab
- Start Jupyter in the repository root:
or
jupyter lab
jupyter notebook
- Open the notebook of interest (e.g.
mProject_0/Projectile.ipynb) and run the cells from top to bottom.
Each project README suggests experiments and parameter changes to help you explore the underlying physics or numerical method.