JuliaSymbolics / JuliaSymbolics/Symbolics.jl

Error on defining integral on half line?

Open
#369 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
1.5k
Forks
189
Avg merge
18h 56m
Merged PRs (30d)
20

Description

I can't seem to define an integral on a half line:

```julia
julia> @parameters a
julia> Ia = Integral(a in DomainSets.HalfLine())
ERROR: MethodError: in(::Num, ::HalfLine{Float64}) is ambiguous. Candidates:
in(x, d::HalfLine) in DomainSets at /home/simon/.julia/packages/DomainSets/BAZzY/src/domains/interval.jl:112
in(v, I::IntervalSets.TypedEndpointsInterval{:closed, :open, T} where T) in IntervalSets at /home/simon/.julia/packages/IntervalSets/VeVgo/src/IntervalSets.jl:127
in(variable::Union{Num, Sym, Term}, domain::Domain) in Symbolics at /home/simon/.julia/packages/Symbolics/4fQ5C/src/domains.jl:9
Possible fix, define
in(::Union{Num, Sym, Term}, ::HalfLine)
Stacktrace:
[1] top-level scope
@ none:1
```

┆Issue is synchronized with this [Trello card](https://trello.com/c/KR8bWtsO) by [Unito](https://www.unito.io)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure with @parameters a and Integral(a in DomainSets.HalfLine()), then inspect the conflicting in methods from DomainSets, IntervalSets, and Symbolics shown in the error. Done means defining the half-line integral no longer raises an ambiguous-method error, with a regression test covering this expression.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.