Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Problem-solving strategies for root finding in numerical methods
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | -3% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 24% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 131% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 5% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 8% | 0% |
Use this skill when working on root-finding problems in numerical methods.
| 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 |
scipy.optimize.brentq(f, a, b) - guaranteed convergence if bracketedscipy.optimize.newton(f, x0, fprime=df) - quadratic convergence near rootscipy.optimize.fsolve(F, x0)sympy_compute.py solve "f(x)" --var x for symbolic solutionsz3_solve.py prove "f(root) == 0"bashuv run python -c "from scipy.optimize import brentq; root = brentq(lambda x: x**2 - 2, 0, 2); print('Root:', root)"
bashuv 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)"
bashuv run python -m runtime.harness scripts/sympy_compute.py solve "x**3 - x - 1" --var x
From indexed textbooks:
See .claude/skills/math-mode/SKILL.md for full tool documentation.
Other measured skills in the registry, with their headline benchmark lift.