contour-integrals

Select contours and apply the Residue Theorem with SymPy for contour integrals.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides strategies and tools for solving contour integrals in complex analysis, simplifying complex mathematical computations.

Core Features & Use Cases

  • Integral Type Selection: Guides the choice of contour based on the integral's form (e.g., improper integrals, trigonometric functions, branch cuts).
  • Residue Theorem Application: Facilitates the use of the Residue Theorem for calculation.
  • Tool Integration: Leverages sympy_compute.py for symbolic computation of poles and residues.
  • Use Case: Calculate the definite integral of a function from negative infinity to positive infinity using a semicircular contour and the Residue Theorem.

Quick Start

Use the contour-integrals skill to compute the integral of 1/(x^2 + 1) from -infinity to infinity.

Frequently Asked Questions about contour-integrals

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

FAQPage Schema
How do I calculate contour integrals using the residue theorem?

Contour integrals are calculated by applying the residue theorem, where the skill identifies poles and computes residues using SymPy to evaluate the integral over a chosen closed contour.

When should I use a semicircular versus a keyhole contour for complex integrals?

Semicircular contours suit improper integrals from negative to positive infinity, while keyhole contours handle integrands with branch cuts. The skill guides contour selection based on the integrand's properties.

Can I use SymPy to compute poles and residues for complex analysis problems?

Yes, the skill integrates with SymPy through a computational script to perform symbolic computation of poles and residues, automating the mathematical steps required for the residue theorem.

What is the best way to evaluate improper integrals of rational functions in complex analysis?

Evaluating improper integrals of rational functions is best done by closing the contour in the upper or lower half-plane and summing the residues of the enclosed poles using the residue theorem.

Does this approach work for integrals involving trigonometric functions and branch cuts?

Yes, the skill supports contour selection for integrals involving trigonometric functions and branch cuts, recommending appropriate contours like the unit circle or keyhole contour respectively.

Why does my contour integral calculation not match the expected result?

Incorrect contour integral results often stem from choosing the wrong contour type or missing poles during residue computation. The skill helps verify pole locations and contour selection.