name: numerical-investigation description: Complete guide for numerical mathematical investigations. Conducts structured interview to understand background, designs implementation and tests, creates detailed plan, then executes code, testing, and reporting. license: Apache-2.0 metadata: version: "1.0" category: math
Mathematical Numerical Investigation
Guide users through complete numerical investigations from problem understanding to final report.
When to Use
- User wants to numerically test mathematical behavior
- Checking asymptotic limits or convergence
- Verifying conjectures computationally
- Extending analysis (e.g., n=1 to n=2)
- Parameter sweeps or existence checks
Three-Phase Workflow
Phase 1: Interview - Understand Background
Ask clarifying questions to understand the problem:
1. Core Question
- What mathematical behavior are you testing?
- What's the main conjecture or hypothesis?
2. Mathematical Setup
- What objects, maps, equations are involved?
- What are the key parameters?
- What varies, what's fixed?
3. Scenarios to Test
- What specific cases should be checked?
- Expected outcomes vs possible failures?
- Edge cases or special values?
4. Background Reading
- Any notes, papers, or code to read first?
- Previous results to build on?
- Existing codebase to understand?
5. Success Criteria
- What does "success" look like numerically?
- What would be concerning?
- Quantitative thresholds?
Interview style: Conversational, use user's terminology, ask follow-ups.
Phase 2: Design - Create Investigation Plan
After understanding the problem, design the investigation:
1. Reading (if needed)
- Read provided materials
- Explore existing code
- Identify reusable components
2. Implementation Strategy
- Language: Python, Julia, Mathematica?
- Libraries needed
- Reuse vs rewrite existing code
3. Test Design
- What to compute
- Parameter ranges and sampling
- Initial guesses, edge cases
- Numerical tolerances
4. Output/Report Design
- Figures to generate
- Data formats
- Report structure
5. Code Organization
- Directory structure
- Configuration files
- Naming conventions
Then: Create detailed plan, iterate with user until approval.
Phase 3: Execute - Implement and Report
After plan approval:
1. Implementation
- Write code according to plan
- Set up directory structure
- Create configuration
2. Testing
- Run initial tests
- Verify convergence/correctness
- Check edge cases
3. Full Run
- Execute complete investigation
- Generate all outputs
- Collect data
4. Report Generation
- Create figures
- Write summary
- Interpret results
- Deliver to user
Use agents/subtasks for long computations, parallel testing, visualizations.
Resources
references/interview-guide.md- Detailed Phase 1 questionsreferences/design-guide.md- Phase 2 decision frameworkreferences/plan-template.md- Plan structure templatereferences/execution-checklist.md- Phase 3 checklist