For cubic and higher order polynomials, Root and RootSum are generally left unevaluated:
RootSum[d + c #1 + b #1^2 + a #1^3 &, Cos[#1] &]
RootSum[d + c #1 + b #1^2 + a #1^3 &, Cos[#1] &]
But for sum over roots of quadratic and lower order polynomials,
RootSum[a #^2 + b # + c &, Cos[#] &]
immediately turns into
and also,
Root[a #^2 + b # + c &, 1]
Root[a #^2 + b # + c &, 2]
each immediately get turned into (- case for 1 and + case for 2)
This is bad for two reasons:
For numeric evaluation, forms that are output by
Rootare not the best (e.g. it is sometimes more stable to write the second rootx2in terms of the firstx1usingx2 -> c/a*1/x1).Analytically, if the coefficients
a,b,care generally complicated expressions, it is more compact and also more pleasant to the eye if the expression is left inRootSumorRootfrom.
Question: How do I prevent the automatic expansion of Root and RootSum over quadratic roots, and force them to remain unevaluated/unexpanded like for higher order polynomials.
None of the evaluation control functions Hold, Unevaluated, Inactive... are acceptable here since they interfere with symbolic manipulation routines that would otherwise work without them, e.g.:
D[Inactive[RootSum][a #^2 + b # + c &, Cos[ω #] &], ω]
The ideal solution would entail either setting specific options to Root or RootSum to prevent automatic expansion, or to modify (possibly undocumented) internal code associated with these functions.



RootandRootSumto remain unexpanded for generic quadratic and lower order polynomials. i.eRootSum[a #^2 + b # + c &, Cos[#] &]should return unevaluated just asRootSum[a #^3 + b #^2 + c # + d &, Cos[#] &]is returned unevaluated. – QuantumDot Sep 27 '16 at 01:12RootSum[d + c # + b #^2 &, f]is not expanded. – bill s Sep 27 '16 at 01:38Inactiveis unacceptable.D[Inactive[RootSum][a #^2 + b # + c &, Cos[ω #] &], ω] // Activateworks well. The only downside I see is thatInactiveneeds to be applied in each operation. It is for that reason only that I suggestDeferinstead. – bbgodfrey Sep 28 '16 at 04:05