Borrar filtros
Borrar filtros

Fixing the root of polynomial

2 visualizaciones (últimos 30 días)
Yahor
Yahor el 12 de Jun. de 2014
Comentada: Yahor el 13 de Jun. de 2014
Hello,
I have 4th power polynomial with complex coefficients and parameter a. Real part of one root is physical. However, when I am plotting it as a function of parameter I see discontinuity. I think it is because MATLAB is switching roots.
Any ideas how to fix that physical root?
Thannk you.

Respuesta aceptada

Roger Stafford
Roger Stafford el 12 de Jun. de 2014
Presumably you are using matlab's 'roots' function, which for fourth degree polynomials will give four roots, so your task is to select out of those four, as your parameter changes, that root which is regarded as a "physical" root in your particular application.
There does exist a specific formula for solving fourth degree polynomial equations, but it is quite complicated. I would suggest instead making use of that same discontinuity you have observed in conjunction with 'roots'.
Provide the changing parameter in very small and equal incremental changes, and having started with a particular root, always select the root among the four which is closest in absolute difference to the last one chosen. That should provide some kind of continuity. It would be roughly analogous to the use of matlab's 'unwrap' function.
Of course there is the possible problem of arriving at duplicate roots for a particular parameter value. You might have trouble deciding which one of these to follow after that point. Discontinuity can also be tested at the first derivative level if you use sufficiently small and accurate parameter increments, and that might be used to resolve such a dilemma.
The statements I have made above are necessarily vague since I have no way of knowing the nature of your coefficients' dependence on your parameter and its effect on the roots.
  2 comentarios
Roger Stafford
Roger Stafford el 13 de Jun. de 2014
To make a little more clear what I suggested earlier, suppose you have successfully tracked what you regard as the correct "physical branch" of root values up to the n-1st value (including both the real and imaginary parts.) You could use the most recent three values, r(n-3), r(n-2), and r(n-1) to reasonably predict that the n-th value would be approximately r(n) = 3*r(n-1)-3*r(n-2)+r(n-3). At this n-th step you could then take the 'abs' of the difference between this complex predicted value and each of the four complex roots obtained from 'roots' and select the one closest to the predicted value. Or perhaps only the most recent two values are needed, in which case your prediction would be 2*r(n-1)-r(n-2) for the n-th value. In this way you should be able to continue tracking the correct branch of roots making use of the concept of continuity.
Note: These prediction formulas assume you are using a constant increment in your parameter 'a'.
Yahor
Yahor el 13 de Jun. de 2014
Cool! I will try approximation of 2nd and 3rd order and tell you which will work. Thanks a lot I forgot about extrapolation. I was trying to solve it using back substitution in 'FindRoot' on Mathematica, but since I will need that function for numerical integration (which is impossible on uniform grid in Mathematica) I switched to Matlab. Thank you.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by