# Question about Interval Root finding

**URL:** <https://discourse.julialang.org/t/question-about-interval-root-finding/57124>\
**Category:** General Usage\
**Tags:** roots\
**Created:** [March 14, 2021, 11:34am UTC](https://discourse.julialang.org/t/question-about-interval-root-finding/57124 "2021-03-14T11:34:25Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![lferrant](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lferrant/32/22751_2.png) [@lferrant](https://discourse.julialang.org/u/lferrant)\
**Post date:** [March 14, 2021, 12:43pm UTC](https://discourse.julialang.org/t/question-about-interval-root-finding/57124/3 "2021-03-14T12:43:23Z")

</div>

\emptyset represents the empty interval, as you can verify as follows

```julia
julia> rts = roots(f, -1e200..1e200)
4-element Vector{Root{Interval{Float64}}}:
 Root([15.0645, 15.0646], :unique)
 Root([11.1033, 11.1034], :unknown)
 Root(∅, :unique)
 Root([3.84464, 3.84465], :unique)

julia> a = rts[3].interval
∅

julia> isempty(a)
true

```

Since empty intervals cannot contain a root, you can safely remove it. I am not sure why the algorithm returns it though. I think empty intervals should be pruned away internally.

Note however, that `:unknown` means that the interval **may or may not** contain a root and the algorithm could not decide it, so in general you should not throw it away without some further thinking. In this case you can easily verify that the interval does not indeed contain a root as follows

```julia
julia> rts = roots(f, -1e200..1e200)
4-element Vector{Root{Interval{Float64}}}:
 Root([15.0645, 15.0646], :unique)
 Root([11.1033, 11.1034], :unknown)
 Root(∅, :unique)
 Root([3.84464, 3.84465], :unique)

julia> a = rts[2].interval
[11.1033, 11.1034]

julia> f(a)
[-2.00889e+08, -5.91418e+07]

julia> 0 ∈ f(a)
false

```

Since interval arithmetic sometimes overestimates the range but it never underestimates it, the last line is a rigorous proof that that interval does **not** indeed contain a root of the function and so it can be safely removed.

---

_[View the full topic](https://discourse.julialang.org/t/question-about-interval-root-finding/57124)._
