0
$\begingroup$

I have the given function $Func$ and want to have a plot of those domains where $-3\leq Func\leq 3$ in precise details. I am using Plot[ConditionalExpression[1, -3 <= Func <= 3] for and I obtain this plot

enter image description here

Questions.

  1. As can be seen, by increasing PlotPoints, MaxRecursion, and WorkingPrecision, the accuracy of the plots changes; however, when I set the mentioned items a big number, it takes a lot of time. My question is: is there any alternative rather than a conditional plot that gives a more precise result in a shorter time?
p1 = Plot[ConditionalExpression[1, -3 <= Func <= 3], {x, 11, 16}, PlotPoints -> 30, MaxRecursion -> 2, PlotStyle -> Directive[Red, CapForm["Butt"], Opacity[1], Thickness[.005]], Axes -> {False, False}, WorkingPrecision -> 20] ;
p2 = Plot[ConditionalExpression[2, -3 <= Func <= 3], {x, 11, 16}, PlotPoints -> 50, MaxRecursion -> 4, PlotStyle -> Directive[Blue, CapForm["Butt"], Opacity[1], Thickness[.005]], Axes -> {False, False}, WorkingPrecision -> 100] ;
p3 = Plot[ConditionalExpression[3, -3 <= Func <= 3], {x, 11, 16}, PlotPoints -> 80, MaxRecursion -> 6, PlotStyle -> Directive[Green, CapForm["Butt"], Opacity[1], Thickness[.005]], Axes -> {False, False}, WorkingPrecision -> 200] ;

Pic = Show[{p1, p2, p3}, PlotRange -> {{11, 16}, {0, 4}} ,  AspectRatio -> 1/6]

the function

Func:=(1/(1024*(-1 + x)^11*(1 + x)^11))*Csc[x]^11*(-264*x*(-1 + x^2)^2*(777 + 11928*x^2 + 73148*x^4 + 275752*x^6 + 653046*x^8 + 275752*x^10 + 73148*x^12 + 11928*x^14 + 777*x^16)*Cos[Pi/22] - 88*x*(-1 + x^2)^4*(69 + 2258*x^2 - 7733*x^4 - 132548*x^6 - 7733*x^8 + 2258*x^10 + 69*x^12)*Cos[(3*Pi)/22] + 88*x*(-1 + x^2)^6*(183 + 2532*x^2 - 7990*x^4 + 2532*x^6 + 183*x^8)*Cos[(5*Pi)/22] - 2816*(-1 + x^2)^2*(1 + x^2)^9*Cos[(5/22)*(Pi - 88*x)] + 
   22*(13031 + 2359*x + 94165*x^2 + 27282*x^3 + 247529*x^4 + 152299*x^5 + 424547*x^6 + 605784*x^7 + 1019270*x^8 + 1805534*x^9 + 2133618*x^10 + 2677804*x^11 + 2133618*x^12 + 1805534*x^13 + 1019270*x^14 + 605784*x^15 + 424547*x^16 + 152299*x^17 + 247529*x^18 + 27282*x^19 + 94165*x^20 + 2359*x^21 + 13031*x^22)*Cos[(5/22)*(Pi - 44*x)] - 704*(-1 + x^2)^2*(1 + x^2)^7*(1 - 34*x^2 + x^4)*Cos[Pi/22 - 18*x] + 704*(-1 + x^2)^2*(1 + x^2)^7*(1 - 34*x^2 + x^4)*Cos[(3*Pi)/22 - 18*x] + 176*(-1 + x^2)^2*(1 + x^2)^5*(247 + 612*x^2 + 330*x^4 + 612*x^6 + 247*x^8)*Cos[Pi/22 - 16*x] + 
   176*(-1 + x^2)^2*(1 + x^2)^5*(247 + 612*x^2 + 330*x^4 + 612*x^6 + 247*x^8)*Cos[(5*Pi)/22 - 16*x] - 264*(-1 + x^2)^2*(1 + x^2)^3*(69 + 1298*x^2 + 3019*x^4 + 3516*x^6 + 3019*x^8 + 1298*x^10 + 69*x^12)*Cos[Pi/22 - 14*x] + 44*(-1 + x^2)^2*(1 + x^2)^3*(413 - 8*x + 7762*x^2 - 40*x^3 + 18099*x^4 + 48*x^5 + 21180*x^6 + 48*x^7 + 18099*x^8 - 40*x^9 + 7762*x^10 - 8*x^11 + 413*x^12)*Cos[(3*Pi)/22 - 14*x] - 1056*(-1 + x^2)^2*(1 + x^2)^4*(17 - 2*x + 301*x^2 - 8*x^3 + 450*x^4 + 20*x^5 + 450*x^6 - 8*x^7 + 301*x^8 - 2*x^9 + 17*x^10)*Cos[(5*Pi)/22 - 14*x] - 
   11*(-1 + x^2)^2*(24547 - 48*x + 135563*x^2 - 192*x^3 + 343804*x^4 + 576*x^5 + 563948*x^6 + 192*x^7 + 701610*x^8 - 1056*x^9 + 701610*x^10 + 192*x^11 + 563948*x^12 + 576*x^13 + 343804*x^14 - 192*x^15 + 135563*x^16 - 48*x^17 + 24547*x^18)*Cos[Pi/22 - 12*x] - 22*(-1 + x^2)^2*(12691 - 363*x + 108935*x^2 - 4480*x^3 + 375232*x^4 - 18340*x^5 + 763352*x^6 + 2752*x^7 + 1099086*x^8 + 40862*x^9 + 1099086*x^10 + 2752*x^11 + 763352*x^12 - 18340*x^13 + 375232*x^14 - 4480*x^15 + 108935*x^16 - 363*x^17 + 12691*x^18)*Cos[(3*Pi)/22 - 10*x] + 
   44*(-1 + x^2)^2*(16295 + 167*x + 72447*x^2 + 488*x^3 + 155964*x^4 + 2180*x^5 + 251340*x^6 + 12888*x^7 + 290386*x^8 - 31446*x^9 + 290386*x^10 + 12888*x^11 + 251340*x^12 + 2180*x^13 + 155964*x^14 + 488*x^15 + 72447*x^16 + 167*x^17 + 16295*x^18)*Cos[Pi/22 - 8*x] - 44*(-1 + x^2)^2*(16373 + 999*x + 76477*x^2 + 13080*x^3 + 189364*x^4 + 72932*x^5 + 386276*x^6 + 270888*x^7 + 707766*x^8 + 463850*x^9 + 707766*x^10 + 270888*x^11 + 386276*x^12 + 72932*x^13 + 189364*x^14 + 13080*x^15 + 76477*x^16 + 999*x^17 + 16373*x^18)*Cos[(3*Pi)/22 - 8*x] + 
   44*(-1 + x^2)^2*(16015 - 2003*x + 63751*x^2 - 28840*x^3 + 78204*x^4 - 179860*x^5 - 134196*x^6 - 651928*x^7 - 613598*x^8 - 1027250*x^9 - 613598*x^10 - 651928*x^11 - 134196*x^12 - 179860*x^13 + 78204*x^14 - 28840*x^15 + 63751*x^16 - 2003*x^17 + 16015*x^18)*Cos[(5*Pi)/22 - 8*x] - 22*(-1 + x^2)^2*(52199 - 345*x + 315499*x^2 - 10560*x^3 + 899168*x^4 - 54156*x^5 + 1682776*x^6 - 112896*x^7 + 2555382*x^8 + 355914*x^9 + 2555382*x^10 - 112896*x^11 + 1682776*x^12 - 54156*x^13 + 899168*x^14 - 10560*x^15 + 315499*x^16 - 345*x^17 + 52199*x^18)*Cos[Pi/22 - 6*x] + 
   22*(52771 + 4399*x + 234321*x^2 + 52642*x^3 + 475893*x^4 + 275331*x^5 + 786607*x^6 + 982808*x^7 + 1480446*x^8 + 3255374*x^9 + 4834282*x^10 + 6587532*x^11 + 4834282*x^12 + 3255374*x^13 + 1480446*x^14 + 982808*x^15 + 786607*x^16 + 275331*x^17 + 475893*x^18 + 52642*x^19 + 234321*x^20 + 4399*x^21 + 52771*x^22)*Cos[(3*Pi)/22 - 6*x] - 22*(-1 + x^2)^2*(51891 - 3691*x + 305759*x^2 - 47488*x^3 + 827048*x^4 - 208292*x^5 + 1552080*x^6 - 13632*x^7 + 2768246*x^8 + 546206*x^9 + 2768246*x^10 - 13632*x^11 + 1552080*x^12 - 208292*x^13 + 827048*x^14 - 47488*x^15 + 305759*x^16 - 3691*x^17 + 51891*x^18)*
    Cos[(5*Pi)/22 - 6*x] - 11*(-1 + x^2)^2*(72015 + 6240*x + 310551*x^2 + 102720*x^3 + 813036*x^4 + 590592*x^5 + 2145436*x^6 + 2003648*x^7 + 4916498*x^8 + 5603648*x^9 + 4916498*x^10 + 2003648*x^11 + 2145436*x^12 + 590592*x^13 + 813036*x^14 + 102720*x^15 + 310551*x^16 + 6240*x^17 + 72015*x^18)*Cos[Pi/22 - 4*x] + 11*(-1 + x^2)^2*(70013 - 9616*x + 231445*x^2 - 142464*x^3 + 145220*x^4 - 945600*x^5 - 1033516*x^6 - 3497856*x^7 - 4918186*x^8 - 7324000*x^9 - 4918186*x^10 - 3497856*x^11 - 1033516*x^12 - 945600*x^13 + 145220*x^14 - 142464*x^15 + 231445*x^16 - 9616*x^17 + 70013*x^18)*Cos[(3*Pi)/22 - 4*x] - 
   11*(-1 + x^2)^2*(71223 + 3024*x + 285567*x^2 + 16512*x^3 + 555340*x^4 - 123712*x^5 + 438524*x^6 - 275584*x^7 + 1401858*x^8 + 759520*x^9 + 1401858*x^10 - 275584*x^11 + 438524*x^12 - 123712*x^13 + 555340*x^14 + 16512*x^15 + 285567*x^16 + 3024*x^17 + 71223*x^18)*Cos[(5*Pi)/22 - 4*x] + 44*(49997 + 3621*x + 173407*x^2 + 48822*x^3 + 294011*x^4 + 230337*x^5 + 476033*x^6 + 635912*x^7 + 1205090*x^8 + 1392922*x^9 + 3306486*x^10 + 6386820*x^11 + 3306486*x^12 + 1392922*x^13 + 1205090*x^14 + 635912*x^15 + 476033*x^16 + 230337*x^17 + 294011*x^18 + 48822*x^19 + 173407*x^20 + 3621*x^21 + 49997*x^22)*
    Cos[Pi/22 - 2*x] - 44*(-1 + x^2)^2*(49568 - 1083*x + 257024*x^2 - 17792*x^3 + 651936*x^4 - 90468*x^5 + 1160160*x^6 - 177472*x^7 + 2010080*x^8 + 573630*x^9 + 2010080*x^10 - 177472*x^11 + 1160160*x^12 - 90468*x^13 + 651936*x^14 - 17792*x^15 + 257024*x^16 - 1083*x^17 + 49568*x^18)*Cos[(3*Pi)/22 - 2*x] + 44*(-1 + x^2)^2*(49667 - 129*x + 262895*x^2 - 4800*x^3 + 697256*x^4 - 21740*x^5 + 1364304*x^6 + 96384*x^7 + 1754646*x^8 - 139430*x^9 + 1754646*x^10 + 96384*x^11 + 1364304*x^12 - 21740*x^13 + 697256*x^14 - 4800*x^15 + 262895*x^16 - 129*x^17 + 49667*x^18)*Cos[(5*Pi)/22 - 2*x] - 
   44*(-1 + x)^2*(49997 + 96373*x + 316156*x^2 + 487117*x^3 + 952089*x^4 + 1186724*x^5 + 1897392*x^6 + 1972148*x^7 + 3251994*x^8 + 3138918*x^9 + 6332328*x^10 + 3138918*x^11 + 3251994*x^12 + 1972148*x^13 + 1897392*x^14 + 1186724*x^15 + 952089*x^16 + 487117*x^17 + 316156*x^18 + 96373*x^19 + 49997*x^20)*Cos[Pi/22 + 2*x] + 44*(-1 + x^2)^2*(49568 + 1083*x + 257024*x^2 + 17792*x^3 + 651936*x^4 + 90468*x^5 + 1160160*x^6 + 177472*x^7 + 2010080*x^8 - 573630*x^9 + 2010080*x^10 + 177472*x^11 + 1160160*x^12 + 90468*x^13 + 651936*x^14 + 17792*x^15 + 257024*x^16 + 1083*x^17 + 49568*x^18)*Cos[(3*Pi)/22 + 2*x] - 
   44*(-1 + x^2)^2*(49667 + 129*x + 262895*x^2 + 4800*x^3 + 697256*x^4 + 21740*x^5 + 1364304*x^6 - 96384*x^7 + 1754646*x^8 + 139430*x^9 + 1754646*x^10 - 96384*x^11 + 1364304*x^12 + 21740*x^13 + 697256*x^14 + 4800*x^15 + 262895*x^16 + 129*x^17 + 49667*x^18)*Cos[(5*Pi)/22 + 2*x] + 11*(-1 + x^2)^2*(72015 - 6240*x + 310551*x^2 - 102720*x^3 + 813036*x^4 - 590592*x^5 + 2145436*x^6 - 2003648*x^7 + 4916498*x^8 - 5603648*x^9 + 4916498*x^10 - 2003648*x^11 + 2145436*x^12 - 590592*x^13 + 813036*x^14 - 102720*x^15 + 310551*x^16 - 6240*x^17 + 72015*x^18)*Cos[Pi/22 + 4*x] - 
   11*(-1 + x^2)^2*(70013 + 9616*x + 231445*x^2 + 142464*x^3 + 145220*x^4 + 945600*x^5 - 1033516*x^6 + 3497856*x^7 - 4918186*x^8 + 7324000*x^9 - 4918186*x^10 + 3497856*x^11 - 1033516*x^12 + 945600*x^13 + 145220*x^14 + 142464*x^15 + 231445*x^16 + 9616*x^17 + 70013*x^18)*Cos[(3*Pi)/22 + 4*x] + 11*(-1 + x^2)^2*(71223 - 3024*x + 285567*x^2 - 16512*x^3 + 555340*x^4 + 123712*x^5 + 438524*x^6 + 275584*x^7 + 1401858*x^8 - 759520*x^9 + 1401858*x^10 + 275584*x^11 + 438524*x^12 + 123712*x^13 + 555340*x^14 - 16512*x^15 + 285567*x^16 - 3024*x^17 + 71223*x^18)*Cos[(5*Pi)/22 + 4*x] + 
   22*(-1 + x^2)^2*(52199 + 345*x + 315499*x^2 + 10560*x^3 + 899168*x^4 + 54156*x^5 + 1682776*x^6 + 112896*x^7 + 2555382*x^8 - 355914*x^9 + 2555382*x^10 + 112896*x^11 + 1682776*x^12 + 54156*x^13 + 899168*x^14 + 10560*x^15 + 315499*x^16 + 345*x^17 + 52199*x^18)*Cos[Pi/22 + 6*x] - 22*(-1 + x)^2*(52771 + 101143*x + 383836*x^2 + 613887*x^3 + 1319831*x^4 + 1750444*x^5 + 2967664*x^6 + 3202076*x^7 + 4916934*x^8 + 3376418*x^9 + 6670184*x^10 + 3376418*x^11 + 4916934*x^12 + 3202076*x^13 + 2967664*x^14 + 1750444*x^15 + 1319831*x^16 + 613887*x^17 + 383836*x^18 + 101143*x^19 + 52771*x^20)*Cos[(3*Pi)/22 + 6*x] + 
   22*(-1 + x^2)^2*(51891 + 3691*x + 305759*x^2 + 47488*x^3 + 827048*x^4 + 208292*x^5 + 1552080*x^6 + 13632*x^7 + 2768246*x^8 - 546206*x^9 + 2768246*x^10 + 13632*x^11 + 1552080*x^12 + 208292*x^13 + 827048*x^14 + 47488*x^15 + 305759*x^16 + 3691*x^17 + 51891*x^18)*Cos[(5*Pi)/22 + 6*x] - 44*(-1 + x^2)^2*(16295 - 167*x + 72447*x^2 - 488*x^3 + 155964*x^4 - 2180*x^5 + 251340*x^6 - 12888*x^7 + 290386*x^8 + 31446*x^9 + 290386*x^10 - 12888*x^11 + 251340*x^12 - 2180*x^13 + 155964*x^14 - 488*x^15 + 72447*x^16 - 167*x^17 + 16295*x^18)*Cos[Pi/22 + 8*x] + 
   44*(-1 + x^2)^2*(16373 - 999*x + 76477*x^2 - 13080*x^3 + 189364*x^4 - 72932*x^5 + 386276*x^6 - 270888*x^7 + 707766*x^8 - 463850*x^9 + 707766*x^10 - 270888*x^11 + 386276*x^12 - 72932*x^13 + 189364*x^14 - 13080*x^15 + 76477*x^16 - 999*x^17 + 16373*x^18)*Cos[(3*Pi)/22 + 8*x] - 44*(-1 + x^2)^2*(16015 + 2003*x + 63751*x^2 + 28840*x^3 + 78204*x^4 + 179860*x^5 - 134196*x^6 + 651928*x^7 - 613598*x^8 + 1027250*x^9 - 613598*x^10 + 651928*x^11 - 134196*x^12 + 179860*x^13 + 78204*x^14 + 28840*x^15 + 63751*x^16 + 2003*x^17 + 16015*x^18)*Cos[(5*Pi)/22 + 8*x] - 
   22*(-1 + x^2)^2*(12691 + 163*x + 109863*x^2 + 832*x^3 + 383904*x^4 + 1732*x^5 + 782968*x^6 - 2688*x^7 + 1069870*x^8 - 78*x^9 + 1069870*x^10 - 2688*x^11 + 782968*x^12 + 1732*x^13 + 383904*x^14 + 832*x^15 + 109863*x^16 + 163*x^17 + 12691*x^18)*Cos[Pi/22 + 10*x] + 22*(-1 + x^2)^2*(12691 + 363*x + 108935*x^2 + 4480*x^3 + 375232*x^4 + 18340*x^5 + 763352*x^6 - 2752*x^7 + 1099086*x^8 - 40862*x^9 + 1099086*x^10 - 2752*x^11 + 763352*x^12 + 18340*x^13 + 375232*x^14 + 4480*x^15 + 108935*x^16 + 363*x^17 + 12691*x^18)*Cos[(3*Pi)/22 + 10*x] + 
   11*(-1 + x^2)^2*(24547 + 48*x + 135563*x^2 + 192*x^3 + 343804*x^4 - 576*x^5 + 563948*x^6 - 192*x^7 + 701610*x^8 + 1056*x^9 + 701610*x^10 - 192*x^11 + 563948*x^12 - 576*x^13 + 343804*x^14 + 192*x^15 + 135563*x^16 + 48*x^17 + 24547*x^18)*Cos[Pi/22 + 12*x] + 11*(-1 + x^2)^2*(24747 - 1472*x + 141523*x^2 - 16640*x^3 + 386524*x^4 - 96000*x^5 + 742092*x^6 - 278272*x^7 + 1064410*x^8 - 394880*x^9 + 1064410*x^10 - 278272*x^11 + 742092*x^12 - 96000*x^13 + 386524*x^14 - 16640*x^15 + 141523*x^16 - 1472*x^17 + 24747*x^18)*Cos[(5*Pi)/22 + 12*x] + 
   264*(-1 + x^2)^2*(1 + x^2)^3*(69 + 1298*x^2 + 3019*x^4 + 3516*x^6 + 3019*x^8 + 1298*x^10 + 69*x^12)*Cos[Pi/22 + 14*x] - 44*(-1 + x^2)^2*(1 + x^2)^3*(413 + 8*x + 7762*x^2 + 40*x^3 + 18099*x^4 - 48*x^5 + 21180*x^6 - 48*x^7 + 18099*x^8 + 40*x^9 + 7762*x^10 + 8*x^11 + 413*x^12)*Cos[(3*Pi)/22 + 14*x] + 1056*(-1 + x^2)^2*(1 + x^2)^4*(17 + 2*x + 301*x^2 + 8*x^3 + 450*x^4 - 20*x^5 + 450*x^6 + 8*x^7 + 301*x^8 + 2*x^9 + 17*x^10)*Cos[(5*Pi)/22 + 14*x] - 176*(-1 + x^2)^2*(1 + x^2)^5*(247 + 612*x^2 + 330*x^4 + 612*x^6 + 247*x^8)*Cos[Pi/22 + 16*x] + 
   176*(-1 + x^2)^2*(1 + x^2)^5*(247 + 612*x^2 + 330*x^4 + 612*x^6 + 247*x^8)*Cos[(3*Pi)/22 + 16*x] - 176*(-1 + x^2)^2*(1 + x^2)^5*(247 + 612*x^2 + 330*x^4 + 612*x^6 + 247*x^8)*Cos[(5*Pi)/22 + 16*x] + 704*(-1 + x^2)^2*(1 + x^2)^7*(1 - 34*x^2 + x^4)*Cos[Pi/22 + 18*x] - 704*(-1 + x^2)^2*(1 + x^2)^7*(1 - 34*x^2 + x^4)*Cos[(3*Pi)/22 + 18*x] + 704*(-1 + x^2)^2*(1 + x^2)^7*(1 - 34*x^2 + x^4)*Cos[(5*Pi)/22 + 18*x] + 2816*(-1 + x^2)^2*(1 + x^2)^9*Cos[Pi/22 + 20*x] - 2816*(-1 + x^2)^2*(1 + x^2)^9*Cos[(3*Pi)/22 + 20*x] - 
   22*(-1 + x)^2*(13031 + 23703*x + 128540*x^2 + 206095*x^3 + 531179*x^4 + 703964*x^5 + 1301296*x^6 + 1292844*x^7 + 2303662*x^8 + 1508946*x^9 + 2847848*x^10 + 1508946*x^11 + 2303662*x^12 + 1292844*x^13 + 1301296*x^14 + 703964*x^15 + 531179*x^16 + 206095*x^17 + 128540*x^18 + 23703*x^19 + 13031*x^20)*Cos[(5/22)*(Pi + 44*x)] - 44*(-1 + x)^2*(1 + x^2)^3*(473 + 498*x + 9059*x^2 + 13716*x^3 + 30401*x^4 + 26670*x^5 + 54275*x^6 + 24728*x^7 + 54275*x^8 + 26670*x^9 + 30401*x^10 + 13716*x^11 + 9059*x^12 + 498*x^13 + 473*x^14)*Cos[(7/22)*(Pi + 44*x)] + 
   5632*(-1 + x)^2*x*(1 + x^2)^7*(1 - 6*x - 6*x^2 - 6*x^3 + x^4)*Cos[(9/22)*(Pi + 44*x)] - 11*(-1 + x^2)^2*(24569 - 64*x + 135985*x^2 - 512*x^3 + 345204*x^4 - 2816*x^5 + 565188*x^6 + 512*x^7 + 698526*x^8 + 5760*x^9 + 698526*x^10 + 512*x^11 + 565188*x^12 - 2816*x^13 + 345204*x^14 - 512*x^15 + 135985*x^16 - 64*x^17 + 24569*x^18)*Cos[(3/22)*(Pi + 88*x)] + 2816*(-1 + x^2)^2*(1 + x^2)^9*Cos[(5/22)*(Pi + 88*x)] - 176*x*(-1 + x^2)^8*(31 - 14*x^2 + 31*x^4)*Sin[Pi/11] - 88*x*(-1 + x^2)^6*(399 - 604*x^2 + 1690*x^4 - 604*x^6 + 399*x^8)*Sin[(2*Pi)/11] - 
   704*(-1 + x^2)^2*(1 + x^2)^7*(1 - 34*x^2 + x^4)*Sin[(2/11)*(Pi - 99*x)] + 176*(-1 + x^2)^2*(1 + x^2)^5*(249 - 16*x + 668*x^2 - 112*x^3 + 470*x^4 - 112*x^5 + 668*x^6 - 16*x^7 + 249*x^8)*Sin[(2/11)*(Pi - 88*x)] - 11*(-1 + x^2)^2*(23859 + 5056*x + 114715*x^2 + 69376*x^3 + 157564*x^4 + 406272*x^5 - 170772*x^6 + 1110272*x^7 - 715190*x^8 + 1536640*x^9 - 715190*x^10 + 1110272*x^11 - 170772*x^12 + 406272*x^13 + 157564*x^14 + 69376*x^15 + 114715*x^16 + 5056*x^17 + 23859*x^18)*Sin[(2/11)*(Pi - 66*x)] + 
   22*(-1 + x^2)^2*(12221 + 3473*x + 96577*x^2 + 38720*x^3 + 312232*x^4 + 91180*x^5 + 724000*x^6 - 37632*x^7 + 1214266*x^8 - 191482*x^9 + 1214266*x^10 - 37632*x^11 + 724000*x^12 + 91180*x^13 + 312232*x^14 + 38720*x^15 + 96577*x^16 + 3473*x^17 + 12221*x^18)*Sin[(2/11)*(Pi - 55*x)] + 2816*(-1 + x^2)^2*(1 + x^2)^9*Sin[Pi/11 - 20*x] - 2816*(-1 + x^2)^2*(1 + x^2)^9*Sin[(2*Pi)/11 - 20*x] - 176*(-1 + x^2)^2*(1 + x^2)^5*(221 + 176*x + 76*x^2 + 976*x^3 - 850*x^4 + 976*x^5 + 76*x^6 + 176*x^7 + 221*x^8)*Sin[Pi/11 - 16*x] + 
   44*(-1 + x^2)^2*(1 + x^2)^3*(163 + 1336*x + 4846*x^2 + 3096*x^3 + 17933*x^4 - 4432*x^5 + 27844*x^6 - 4432*x^7 + 17933*x^8 + 3096*x^9 + 4846*x^10 + 1336*x^11 + 163*x^12)*Sin[Pi/11 - 14*x] + 11*(-1 + x^2)^2*(25489 - 2864*x + 137929*x^2 + 5184*x^3 + 324500*x^4 + 29760*x^5 + 540900*x^6 - 5184*x^7 + 740654*x^8 - 53792*x^9 + 740654*x^10 - 5184*x^11 + 540900*x^12 + 29760*x^13 + 324500*x^14 + 5184*x^15 + 137929*x^16 - 2864*x^17 + 25489*x^18)*Sin[Pi/11 - 12*x] - 
   22*(-1 + x^2)^2*(12671 + 1126*x + 106967*x^2 + 3840*x^3 + 386652*x^4 - 8440*x^5 + 792300*x^6 - 4480*x^7 + 1060706*x^8 + 15908*x^9 + 1060706*x^10 - 4480*x^11 + 792300*x^12 - 8440*x^13 + 386652*x^14 + 3840*x^15 + 106967*x^16 + 1126*x^17 + 12671*x^18)*Sin[Pi/11 - 10*x] - 44*(-1 + x^2)^2*(16381 - 278*x + 72181*x^2 + 1872*x^3 + 153700*x^4 - 2344*x^5 + 244532*x^6 - 3024*x^7 + 299638*x^8 + 7548*x^9 + 299638*x^10 - 3024*x^11 + 244532*x^12 - 2344*x^13 + 153700*x^14 + 1872*x^15 + 72181*x^16 - 278*x^17 + 16381*x^18)*Sin[Pi/11 - 8*x] + 
   44*(-1 + x^2)^2*(16423 - 949*x + 75359*x^2 - 2168*x^3 + 145884*x^4 + 28660*x^5 + 205484*x^6 + 6072*x^7 + 343282*x^8 - 63230*x^9 + 343282*x^10 + 6072*x^11 + 205484*x^12 + 28660*x^13 + 145884*x^14 - 2168*x^15 + 75359*x^16 - 949*x^17 + 16423*x^18)*Sin[(2*Pi)/11 - 8*x] + 22*(-1 + x^2)^2*(52055 + 1138*x + 320735*x^2 - 2304*x^3 + 946060*x^4 - 1256*x^5 + 1770172*x^6 + 7552*x^7 + 2416002*x^8 - 10260*x^9 + 2416002*x^10 + 7552*x^11 + 1770172*x^12 - 1256*x^13 + 946060*x^14 - 2304*x^15 + 320735*x^16 + 1138*x^17 + 52055*x^18)*Sin[Pi/11 - 6*x] - 
   22*(-1 + x^2)^2*(52293 + 643*x + 316745*x^2 + 15936*x^3 + 923528*x^4 - 17596*x^5 + 1837824*x^6 - 40320*x^7 + 2374634*x^8 + 82674*x^9 + 2374634*x^10 - 40320*x^11 + 1837824*x^12 - 17596*x^13 + 923528*x^14 + 15936*x^15 + 316745*x^16 + 643*x^17 + 52293*x^18)*Sin[(2*Pi)/11 - 6*x] + 11*(-1 + x^2)^2*(71797 - 304*x + 276109*x^2 + 1728*x^3 + 546660*x^4 - 6848*x^5 + 802292*x^6 + 16704*x^7 + 1055654*x^8 - 22560*x^9 + 1055654*x^10 + 16704*x^11 + 802292*x^12 - 6848*x^13 + 546660*x^14 + 1728*x^15 + 276109*x^16 - 304*x^17 + 71797*x^18)*Sin[Pi/11 - 4*x] - 
   11*(-1 + x^2)^2*(71135 - 2000*x + 284903*x^2 + 7552*x^3 + 501100*x^4 + 15168*x^5 + 892828*x^6 - 96640*x^7 + 1002546*x^8 + 151840*x^9 + 1002546*x^10 - 96640*x^11 + 892828*x^12 + 15168*x^13 + 501100*x^14 + 7552*x^15 + 284903*x^16 - 2000*x^17 + 71135*x^18)*Sin[(2*Pi)/11 - 4*x] - 88*(-1 + x^2)^2*(24861 + 95*x + 133003*x^2 - 544*x^3 + 356438*x^4 + 1364*x^5 + 658074*x^6 - 2080*x^7 + 892008*x^8 + 2330*x^9 + 892008*x^10 - 2080*x^11 + 658074*x^12 + 1364*x^13 + 356438*x^14 - 544*x^15 + 133003*x^16 + 95*x^17 + 24861*x^18)*Sin[Pi/11 - 2*x] + 
   44*(-1 + x^2)^2*(49678 + 313*x + 263726*x^2 + 2432*x^3 + 721096*x^4 - 13172*x^5 + 1305608*x^6 + 25792*x^7 + 1788660*x^8 - 30730*x^9 + 1788660*x^10 + 25792*x^11 + 1305608*x^12 - 13172*x^13 + 721096*x^14 + 2432*x^15 + 263726*x^16 + 313*x^17 + 49678*x^18)*Sin[(2*Pi)/11 - 2*x] - 88*(-1 + x^2)^2*(24933 + 132587*x^2 + 357438*x^4 + 656850*x^6 + 892576*x^8 + 892576*x^10 + 656850*x^12 + 357438*x^14 + 132587*x^16 + 24933*x^18)*Sin[2*x] + 11*(-1 + x^2)^2*(71095 + 279167*x^2 + 540620*x^4 + 809084*x^6 + 1052546*x^8 + 1052546*x^10 + 809084*x^12 + 540620*x^14 + 279167*x^16 + 71095*x^18)*Sin[4*x] + 
   22*(-1 + x^2)^2*(52469 + 321557*x^2 + 939580*x^4 + 1780540*x^6 + 2410878*x^8 + 2410878*x^10 + 1780540*x^12 + 939580*x^14 + 321557*x^16 + 52469*x^18)*Sin[6*x] - 44*(-1 + x^2)^2*(16415 + 72039*x^2 + 155692*x^4 + 239068*x^6 + 303218*x^8 + 303218*x^10 + 239068*x^12 + 155692*x^14 + 72039*x^16 + 16415*x^18)*Sin[8*x] - 22*(-1 + x^2)^2*(12349 + 111213*x^2 + 386380*x^4 + 778028*x^6 + 1071326*x^8 + 1071326*x^10 + 778028*x^12 + 386380*x^14 + 111213*x^16 + 12349*x^18)*Sin[10*x] + 
   11*(-1 + x^2)^2*(24619 + 134995*x^2 + 343772*x^4 + 566732*x^6 + 699354*x^8 + 699354*x^10 + 566732*x^12 + 343772*x^14 + 134995*x^16 + 24619*x^18)*Sin[12*x] + 44*(-1 + x^2)^2*(1 + x^2)^3*(309 + 7714*x^2 + 19099*x^4 + 19484*x^6 + 19099*x^8 + 7714*x^10 + 309*x^12)*Sin[14*x] - 176*(-1 + x^2)^2*(1 + x^2)^5*(277 + 428*x^2 + 638*x^4 + 428*x^6 + 277*x^8)*Sin[16*x] + 11264*(-1 + x^2)^2*(1 + x^2)^7*(1 - 4*x^2 + x^4)*Sin[18*x] - 2816*(-1 + x^2)^2*(1 + x^2)^9*Sin[20*x] + 1024*(1 + x^2)^11*Sin[22*x] + 
   88*(-1 + x^2)^2*(24861 - 95*x + 133003*x^2 + 544*x^3 + 356438*x^4 - 1364*x^5 + 658074*x^6 + 2080*x^7 + 892008*x^8 - 2330*x^9 + 892008*x^10 + 2080*x^11 + 658074*x^12 - 1364*x^13 + 356438*x^14 + 544*x^15 + 133003*x^16 - 95*x^17 + 24861*x^18)*Sin[Pi/11 + 2*x] - 44*(-1 + x^2)^2*(49678 - 313*x + 263726*x^2 - 2432*x^3 + 721096*x^4 + 13172*x^5 + 1305608*x^6 - 25792*x^7 + 1788660*x^8 + 30730*x^9 + 1788660*x^10 - 25792*x^11 + 1305608*x^12 + 13172*x^13 + 721096*x^14 - 2432*x^15 + 263726*x^16 - 313*x^17 + 49678*x^18)*Sin[(2*Pi)/11 + 2*x] - 
   11*(-1 + x^2)^2*(71797 + 304*x + 276109*x^2 - 1728*x^3 + 546660*x^4 + 6848*x^5 + 802292*x^6 - 16704*x^7 + 1055654*x^8 + 22560*x^9 + 1055654*x^10 - 16704*x^11 + 802292*x^12 + 6848*x^13 + 546660*x^14 - 1728*x^15 + 276109*x^16 + 304*x^17 + 71797*x^18)*Sin[Pi/11 + 4*x] + 11*(-1 + x^2)^2*(71135 + 2000*x + 284903*x^2 - 7552*x^3 + 501100*x^4 - 15168*x^5 + 892828*x^6 + 96640*x^7 + 1002546*x^8 - 151840*x^9 + 1002546*x^10 + 96640*x^11 + 892828*x^12 - 15168*x^13 + 501100*x^14 - 7552*x^15 + 284903*x^16 + 2000*x^17 + 71135*x^18)*Sin[(2*Pi)/11 + 4*x] - 
   22*(-1 + x^2)^2*(52055 - 1138*x + 320735*x^2 + 2304*x^3 + 946060*x^4 + 1256*x^5 + 1770172*x^6 - 7552*x^7 + 2416002*x^8 + 10260*x^9 + 2416002*x^10 - 7552*x^11 + 1770172*x^12 + 1256*x^13 + 946060*x^14 + 2304*x^15 + 320735*x^16 - 1138*x^17 + 52055*x^18)*Sin[Pi/11 + 6*x] + 22*(-1 + x^2)^2*(52293 - 643*x + 316745*x^2 - 15936*x^3 + 923528*x^4 + 17596*x^5 + 1837824*x^6 + 40320*x^7 + 2374634*x^8 - 82674*x^9 + 2374634*x^10 + 40320*x^11 + 1837824*x^12 + 17596*x^13 + 923528*x^14 - 15936*x^15 + 316745*x^16 - 643*x^17 + 52293*x^18)*Sin[(2*Pi)/11 + 6*x] + 
   44*(-1 + x^2)^2*(16381 + 278*x + 72181*x^2 - 1872*x^3 + 153700*x^4 + 2344*x^5 + 244532*x^6 + 3024*x^7 + 299638*x^8 - 7548*x^9 + 299638*x^10 + 3024*x^11 + 244532*x^12 + 2344*x^13 + 153700*x^14 - 1872*x^15 + 72181*x^16 + 278*x^17 + 16381*x^18)*Sin[Pi/11 + 8*x] - 44*(-1 + x^2)^2*(16423 + 949*x + 75359*x^2 + 2168*x^3 + 145884*x^4 - 28660*x^5 + 205484*x^6 - 6072*x^7 + 343282*x^8 + 63230*x^9 + 343282*x^10 - 6072*x^11 + 205484*x^12 - 28660*x^13 + 145884*x^14 + 2168*x^15 + 75359*x^16 + 949*x^17 + 16423*x^18)*Sin[(2*Pi)/11 + 8*x] + 
   22*(-1 + x^2)^2*(12671 - 1126*x + 106967*x^2 - 3840*x^3 + 386652*x^4 + 8440*x^5 + 792300*x^6 + 4480*x^7 + 1060706*x^8 - 15908*x^9 + 1060706*x^10 + 4480*x^11 + 792300*x^12 + 8440*x^13 + 386652*x^14 - 3840*x^15 + 106967*x^16 - 1126*x^17 + 12671*x^18)*Sin[Pi/11 + 10*x] - 11*(-1 + x^2)^2*(25489 + 2864*x + 137929*x^2 - 5184*x^3 + 324500*x^4 - 29760*x^5 + 540900*x^6 + 5184*x^7 + 740654*x^8 + 53792*x^9 + 740654*x^10 + 5184*x^11 + 540900*x^12 - 29760*x^13 + 324500*x^14 - 5184*x^15 + 137929*x^16 + 2864*x^17 + 25489*x^18)*Sin[Pi/11 + 12*x] - 
   44*(-1 + x^2)^2*(1 + x^2)^3*(163 - 1336*x + 4846*x^2 - 3096*x^3 + 17933*x^4 + 4432*x^5 + 27844*x^6 + 4432*x^7 + 17933*x^8 - 3096*x^9 + 4846*x^10 - 1336*x^11 + 163*x^12)*Sin[Pi/11 + 14*x] + 176*(-1 + x^2)^2*(1 + x^2)^5*(221 - 176*x + 76*x^2 - 976*x^3 - 850*x^4 - 976*x^5 + 76*x^6 - 176*x^7 + 221*x^8)*Sin[Pi/11 + 16*x] + 5632*x*(1 + x)^2*(1 + x^2)^7*(1 + 6*x - 6*x^2 + 6*x^3 + x^4)*Sin[Pi/11 + 18*x] - 2816*(-1 + x^2)^2*(1 + x^2)^9*Sin[Pi/11 + 20*x] + 2816*(-1 + x^2)^2*(1 + x^2)^9*Sin[(2*Pi)/11 + 20*x] + 
   22*(-1 + x^2)^2*(12691 - 163*x + 109863*x^2 - 832*x^3 + 383904*x^4 - 1732*x^5 + 782968*x^6 + 2688*x^7 + 1069870*x^8 + 78*x^9 + 1069870*x^10 + 2688*x^11 + 782968*x^12 - 1732*x^13 + 383904*x^14 - 832*x^15 + 109863*x^16 - 163*x^17 + 12691*x^18)*Sin[(5/11)*(Pi + 22*x)] + 11*(-1 + x^2)^2*(24569 + 64*x + 135985*x^2 + 512*x^3 + 345204*x^4 + 2816*x^5 + 565188*x^6 - 512*x^7 + 698526*x^8 - 5760*x^9 + 698526*x^10 - 512*x^11 + 565188*x^12 + 2816*x^13 + 345204*x^14 + 512*x^15 + 135985*x^16 + 64*x^17 + 24569*x^18)*Sin[(4/11)*(Pi + 33*x)] - 
   11*(-1 + x^2)^2*(24747 + 1472*x + 141523*x^2 + 16640*x^3 + 386524*x^4 + 96000*x^5 + 742092*x^6 + 278272*x^7 + 1064410*x^8 + 394880*x^9 + 1064410*x^10 + 278272*x^11 + 742092*x^12 + 96000*x^13 + 386524*x^14 + 16640*x^15 + 141523*x^16 + 1472*x^17 + 24747*x^18)*Sin[(3/11)*(Pi + 44*x)] - 176*(-1 + x^2)^2*(1 + x^2)^5*(247 + 612*x^2 + 330*x^4 + 612*x^6 + 247*x^8)*Sin[(4/11)*(Pi + 44*x)] - 2816*(-1 + x^2)^2*(1 + x^2)^9*Sin[(5/11)*(Pi + 44*x)] - 
   22*(-1 + x^2)^2*(12221 - 3473*x + 96577*x^2 - 38720*x^3 + 312232*x^4 - 91180*x^5 + 724000*x^6 + 37632*x^7 + 1214266*x^8 + 191482*x^9 + 1214266*x^10 + 37632*x^11 + 724000*x^12 - 91180*x^13 + 312232*x^14 - 38720*x^15 + 96577*x^16 - 3473*x^17 + 12221*x^18)*Sin[(2/11)*(Pi + 55*x)] + 2816*(-1 + x^2)^2*(1 + x^2)^9*Sin[(4/11)*(Pi + 55*x)] + 11*(-1 + x^2)^2*(23859 - 5056*x + 114715*x^2 - 69376*x^3 + 157564*x^4 - 406272*x^5 - 170772*x^6 - 1110272*x^7 - 715190*x^8 - 1536640*x^9 - 715190*x^10 - 1110272*x^11 - 170772*x^12 - 406272*x^13 + 157564*x^14 - 69376*x^15 + 114715*x^16 - 5056*x^17 + 23859*x^18)*
    Sin[(2/11)*(Pi + 66*x)] - 704*(-1 + x^2)^2*(1 + x^2)^7*(1 - 34*x^2 + x^4)*Sin[(3/11)*(Pi + 66*x)] + 44*(1 + x)^2*(1 + x^2)^3*(473 - 498*x + 9059*x^2 - 13716*x^3 + 30401*x^4 - 26670*x^5 + 54275*x^6 - 24728*x^7 + 54275*x^8 - 26670*x^9 + 30401*x^10 - 13716*x^11 + 9059*x^12 - 498*x^13 + 473*x^14)*Sin[(2/11)*(Pi + 77*x)] - 176*(-1 + x^2)^2*(1 + x^2)^5*(249 + 16*x + 668*x^2 + 112*x^3 + 470*x^4 + 112*x^5 + 668*x^6 + 16*x^7 + 249*x^8)*Sin[(2/11)*(Pi + 88*x)] + 704*(-1 + x^2)^2*(1 + x^2)^7*(1 - 34*x^2 + x^4)*Sin[(2/11)*(Pi + 99*x)])

using Plot[ConditionalExpression[1, -3 <= compiledfunc[x] <= 3], {x, 12, 13}, PlotPoints -> 100000, PlotStyle -> Directive[Red, CapForm["Butt"], Thickness[.007]], Axes ->{False, False}], I get enter image description here

$\endgroup$
6
  • $\begingroup$ when I set the mentioned items a big number, it takes a lot of time That is really to be expected, If you set PlotPoints -> 1000, MaxRecursion -> 15 it will take much longer than PlotPoints -> 20, MaxRecursion -> 2. $\endgroup$
    – Nasser
    Commented Nov 21, 2022 at 21:04
  • $\begingroup$ @Nasser That is why I am looking for an alternative since small numbers for PlotPoints and MaxRecursion does not help me. Actually, I ran PlotPoints-> 200000 and MaxRecursion-> 15, and WorkingPrecision->500 on a PC and I am waiting for the result but I need to do this for a large number of functions so it might be disappointing. $\endgroup$
    – Phys96
    Commented Nov 21, 2022 at 21:44
  • $\begingroup$ Why did you use Func:= instead of Func= ? $\endgroup$ Commented Nov 22, 2022 at 11:03
  • $\begingroup$ @userrandrand It was just a mistake. Does this $:=$ increase timing? $\endgroup$
    – Phys96
    Commented Nov 22, 2022 at 13:01
  • 1
    $\begingroup$ Since you are new, allow me to add the point that a good practice is not to use capitals when naming things. Only internally named functions and constants start with capitals, then, and you avoid clashes with items like I, N, D, E, etc. $\endgroup$
    – Nicholas G
    Commented Nov 23, 2022 at 0:08

1 Answer 1

1
$\begingroup$

I will address 3 points:

  • There is a pole that is easy to remove.

  • The function is very long you might want to compile it.

  • I do not understand why you want such high precision in a plot but there are other ways to obtain those lines


Removing the poles from the analysis

The function has poles from the Csc function. They can be removed by considering instead the function:

deflated = Func[x]/Csc[x]^11;

I placed an explantion of how I found that at the end of this section and before the next section.

Then, instead of considering the equation Func[x]==3 for example we can consider deflated==3*Sin[x]^11 or deflated-3*Sin[x]^11 which is a non singular equation in the interval you are considering (note there are still poles at x=1 and x=-1).


How I found that in that long expression:

I checked the different types of functions by using

Cases[Func[x], _[_], All] // DeleteDuplicates

I noticed the Csc. I looked for its positions in the expression using:

Position[Func[x], Csc[x]]

I obtained {{4, 1}}

Func[x][[4]]

evaluates to

Csc[x]^11

I checked the Head of Func and saw it is times, I check the number of terms with Length and used //Together //Denominator on the most complicated term to check that there are no other poles



Compilation

It turns out that your problem seems to require high accuracy which Compile does not support see however posts on stack exchange that use NumericalFunction to obtain high accuracy.

Also, in the next section NDSolve will be use and there was no benefit in using compilation. As I understand, NDSolve compiles automatically when it sees fit. For a discussion about that see here. The benefit of compilation here is if you really want to use plot.

(see update mentions in bold)

Compiling is tricky because not all functions can be compiled and in the default setting of Compile it will not display any error if it skips compilation and just evaluates the function as usual. To make compile complain if something is wrong :

SetSystemOptions[
  "CompileOptions" -> "CompileReportExternal" -> True];
On[Compile::noinfo]

I do not remember what each one does I just remember I saved them for whenever I want to compile a function. If you are interested see this reference on stack exchange here

I changed Func:= to Func[x_]:= because I do not see the point of Func:= in that expression. To compile the function one may use:

Note: …=\[Ellipsis]

update

deflated…compiled = 
  Compile[{{x, _Real}}, Evaluate@deflated];

Test the speed difference:

update

RepeatedTiming[
  deflated…compiled[
    RandomReal[{11, 16}]];] // ScientificForm 

RepeatedTiming[deflated /. x -> RandomReal[{11, 16}];] // 
  ScientificForm // TeXForm

$$\left\{2.31868\times 10^{-5},\text{Null}\right\}$$

$$\left\{1.46028\times 10^{-3},\text{Null}\right\}$$

So you might expect a 10 to 100 times speed up.


Alternative method using NDSolve (updated)

To obtain crossings of a function $f$ one can solve the differential equation:

$$y'(x)=f'(x), \qquad y(x_{\text{min}})=f(x_{\text{min}})$$

such that $y(x)=f(x)$ and use WhenEvent to detect special points such as crossings. We will compare the compile and non compiled case.

The crossing condition can be written as :

Abs[deflated]==Abs[3*Sin[x]^11]

where Abs was introduced to incorporate both Func[x]==3 and Func[x]==-3

Default precision

Solve the differential equation with WhenEvent:

xmin = 11;
xmax = 16; AbsoluteTiming[
 res = Reap[
    NDSolve[{s'[x] == ddeflated, s[xmin] == (deflated /. x -> xmin), 
      WhenEvent[Abs[s[x]] == Abs[3*Sin[x]^11], Sow[x]]}, 
     s, {x, xmin, xmax}]];]

Timing: 0.12 seconds

Check:

Plot[Abs[s[x]] - Abs[3*Sin[x]^11] /. res[[1, 1, 1]], {x, xmin, xmax}, 
 PlotRange -> {-0.1, 0.1}, 
 Epilog -> {PointSize[Large], Red, Point[{#, 0} & /@ res[[2, 1]]]}]

The red points bellow represent the crossings Func[x]==3 or Func[x]==-3 which are translated to zeroes of the functions considered in the plot.

enter image description here

Notice that there are no zeroes in the interval you showed in your update. This is in fact an artifact here of low precision and there are indeed 0's in that interval.

  • High Precision

Solve the differential equation (I did not check if a lower precision is enough) :

xmin = 11;
xmax = 16; AbsoluteTiming[
 res = Reap[
    NDSolve[{s'[x] == ddeflated, s[xmin] == (deflated /. x -> xmin), 
      WhenEvent[Abs[s[x]] == Abs[3*Sin[x]^11], Sow[x]]}, 
     s, {x, xmin, xmax}, PrecisionGoal -> 15, AccuracyGoal -> 15, 
     WorkingPrecision -> 20]];]

Timing : 13.4 seconds

Plot[Abs[s[x]] - Abs[3*Sin[x]^11] /. res[[1, 1, 1]], {x, xmin, xmax}, 
 PlotRange -> {-0.1, 0.1}, 
 Epilog -> {PointSize[Large], Red, Point[{#, 0} & /@ res[[2, 1]]]}]

enter image description here

The points can be also viewed with NumberLinePlot :

res[[2, 1]] // NumberLinePlot

enter image description here

We can extract the points between 12 and 13 :

Select[res[[2, 1]], 12 < # < 13 &]

{12.461458413778561480, 12.461645303474289146, 12.473084286833757123, \ 12.474549028597047319, 12.477815775272624841, 12.481004423258161594, \ 12.482612164386612858, 12.487570045422328843, 12.660291420025539393, \ 12.668827725840002865}

From those points you could just draw the lines with Line and Graphics

$\endgroup$
14
  • 1
    $\begingroup$ @Phys96 did you use ConditionalExpression[1, -3 <= compiledfunc <= 3] or ConditionalExpression[1, -3 <= compiledfunc[x] <= 3] in the plot ? It should be -3 <= compiledfunc[x] <= 3 $\endgroup$ Commented Nov 22, 2022 at 13:15
  • 1
    $\begingroup$ On my computer it works with compiledfunc[x] $\endgroup$ Commented Nov 22, 2022 at 13:18
  • 1
    $\begingroup$ @Phys96 it has the same precision when using the default working precision. However it is unable to compute high precision for example check the difference between the compiled and non compile versions on N[Pi/4,40] $\endgroup$ Commented Nov 22, 2022 at 14:38
  • 1
    $\begingroup$ I never used Compile for high precision but you can search here for "Compile Precision". For example this one $\endgroup$ Commented Nov 22, 2022 at 14:40
  • 1
    $\begingroup$ There is also a new compiler for Mathematica but I do not know how to use it. It supports 64 bit double precision see here $\endgroup$ Commented Nov 22, 2022 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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