1
$\begingroup$

Suppose I have the following list of rational functions (fraction of polynomials):

l={(353.073 x + 1142. x^2 + 2310.76 x^3 + 3770.26 x^4 + 5368.18 x^5 + 
   6304.07 x^6 + 6704.84 x^7 + 6513.96 x^8 + 5442.09 x^9 + 
   4620.29 x^10 + 3460.76 x^11 + 2654.19 x^12 + 2097.3 x^13 + 
   1517.29 x^14 + 1074.89 x^15 + 758.512 x^16 + 476.296 x^17 + 
   263.28 x^18 + 204.555 x^19 + 110.075 x^20 + 56.7865 x^21 + 
   27.375 x^22 + 28.2448 x^23 + 19.7196 x^24 + 5.61942 x^25 + 
   3.73647 x^26 + 0.931673 x^27 + 1.85847 x^28 + 2.7804 x^29 + 
   0.924375 x^30 + 1.84391 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 
   3811 x^4 + 5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 + 
   4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 + 
   1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 + 117 x^20 + 
   59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 + 4 x^26 + x^27 + 
   2 x^28 + 3 x^29 + x^30 + 2 x^31),(354.073 x + 1142. x^2 + 2310.76 x^3 + 3770.26 x^4 + 5368.18 x^5 + 
   6304.07 x^6 + 6704.84 x^7 + 6513.96 x^8 + 5442.09 x^9 + 
   4620.29 x^10 + 3460.76 x^11 + 2654.19 x^12 + 2097.3 x^13 + 
   1517.29 x^14 + 1074.89 x^15 + 758.512 x^16 + 476.296 x^17 + 
   263.28 x^18 + 204.555 x^19 + 110.075 x^20 + 56.7865 x^21 + 
   27.375 x^22 + 28.2448 x^23 + 19.7196 x^24 + 5.61942 x^25 + 
   3.73647 x^26 + 0.931673 x^27 + 1.85847 x^28 + 2.7804 x^29 + 
   0.924375 x^30 + 1.84391 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 
   3811 x^4 + 5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 + 
   4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 + 
   1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 + 117 x^20 + 
   59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 + 4 x^26 + x^27 + 
   2 x^28 + 3 x^29 + x^30 + 2 x^31),(354.071 x + 1146.97 x^2 + 2305.8 x^3 + 3799.95 x^4 + 5446.15 x^5 + 
   6375.93 x^6 + 6808.91 x^7 + 6485.56 x^8 + 5362. x^9 + 
   4555.02 x^10 + 3408.3 x^11 + 2624.15 x^12 + 2092.47 x^13 + 
   1510.54 x^14 + 1065.28 x^15 + 757.553 x^16 + 477.252 x^17 + 
   261.372 x^18 + 202.652 x^19 + 110.075 x^20 + 55.8401 x^21 + 
   28.3189 x^22 + 28.2448 x^23 + 19.7196 x^24 + 5.61942 x^25 + 
   3.73647 x^26 + 0.931673 x^27 + 1.85847 x^28 + 2.7804 x^29 + 
   0.924375 x^30 + 1.84391 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 
   3811 x^4 + 5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 + 
   4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 + 
   1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 + 117 x^20 + 
   59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 + 4 x^26 + x^27 + 
   2 x^28 + 3 x^29 + x^30 + 2 x^31),(352.071 x + 1180.79 x^2 + 2595.51 x^3 + 4326.4 x^4 + 5922.86 x^5 + 
   6615.14 x^6 + 6797.13 x^7 + 6102.68 x^8 + 5069. x^9 + 
   4241.35 x^10 + 3240.21 x^11 + 2532.09 x^12 + 2019.01 x^13 + 
   1455.59 x^14 + 1009.52 x^15 + 734.539 x^16 + 446.647 x^17 + 
   249.925 x^18 + 185.526 x^19 + 101.535 x^20 + 54.8936 x^21 + 
   27.375 x^22 + 28.2448 x^23 + 18.7806 x^24 + 5.61942 x^25 + 
   1.86824 x^26 + 1.86335 x^27 + 2.7877 x^28 + 1.8536 x^29 + 
   0.924375 x^30 + 0.921956 x^31)/(354 x + 1143 x^2 + 2320 x^3 + 
   3811 x^4 + 5441 x^5 + 6403 x^6 + 6829 x^7 + 6658 x^8 + 5571 x^9 + 
   4737 x^10 + 3560 x^11 + 2741 x^12 + 2174 x^13 + 1579 x^14 + 
   1120 x^15 + 789 x^16 + 502 x^17 + 275 x^18 + 215 x^19 + 117 x^20 + 
   59 x^21 + 30 x^22 + 30 x^23 + 21 x^24 + 6 x^25 + 4 x^26 + x^27 + 
   2 x^28 + 3 x^29 + x^30 + 2 x^31)}

They can be plotted using Plot[{1, l}, {x, 0, 1}, PlotRange -> All] I want to pick/select those polynomials that have lines above 1 at any given x how can I do this without counting the lines by hand? in this case the only element which will be dropped is l[[1]] as it is all below 1. I want to pick those line that all/some of them are above the line 1.

$\endgroup$
  • 1
    $\begingroup$ It is unclear whether they must be "above 1", i.e., > 1; or "(not) below 1", i.e., >= 1. Assuming the latter, polys = Select[l, MaxValue[{#, 0 <= x <= 1}, x] >= 1 &] // Quiet; $\endgroup$ – Bob Hanlon Nov 21 '18 at 16:38
  • $\begingroup$ @BobHanlon they should start above 1 or have bits above 1 or start below 1 and for later x be above 1. $\endgroup$ – Wiliam Nov 21 '18 at 16:55
  • 1
    $\begingroup$ Since you say "above 1" then change the criteria in my comment to > rather than >= $\endgroup$ – Bob Hanlon Nov 21 '18 at 17:19
2
$\begingroup$

Try this:

    Map[FindMaximum[{#, 0 <= x <= 1}, {x, 1}][[1]] &, l]

   (*  {0.997646, 1.00021, 1.00064, 1.06581} *)

meaning that only the first function does not satisfy your requirement.

Have fun!

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.