# How do I maximise the first real root of a multi-variable polynomial in x?

I have a polynomial in x, that also depends on {y1,y2,y3,y4,y5}. It always has 10 (not necessarily distinct) real roots. It's top coefficient is (1*x^10) I aim to find the y's that maximize the smallest root. I know of the Minimize command, but I haven't worked with roots before.

Actually, the polynomial is the determinant of a 10*10 symmetric matrix of the form (M + Ix) + (N1 y1 + N2 y2 .. + N5 y5) . So it can be restated as maximizing its smallest eigenvalue.

• It seems more profitable to treat this as an symmetric eigenvalue maximization problem than a generic root maximization problem. There seems to be a bunch of specialized methods for this route, but I have no experience with them. Commented Oct 5, 2018 at 10:56
• Is this a "matrix pencil" problem? It might be worth investigating related techniques. Commented Oct 5, 2018 at 13:30
• It's hard to say without an example, but you could try NMaximize[Min[Eigenvalues[matrix]], {x, y1, y2, y3, y4, y5}] Commented Oct 5, 2018 at 15:45
• Perhaps, you could provide a simplified problem, perhaps a 4x4 matrix with two parameters, for readers to solve. By the way, remember that the value of the minimum eigenvalue is only piecewise an analytical function of the parameters. Commented Oct 5, 2018 at 17:47
• The NMaximize arpoach is what I ended up going for. It seems to work. (unless it was a local maximum, but that's irrelevant. I've figured out the behavior I was interested in) Commented Oct 9, 2018 at 12:13