.claude/skills/complex-root-finding/SKILL.md
Find genuine complex roots of chebfuns using Chebfun ellipse filtering to avoid spurious roots, and control accuracy with recursion settings. Use when locating complex zeros of functions defined on real intervals.
npx skillsauth add ShaneLogic/SolarLab complex-root-findingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A polynomial approximating a fun on an interval (e.g., [-1, 1]) will have complex roots that are spurious - unrelated to the actual function due to approximation properties.
% Find genuine complex roots near the interval
f = chebfun(@(x) exp(x) - 2, [-1, 1]);
roots_complex = roots(f, 'complex');
roots(f, 'all')For interval [-1, 1] and fun length L:
(z + 1/z) / 2|z| = r where r^(-L) = deltadelta = sqrt(eps) (Chebfun tolerance)The ellipse is the image of this circle under the map.
Complex roots lose accuracy as they move away from the definition interval:
For complicated chebfuns with many complex roots:
% Standard computation (may miss some roots)
r1 = roots(f, 'complex');
% With recursion control (more accurate, slower)
r2 = roots(f, 'complex', 'norecursion');
| Setting | Speed | Accuracy | |---------|-------|----------| | Default | Fast | May miss roots near interfaces | | 'norecursion' | Slower | Better accuracy, fewer misses |
% Check accuracy by evaluating at roots
residuals = abs(f(r2));
max_residual = max(residuals);
% Lower residuals indicate better accuracy
development
Understand and comply with Driftfusion software licensing terms, including the open-source AGPL v3.0 frontend and proprietary MATLAB pdepe solver backend. Use when using, modifying, or distributing Driftfusion code.
development
Initialize the Driftfusion simulation environment and create parameter objects. Use this skill when starting a new MATLAB session or setting up device properties for simulation.
development
Define device layer structure, configure spatial and time meshes, and build device structures with interface grading. Use this skill when setting up the physical geometry and discretization of a simulation device.
research
Analyze simulation solutions, calculate physical quantities, and generate plots. Use this skill when processing completed simulations, extracting currents/densities, or visualizing results.