Root finding

From parcadei/Continuous-Claude-v3 · View interactive version

Root finding is an AI agent skill from the GitHub repository parcadei/Continuous-Claude-v3. Problem-solving strategies for root finding in numerical methods

How to use this skill

Skill file

Root Finding

When to Use

Use this skill when working on root-finding problems in numerical methods.

Decision Tree

  1. Characterize the Problem
  1. 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 |

  1. Implement Root Finding
  1. Handle Multiple Roots
  1. Verify Solutions

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:

Cognitive Tools Reference

See .claude/skills/math-mode/SKILL.md for full tool documentation.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.