This repository contains several Python scripts and Jupyter notebooks for numerical analysis and solving differential equations. The tools included are focused on Fourier series, solving second-order ordinary differential equations (ODEs), and using the Euler method for ODEs. Additionally, there is a script for modeling uranium decay.
- Description: This Jupyter notebook is designed to generate and plot Fourier series.
- Contents:
- Import statements for necessary libraries (
numpy
,matplotlib.pyplot
). - A class
FourierSeries
that includes methods for initializing parameters and generating the series.
- Import statements for necessary libraries (
- Usage: Open the notebook in Jupyter and run the cells to see the implementation and plots.
- Description: This notebook provides a numerical solution for second-order ODEs.
- Contents:
- Import statements for
numpy
andmatplotlib.pyplot
. - A class
SecondOrderODESolver
that includes methods to set up and solve the differential equations.
- Import statements for
- Usage: Open the notebook in Jupyter and follow the provided steps to solve second-order ODEs.
- Description: This notebook provides a numerical solution for second-order ordinary differential equations (ODEs) using the Runge-Kutta 4th order (RK4) method.
- Contents:
- Import statements for numpy and matplotlib.pyplot.
- A class SecondOrderODESolver that includes methods to set up and solve the differential equations.
- Usage: Open the notebook in Jupyter and follow the provided steps to solve second-order ODEs.
- Description: This notebook explains and implements the Euler method for solving ODEs.
- Contents:
- Markdown cells with explanations of the Euler method.
- A class
Euler
with methods to implement the Euler method.
- Usage: Open the notebook in Jupyter to read the explanations and run the code cells to see the Euler method in action.
- Description: This Python script models the decay of uranium using a numerical approach.
- Contents:
- Import statements for
numpy
andmatplotlib.pyplot
. - A class
UraniumDecaySolver
with methods to simulate uranium decay over time.
- Import statements for
- Usage: Run the script in a Python environment to simulate uranium decay and generate plots.
To use the notebooks and scripts in this repository, follow these steps:
-
Clone the repository:
git clone <repository_url>
-
Install the necessary packages: Ensure you have
numpy
andmatplotlib
installed. You can install them using pip:pip install numpy pip install matplotlib
-
Run the notebooks:
- Open Jupyter Notebook or JupyterLab.
- Navigate to the directory containing the cloned repository.
- Open the desired
.ipynb
file and run the cells sequentially.
-
Run the Python script:
- Execute the
mathmodel.py
script in a Python environment:python mathmodel.py
- Execute the