Skip to main content

Numerical ODE Solver

This project is a Python implementation for solving ordinary differential equations (ODEs) numerically. The script allows users to choose between two methods: Euler's Method and Runge-Kutta 4th Order Method (RK4), providing a visual representation of the solution (optional). Note: Euler's Method is more inaccurate than RK4.

Requirements

Python version >= 3.8

Ensure the following Python libraries are installed:

Install it using pip:

pip install numODEsolver

Example

import numODEsolver as ns
import matplotlib.pyplot as plt #optional for plot

solver = ns.Solver()
f = solver.get_function("y") 
values = solver.rk4_1order(f,x0=0,y0=1,n=10000,bound=10.1)
n = solver.get_value(values,val=10,dec=5)
print(n)
plt.plot(results[:,0],results[:,1])
plt.show()
from numODEsolver import solver

solver = ns.Solver()
f = solver.get_function("y'+y") #y' = for 1st derivative. The ode would be y'' = y'+y
x,y,dy = solver.euler_2order(f,x0=0,y0=1,dy0=1,n=10000,bound=5)
n = solver.get_value(values,val=3,dec=2)
print(n)

Version History

  • 8.12.2024 - v0.1 -> only 1st order ODE's are solvable, more features coming soon
  • 15.12.2024 - v0.2 -> removed plot function
  • 26.1.2025 - v0.3 -> included 2nd order methods, see more on GitHub
  • 18.03.2025 - v2.0 -> more secure function handeling, more stable numerical methods.

For more documentation take a look at the source code on my GitHub.

You can modify the script to add more methods, or change visualization settings.

Contributions and suggestions are welcome!

Lukas

Metadata

Release files for numODEsolver 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for numODEsolver 2.0.0
File Size Uploaded Provenance Actions
numodesolver-2.0.0.tar.gz 3.6 kB Without provenance Details for numodesolver-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for numODEsolver 2.0.0
File Interpreter ABI Platform Actions
numodesolver-2.0.0-py3-none-any.whl Python 3 none any Details for numodesolver-2.0.0-py3-none-any.whl

Total release size: 7.6 kB

Release files / numodesolver-2.0.0.tar.gz

Download URL numodesolver-2.0.0.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f7ae18540bd56622399f6c7706c32ee948ad0fad05c8d662b4c889ed333d6af6
BLAKE2b-256 checksum
How to use checksums
3e5a624da5c60e0c6b65c559d17cc5d321b0f657a4df243e19c7ae930d84cb2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Release files / numodesolver-2.0.0-py3-none-any.whl

Download URL numodesolver-2.0.0-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c9e5feaa232db37dddea1eb0b2882255fbe5d3a13d02a42e4a03450aed26fb2
BLAKE2b-256 checksum
How to use checksums
da7ee9880dcd174d6362e1a7edb262b8dc5ce5c2bbe3c8f2da5293adcb7b4c46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Security for numODEsolver 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page