-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Computing bounds on a function over an interval #99
Comments
It should be consistent with vectors, that is, julia> extrema([1,5,2])
(1, 5) means |
Fine, but how would I limit the interval within which to compute the bounds? This sort of makes sense to me: extrema(B[Inclusion(a..b),:]*coeffs) |
That interface works well, but it turned out trickier than anticipated to compute good bounds; they need to be rather tight for IntervalRootFinding.jl to function. EDIT: I had to go with |
This is a bug. Note that |
Background:
I want to find all zero crossings of a function, expanded over a basis. I decided I'd give IntervalRootFinding.jl a shot. In essence,
IntervalRootFinding.roots
needs to evaluate the function (and its derivative) on an intervalx
and expects an intervaly
back which holds the minimum and maximum values attained by the function (derivative) onx
.Now, since my function is expressed as a linear combination of basis functions, my best idea so far is to find the corresponding interval
y_i
for thei
th basis function, multiply this interval by the expansion coefficient (which will flip the interval if the coefficient is negative) and sum all the minima and maxima. We cannot simply use the union of the intervals since two functions on top each other would necessarily increase the interval. At the same time, for two disjoint functions, adding the intervals would make the bound looser than it necessarily needs to be. Is there a way to find a tighter bound?How would the interface for finding the extrema of each basis function over an interval look like? If
B isa Basis
, with continuous first dimension,extrema(B, interval)
could e.g. return a vector of intervals, but I am not sure if this is the best way. It would also be dependent on which particular implementation ofInterval
one chooses (IntervalSets.jl, IntervalArithmetic.jl, etc.).Finally, is there a more clever way to find roots than this?
The text was updated successfully, but these errors were encountered: