SciML / SciML/SymbolicNumericIntegration.jl

Problems integrating complex functions

Open
#82 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Julia
Stars
130
Forks
11
Avg merge
4h 36m
Merged PRs (30d)
7

Description

Hi all,

Whenever I try to integrate a complex function, the package returns the error message:

ERROR: MethodError: ^(::Complex{Num}, ::Num) is ambiguous.

This happens, e.g., when I input:

integrate(cos(x)+2*im)

This is a bug, isn't it? Integrals such as

integrate(cos(x)+2)

do not give me any trouble.

Below you can find a full code that does not run.

Best regards,

Miguel

using Symbolics
using SymbolicNumericIntegration

@variables x
integrate(cos(x) +im)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the complete Julia reproducer from the issue and tracing the integration call that produces the ambiguous ^(::Complex{Num}, ::Num) MethodError. Compare it with integrate(cos(x) + 2); done means the complex expression integrates without that error and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.