Solving a fifth order polynomial equation with varying coefficients

asked 2019-12-20 20:01:28 +0200

SAGAR gravatar image

Hi, I have a fifth order polynomial in x whose coefficients depend on a certain variable k. Now, I want to find the real roots of that polynomial for each value of k, say from 0.1 to 2 in steps of 0.05 and after finding the roots, I need to plot the corresponding root versus the k from which it was obtained. How can I do that? If anyone could help, that would be highly appreciable.

I have already tried to find the roots for each value of k and then got a set of values for k and x then plotted it. But that is quite cumbersome and it has one disadvantage. If any one of the roots changes value then I have to repeat the whole process all over again. If all of the things could be included in a single program, that would be very helpful.

edit retag flag offensive close merge delete


Please add your code, or at least the polynomial depending on k.

rburing gravatar imagerburing ( 2019-12-20 23:16:10 +0200 )edit