Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/louis-finegan/second-order-ode
Solving second order ODEs and Systems of ODEs with scipy library.
https://github.com/louis-finegan/second-order-ode
calculus eigenvalues equilibrium-point matplotlib numerical-integration numpy ordinary-differential-equations python python3 scipy
Last synced: 10 days ago
JSON representation
Solving second order ODEs and Systems of ODEs with scipy library.
- Host: GitHub
- URL: https://github.com/louis-finegan/second-order-ode
- Owner: Louis-Finegan
- Created: 2023-02-07T14:01:37.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-21T11:44:54.000Z (about 1 year ago)
- Last Synced: 2024-12-06T09:10:23.275Z (2 months ago)
- Topics: calculus, eigenvalues, equilibrium-point, matplotlib, numerical-integration, numpy, ordinary-differential-equations, python, python3, scipy
- Language: Python
- Homepage: https://github.com/Louis-Finegan/Second-Order-ODE
- Size: 677 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Second Order ODEs and Systems of ODEs with `SciPy`
## Solves a second order Linear ODE
Takes the form:
$$\frac{d^2y}{dt^2} + a(t)\frac{dy}{dt} + b(t)y = c(t)$$
With initial conditions $y(0) = y_0$ and $y^\prime(0) = y^\prime_0$.
Coefficients are functions of $t$ and are defined in `second_order.ipynb`
`second_order_ode` module in the `solve.py` file in the `ode` directory, and is imported into `second_order.ipynb`.
## Solves a First Order System of ODEs
Takes the form:
$$\frac{dx}{dt} = F(x, y)$$
$$\frac{dy}{dt} = G(x, y)$$
With initial conditions $x(0) = x_0$ and $y(0) = y_0$.
$F$ and $G$ are defined in `first_order_system.ipynb`.
`first_order_system_2vars` module in the `solve.py` file in the `ode` directory, and is imported into `first_order_system.ipynb`.
Then for 3 variable systems, use the module `first_order_system_3vars`.
## Required packages and libaries1. `numpy`
2. `scipy` using the `integrate` module
3. `scipy` using the `optimize` module
3. `matplotlib` using the `pyplot` module