Let’s say you have some nonlinear function that you plug into a root solver to get all the roots
// where the maximum number of real roots possible <=
N = 3)
Then you sweep this function over
M other values to get an array of
M root lists (each of size
Is there a way to automatically distinguish the families of roots (i.e. assuming there are at most N families)
- can you create separate lines for the two families below
- so you don’t have a saw-tooth looking function?
Is this a julia question or should it go into one of the domain categories?
Sorry, dropping it into
If I understand correctly, you are working on a parametric rootfinding problem.
In general, given some regularity assumptions, once you have the roots for a particular parameter you can use homotopy continuation methods to find the “same” root for other parameters. I am not aware of a Julia package, but writing one is on my summer todo list.
You are asking about “numerical continuation”. The standard software is Auto, which desperately needs rewriting in Julia…
To clarify, the name of the software is “Auto”, principal author Eusebius Doedel.
Once you have one solution, change the parameter a bit and look for the solution that is close. In that way you trace that “branch” of solutions. Then use the other one and trace its branch.
Thanks for the help! I solved my simple example with this code:
cur_array has dimensions:
Before explaining it quick, here are the pretty pictures (where markers denote root id):
Now the quick explanation.
- we find roots using
Roots.jl (you’d have to use my branch that allows the function to go complex in some regions)
- we piece together all the points that display the max root count (obviously a big assumption!)
- we fit the curves using a quadratic polynomial // i.e. a parabola
- each new point is added to the closest polynomial with some pretty loose discretion
Obviously this is too simple, but it is a step in the right direction
// with no optimization (premature or otherwise)
edit: one way to optimize it for sure would be tracking roots and only doing
find_zeros on mystery areas – i.e.
[a, min_root) and