Skip to content
cccskills
FreePublished on GitHub

residues

Solve complex analysis problems by choosing residue calculations for different singularities, points where a function is not analytic. The skill covers limits, derivatives, Laurent series, and contour integrals using the residue theorem, with Sympy and Z3 command examples.

OriginalShow the original description

Problem-solving strategies for residues in complex analysis

See how to install

Good for

  • Calculating residues at simple and higher-order poles
  • Determining the order of a pole
  • Finding residues at essential singularities using Laurent series
  • Evaluating contour integrals with the residue theorem

Files included (2)

  • SKILL.md3.8 KB
  • SKILL.v6.md2.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Residues

When to Use

Use this skill when working on residues problems in complex analysis.

Decision Tree

  1. Computing Residues

    • Simple pole at z0:
      • Res(f, z0) = lim_{z->z0} (z - z0)f(z)
      • sympy_compute.py limit "(z - z0)*f(z)" --var z --at z0
    • Pole of order n:
      • Res(f, z0) = (1/(n-1)!) * lim d^{n-1}/dz^{n-1}[(z-z0)^n f(z)]
      • sympy_compute.py diff "((z-z0)**n)*f(z)" --var z --order n-1
    • L'Hopital shortcut for f = g/h with simple pole:
      • Res(f, z0) = g(z0)/h'(z0)
  2. Identify Pole Order

    • Simple pole: (z - z0)f(z) has finite limit
    • Order n: (z - z0)^n f(z) has finite limit, but (z - z0)^{n-1} f(z) doesn't
    • sympy_compute.py limit "(z - z0)**n * f(z)" --var z --at z0
  3. Essential Singularities

    • Neither pole nor removable (e.g., e^{1/z} at z=0)
    • Compute residue via Laurent series
    • sympy_compute.py series "exp(1/z)" --var z --at 0
  4. Apply Residue Theorem

    • oint_C f(z)dz = 2pii * (sum of residues inside C)
    • Count only poles INSIDE the contour
    • z3_solve.py prove "pole_inside_contour"

Tool Commands

Sympy_Residue

uv run python -m runtime.harness scripts/sympy_compute.py residue "1/((z-1)*(z-2))" --var z --at 1

Sympy_Limit

uv run python -m runtime.harness scripts/sympy_compute.py limit "(z - z0)*f(z)" --var z --at z0

Sympy_Laurent

uv run python -m runtime.harness scripts/sympy_compute.py series "exp(1/z)" --var z --at 0

Z3_Pole_Inside

uv run python -m runtime.harness scripts/z3_solve.py prove "abs(z0) < R"

Key Techniques

From indexed textbooks:

  • [Complex analysis an introduction to... (Z-Library)] The fact that the calculus of residues yields complex rather than real integrals is no dis¬ (49) with g(z) — z, we obtain <»» i>(”)=25 / f^w) = 2vi / /'() /(z) - w z dz. If (49) is applied with g(z) = zm, equation (50) is replaced by 2iri I |z-zo| = /'() f(z) - w zm dz. The right-hand member represents an analytic function of w for \w — ir0| < 8.
  • [Complex analysis an introduction to... (Z-Library)] What are the possible values of r dz J /l — z2 over a closed curve in the region? THE CALCULUS OF RESIDUES The results of the preceding section have shown that the determination of line integrals of analytic functions over closed curves can be reduced to the determination of periods. Under certain circumstances it turns out that the periods can be found without or with very little computation.
  • [Complex analysis an introduction to... (Z-Library)] Hint: Sketch the image of the imaginary axis and apply the argument principle to a large half disk. Evaluation of Definite Integrals. The calculus of residues pro¬ vides a very efficient tool for the evaluation of definite integrals.
  • [Complex analysis an introduction to... (Z-Library)] The particular function 1 /(z — ay) has a vanishing period. The constant Rj which produces this result is called the residue of f(z) at the point ay. We repeat the definition in the following form: It is helpful to use such self-explanatory notations as R = Res!
  • [Complex Analysis (Elias M. Stein, Ram... (Z-Library)] Cauchy, 1826 There is a general principle in the theory, already implicit in Riemann’s work, which states that analytic functions are in an essential way charac- terized by their singularities. That is to say, globally analytic functions are “eectively” determined by their zeros, and meromorphic functions by their zeros and poles. While these assertions cannot be formulated as precise general theorems, there are nevertheless signicant instances where this principle applies.

Cognitive Tools Reference

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

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Coordinate background agents through saved files, keeping lengthy work transcripts out of the main conversation. It defines how to pass results between agents, monitor progress, and verify completed work with tests.

  • Keeping long agent transcripts out of the main conversation
  • Passing research and plans between agents through files
  • Checking for stalled background agents
parcadei/Continuous-Claude-v33.9KUpdated Jan 27, 2026

Delegate implementation, file reading, and testing to separate agents, then bring concise summaries back to the main conversation. The rules explain when delegation helps and when a small edit is better handled directly.

  • Implementing a feature across multiple files
  • Completing a specific phase of an implementation plan
  • Delegating feature development and testing
parcadei/Continuous-Claude-v33.9KUpdated Jan 27, 2026

agentic-workflow

FreeSummary

Organize implementation work across research, planning, validation, implementation, and review agents. Each stage passes files to the next, while implementation starts with failing tests and the main conversation coordinates the workflow.

  • Dividing implementation work among specialized agents
  • Checking a plan against research before implementation
  • Writing failing tests before implementing changes
parcadei/Continuous-Claude-v33.9KUpdated Jan 27, 2026

Connect Agentica SDK agents to Claude Code CLI through a proxy, an intermediary server. Use setup and debugging guidance to address file permissions, streamed responses, result formatting, and agents reporting success without performing the requested operations.

  • Connecting Agentica agents to Claude Code tools
  • Investigating file write and edit permission errors
  • Debugging streaming and REPL response formats
parcadei/Continuous-Claude-v33.9KUpdated Jan 27, 2026

Consult Agentica APIs when building workflows where multiple AI agents cooperate. This reference covers eleven coordination patterns, agent tracking, shared state, handoffs, and ways to combine results, with pointers to detailed API specifications.

  • Choose a coordination pattern for multiple agents
  • Check pattern constructors and methods
  • Implement custom coordination patterns
parcadei/Continuous-Claude-v33.9KUpdated Jan 27, 2026

agentica-prompts

FreeSummary

Write clearer instructions for Agentica and REPL agents by specifying roles, file operations, and output formats. Includes templates for dividing research, coordinating specialists, reviewing solutions, and passing results between agents through files.

  • Clarifying instructions for reading and editing files
  • Dividing research among multiple agents
  • Passing findings and plans between agents
parcadei/Continuous-Claude-v33.9KUpdated Jan 27, 2026

See all skills by parcadei

Report a problem with this skill