root-finding

Select and implement root-finding algorithms like Bisection, Brent, Newton-Raphson, and Secant.

3.9k|296|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/parcadei/Continuous-Claude-v3 --skill root-finding-parcadei
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: root-finding
Source: https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/math/numerical-methods/root-finding
Command: npx skills add https://github.com/parcadei/Continuous-Claude-v3 --skill root-finding-parcadei

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires scipy, sympy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides strategies and tools for finding the roots of equations in numerical methods, addressing challenges like bracketed intervals, derivative availability, and multiple roots.

Core Features & Use Cases

  • Method Selection: Guides users to choose the appropriate root-finding algorithm (Bisection, Brent, Newton-Raphson, Secant) based on problem characteristics.
  • Implementation: Offers direct commands using scipy.optimize for common root-finding tasks.
  • Multiple Roots Handling: Includes techniques like deflation and symbolic solving for complex scenarios.
  • Verification: Emphasizes checking the accuracy and validity of found roots.
  • Use Case: When tasked with finding the specific value of 'x' where a complex function f(x) equals zero, this skill helps select and apply the most efficient numerical method.

Quick Start

Use the root-finding skill to find the root of the equation x^2 - 2 between 0 and 2 using the brentq method.

Frequently Asked Questions about root-finding

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find the root of an equation using scipy when I have a bracketed interval?

To find the root of an equation within a bracketed interval, use the Brent method via scipy.optimize.brentq. It requires two endpoints where the function changes sign to guarantee a valid root.

What's the best way to choose between Newton-Raphson and Secant methods for equation solving?

Choose Newton-Raphson for equation solving when you can supply derivatives, ensuring fast convergence. Use the Secant method when derivatives are unavailable, as it approximates them using secant lines.

How do numerical root finding methods handle equations with multiple roots?

Numerical root finding handles multiple roots using deflation techniques and symbolic solving with sympy. These strategies systematically isolate and verify each root to ensure accurate solutions for complex equations.

Can I use scipy for numerical root finding if my function is not continuous?

Scipy numerical root finding generally requires continuous functions for bracketed methods like Bisection. For non-continuous equations, convergence is not guaranteed, making solution verification critical to validate results.

Why does the Brent method require a sign change for root finding?

The Brent method requires a sign change because it combines bisection and inverse quadratic interpolation. This bracketing ensures the root finding algorithm remains bounded within the interval for reliable convergence.