RootFinding
Finding zeros of systems of multivariable functions
Install / Use
/learn @tylerjarvis/RootFindingREADME
YRoots
YRoots is a Python package designed for numerical rootfinding of multivariate systems of equations.
For a tutorial on YRoots syntax, set-up and examples on how to use it with different function systems, see YRoots Tutorial and for a more detailed demonstration of the code's capabilities on solving more challenging problems, see YRoots Demo.
Documentation is posted at https://tylerjarvis.github.io/RootFinding/
This project was supported in part by the National Science Foundation, grant number DMS-1564502.
<!-- [](https://travis-ci.com/tylerjarvis/RootFinding) --> <!-- [](https://codecov.io/gh/tylerjarvis/RootFinding) --> <!-- [](https://badge.fury.io/py/RootFinding) --> <!-- [](https://landscape.io/github/tylerjarvis/RootFinding/pypackage) --> <!-- [](https://travis-ci.com/tylerjarvis/RootFinding) --> <!-- [](https://codecov.io/gh/tylerjarvis/RootFinding) --> <!-- [](https://badge.fury.io/py/RootFinding) --> <!-- [](https://landscape.io/github/tylerjarvis/RootFinding/pypackage) -->Requirements
At least:
- Python 3.10
- Pip 21.1
- Numpy 1.22.0
- Numba 0.37.0
- Scipy 1.10.0
- Sympy 1.5.1
Installation
$ pip install git+https://github.com/tylerjarvis/RootFinding.git
The package can then by imported using import yroots.
(We are currently working on adding the yroots package to The Python Package Index)
Usage
#imports
import numpy as np
import yroots as yr
#define the functions -- must be smooth on the domain and vectorized
f = lambda x,y : np.sin(x*y) + x*np.log(y+3) - x**2 + 1/(y-4)
g = lambda x,y : np.cos(3*x*y) + np.exp(3*y/(x-2)) - x - 6
#define a search domain
a = np.array([-1,-2]) #lower bounds on x and y
b = np.array([0,1]) #upper bounds on x and y
#solve
yr.solve([f,g],a,b)
If the system includes polynomials, there are specialized Polynomial objects which may be allow for faster solving. See YRoots Tutorial and YRoots Demo for more details.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
