root-finding
Selects and implements appropriate numerical root-finding strategies for specific mathematical problem types.
Install
mkdir -p .claude/skills/root-finding && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4064" && unzip -o skill.zip -d .claude/skills/root-finding && rm skill.zipInstalls to .claude/skills/root-finding
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Problem-solving strategies for root finding in numerical methodsKey capabilities
- →Characterize root-finding problems
- →Select numerical methods based on problem type
- →Implement Scipy and Sympy solutions
- →Verify numerical results
How it works
The skill uses a decision tree to match problem characteristics like derivatives and bracketing to specific numerical algorithms.
Inputs & outputs
When to use root-finding
- →Solve for roots of non-linear equations
- →Implement Newton-Raphson or Brentq methods
- →Handle multiple roots in systems of equations
About this skill
Root Finding
When to Use
Use this skill when working on root-finding problems in numerical methods.
Decision Tree
-
Characterize the Problem
- Single root or multiple roots?
- Bracketed (know interval containing root)?
- Derivatives available?
-
Method Selection
Situation Method Implementation Bracketed, no derivatives Bisection, Brent scipy.optimize.brentqDerivatives available Newton-Raphson scipy.optimize.newtonNo derivatives Secant method scipy.optimize.newton(no fprime)System of equations scipy.optimize.fsolveRequires Jacobian ideally -
Implement Root Finding
scipy.optimize.brentq(f, a, b)- guaranteed convergence if bracketedscipy.optimize.newton(f, x0, fprime=df)- quadratic convergence near root- For systems:
scipy.optimize.fsolve(F, x0)
-
Handle Multiple Roots
- Deflation: divide out found roots
- Multiple starting points
sympy_compute.py solve "f(x)" --var xfor symbolic solutions
-
Verify Solutions
- Check |f(root)| < tolerance
- Verify root is in expected domain
z3_solve.py prove "f(root) == 0"
Tool Commands
Scipy_Brentq
uv run python -c "from scipy.optimize import brentq; root = brentq(lambda x: x**2 - 2, 0, 2); print('Root:', root)"
Scipy_Newton
uv run python -c "from scipy.optimize import newton; root = newton(lambda x: x**2 - 2, 1.0, fprime=lambda x: 2*x); print('Root:', root)"
Sympy_Solve
uv run python -m runtime.harness scripts/sympy_compute.py solve "x**3 - x - 1" --var x
Key Techniques
From indexed textbooks:
- [Numerical analysis (Burden R.L., Fair... (Z-Library)] How accurate was his approximation? C H A P T E R 2 Solutions of Equations in One Variable 2. Survey of Methods and Software In this chapter we have considered the problem of solving the equation f (x) = 0, where f is a given continuous function.
- [An Introduction to Numerical Analysis... (Z-Library)] Computational Solution of Nonlinear Operator Equations. Methods for Solving Systems of Nonlinear Equations. Society for Industrial and Applied Mathematics, Philadelphia.
- [An Introduction to Numerical Analysis... (Z-Library)] General polynomial rootfinding methods There are a large number of rootfind ing algorithms designed especially for polynomials. Many of these are taken up in detail in the books Dejon and Henrici (1969), Henrici (1974, chap. There are far too many types of such methods to attempt to describe them all here.
- [An Introduction to Numerical Analysis... (Z-Library)] J n Consider the product a 0 a 1 ••• am, where a 0 , a1, ••• , am are m + 1 num bers stored in a computer that uses n digit base fJ arithmetic. What is a rigorous bound for w? What is a statistical estimate for the size of w?
- [An Introduction to Numerical Analysis... (Z-Library)] Discussion of the Literature There is a large literature on methods for calculating the roots of a single equation. See the books by Householder (1970), Ostrowski (1973), and Traub (1964) for a more extensive development than has been given here. Newton's method is one of the most widely used methods, and its development is due to many people.
Cognitive Tools Reference
See .claude/skills/math-mode/SKILL.md for full tool documentation.
When not to use it
- →Problems outside of numerical root-finding
Limitations
- →Convergence depends on method selection and initial guesses
- →Requires understanding of numerical analysis concepts
How it compares
It provides a structured selection process for numerical methods rather than trial-and-error implementation.
Compared to similar skills
root-finding side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| root-finding (this skill) | 1 | 7mo | Review | Advanced |
| jupyter-notebook | 30 | 6mo | Review | Intermediate |
| sexp | 3 | 6mo | No flags | Advanced |
| r-code | 0 | 4mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by parcadei
View all by parcadei →You might also like
jupyter-notebook
davila7
Use when the user asks to create, scaffold, or edit Jupyter notebooks (`.ipynb`) for experiments, explorations, or tutorials; prefer the bundled templates and run the helper script `new_notebook.py` to generate a clean starting notebook.
sexp
atopile
How the Zig S-expression engine and typed KiCad models work, how they are exposed to Python (pyzig_sexp), and the invariants around parsing, formatting, and freeing.
r-code
dslc-io
Guide for writing R code. Use when writing new functions, designing APIs, or reviewing/modifying existing R code.
python-pandas
owenlamont
Write Pandas code to this project's standards — vectorised operations, Pandas-native types, and Pandera schemas. Use when importing or using pandas — transforming DataFrames or Series, handling missing values, or type-hinting tabular data.
quant-analyst
zenobi-us
Expert quantitative analyst specializing in financial modeling, algorithmic trading, and risk analytics. Masters statistical methods, derivatives pricing, and high-frequency trading with focus on mathematical rigor, performance optimization, and profitable strategy development.
stock-analyzer
FrancyJGLisboa
Provides comprehensive technical analysis for stocks and ETFs using RSI, MACD, Bollinger Bands, and other indicators. Activates when user requests stock analysis, technical indicators, trading signals, or market data for specific ticker symbols.