root-finding
SolidProblem-solving strategies for root finding in numerical methods
AI & Automation 3,795 stars
297 forks Updated 4 months ago MIT
Install
Quality Score: 86/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Root Finding
## When to Use
Use this skill when working on root-finding problems in numerical methods.
## Decision Tree
1. **Characterize the Problem**
- Single root or multiple roots?
- Bracketed (know interval containing root)?
- Derivatives available?
2. **Method Selection**
| Situation | Method | Implementation |
|-----------|--------|----------------|
| Bracketed, no derivatives | Bisection, Brent | `scipy.optimize.brentq` |
| Derivatives available | Newton-Raphson | `scipy.optimize.newton` |
| No derivatives | Secant method | `scipy.optimize.newton` (no fprime) |
| System of equations | `scipy.optimize.fsolve` | Requires Jacobian ideally |
3. **Implement Root Finding**
- `scipy.optimize.brentq(f, a, b)` - guaranteed convergence if bracketed
- `scipy.optimize.newton(f, x0, fprime=df)` - quadratic convergence near root
- For systems: `scipy.optimize.fsolve(F, x0)`
4. **Handle Multiple Roots**
- Deflation: divide out found roots
- Multiple starting points
- `sympy_compute.py solve "f(x)" --var x` for symbolic solutions
5. **Verify Solutions**
- Check |f(root)| < tolerance
- Verify root is in expected domain
- `z3_solve.py prove "f(root) == 0"`
## Tool Commands
### Scipy_Brentq
```bash
uv run python -c "from scipy.optimize import brentq; root = brentq(lambda x: x**2 - 2, 0, 2); print('Root:', root)"
```
### Scipy_Newton
```bash
uv run python -c "from scipy.optimize import newton; root = newton(lambda x: x*...
Details
- Author
- parcadei
- Repository
- parcadei/Continuous-Claude-v3
- Created
- 5 months ago
- Last Updated
- 4 months ago
- Language
- Python
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Solid
root-finding
Problem-solving strategies for root finding in numerical methods
496 Updated 1 months ago
vibeeval AI & Automation Solid
numerical-integration
Problem-solving strategies for numerical integration in numerical methods
3,795 Updated 4 months ago
parcadei AI & Automation Listed
prime-numbers
Problem-solving strategies for prime numbers in graph number theory
3,795 Updated 4 months ago
parcadei AI & Automation Solid
gradient-methods
Problem-solving strategies for gradient methods in optimization
2,210 Updated 1 weeks ago
foryourhealth111-pixel AI & Automation Solid
gradient-methods
Problem-solving strategies for gradient methods in optimization
3,795 Updated 4 months ago
parcadei