Prompted by my wrestling with this earlier question:
Changing the opacity of lines on a plot based on their value
I want to sort an association by the maximum value for each of the 3 members of the association over a specific range {x, 2/26, 1}
.
assoc = <|"a:b" -> (2.888888888888889` x + 158.5679012345679` x^2 +
972.4261545496113` x^3 + 2782.574803223688` x^4 +
4689.153835062141` x^5 + 6158.852000788219` x^6 +
6193.345446598874` x^7 + 4759.487380195244` x^8 +
2828.1047688854555` x^9 + 1262.2623444432436` x^10 +
396.8075199523231` x^11 + 87.10349331793769` x^12 +
15.918345899682585` x^13 + 2.358273466619642` x^14)/(2 x +
142 x^2 + 994 x^3 + 3068 x^4 + 5440 x^5 + 7516 x^6 +
8061 x^7 + 6591 x^8 + 4215 x^9 + 2029 x^10 + 694 x^11 +
181 x^12 + 33 x^13 + 4 x^14),
"a:c" -> (1.9259259259259258` x + 154.85871056241427` x^2 +
1000.1077071584616` x^3 + 2910.6970670309593` x^4 +
4824.123299147454` x^5 + 6433.145771926378` x^6 +
6287.788973741406` x^7 + 4729.911569226189` x^8 +
2616.6377204567093` x^9 + 1072.3401991902406` x^10 +
300.41168315858073` x^11 + 66.12235989098919` x^12 +
9.795905169035438` x^13 + 1.179136733309821` x^14)/(2 x +
142 x^2 + 994 x^3 + 3068 x^4 + 5440 x^5 + 7516 x^6 +
8061 x^7 + 6591 x^8 + 4215 x^9 + 2029 x^10 + 694 x^11 +
181 x^12 + 33 x^13 + 4 x^14),
"a:e" -> (1.9259259259259258` x + 154.85871056241427` x^2 +
1177.8054158410812` x^3 + 3305.3824300345664` x^4 +
5174.381478951672` x^5 + 6568.697926267911` x^6 +
6234.040624961103` x^7 + 4385.353371436694` x^8 +
2365.2980972400514` x^9 + 900.9303208030539` x^10 +
255.51499204916647` x^11 + 41.96226685389699` x^12 +
6.122440730647148` x^13 + 1.179136733309821` x^14)/(2 x +
142 x^2 + 994 x^3 + 3068 x^4 + 5440 x^5 + 7516 x^6 +
8061 x^7 + 6591 x^8 + 4215 x^9 + 2029 x^10 + 694 x^11 +
181 x^12 + 33 x^13 + 4 x^14)|>;
FindMaximum[#, {x, 2/26, 1}] & /@ assoc
Keys[Sort[%]]
assoc[#] & /@ %
This seems to work, but have I missed something?