Message Boards Message Boards

0
|
5516 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Polynomial dissappears when I multiply it

Hi

I have houndreth degree polynomial (fit) with parameters: c*(d + (fit /. x -> ((x - b)*a))). I use Manipulate and when I set a value to 30, polynomial dissapears. It's only work when I set a to 5 (max) or when I create third-degree polynomial, then I can set a value up to 30 (it's ok for me). How can I fix this problem? I try fit my polynomial to different polynomial using Manipulate, code below:
fit = Fit[data, poly[100][x], x];
Manipulate[
Show[ListPlot[Table[Fibonacci[nn], {nn, 0, 20}]],
  Plot[c*(d + (% /. x -> ((x - b)*a))), {x, 0, 20}]], {{a, 1, "a"}, 1}, {{b, 0, "b"}, 0}, {{c, 1, "c"}, 0}, {{d, 0, "d"}, 0}]
And this is my polynomial:
 218.597 + 10.3811 x - 0.995269 x^2 + 0.0419396 x^3 -
  0.000969961 x^4 + 0.0000140334 x^5 - 1.35737*10^-7 x^6 +
  9.0551*10^-10 x^7 - 4.18387*10^-12 x^8 + 1.30252*10^-14 x^9 -
  2.49449*10^-17 x^10 + 2.05457*10^-20 x^11 + 1.66627*10^-23 x^12 -
  3.78439*10^-26 x^13 - 2.20638*10^-29 x^14 + 5.07858*10^-32 x^15 +
  5.90353*10^-35 x^16 - 3.30093*10^-38 x^17 - 1.19016*10^-40 x^18 -
  7.72885*10^-44 x^19 + 8.74122*10^-47 x^20 + 2.31766*10^-49 x^21 +
  1.94234*10^-52 x^22 - 6.20867*10^-56 x^23 - 3.94067*10^-58 x^24 -
  5.50718*10^-61 x^25 - 3.31916*10^-64 x^26 + 2.64175*10^-67 x^27 +
9.86066*10^-70 x^28 + 1.41063*10^-72 x^29 + 1.1316*10^-75 x^30 -
1.29376*10^-80 x^31 - 1.78074*10^-81 x^32 - 3.50754*10^-84 x^33 -
4.27279*10^-87 x^34 - 3.22009*10^-90 x^35 + 5.2336*10^-95 x^36 +
5.15277*10^-96 x^37 + 1.07321*10^-98 x^38 + 1.4629*10^-101 x^39 +
1.43733*10^-104 x^40 + 7.86462*10^-108 x^41 - 5.62756*10^-111 x^42 -
2.4675*10^-113 x^43 - 4.52501*10^-116 x^44 - 6.06547*10^-119 x^45 -
6.27759*10^-122 x^46 - 4.36006*10^-125 x^47 + 2.22605*10^-129 x^48 +
7.42171*10^-131 x^49 + 1.6386*10^-133 x^50 + 2.525*10^-136 x^51 +
3.12155*10^-139 x^52 + 3.07975*10^-142 x^53 + 2.05012*10^-145 x^54 -
2.26051*10^-149 x^55 - 3.79444*10^-151 x^56 - 8.37637*10^-154 x^57 -
1.3234*10^-156 x^58 - 1.71611*10^-159 x^59 - 1.85072*10^-162 x^60 -
1.53713*10^-165 x^61 - 5.9878*10^-169 x^62 + 1.08073*10^-171 x^63 +
3.47931*10^-174 x^64 + 6.37911*10^-177 x^65 + 9.29457*10^-180 x^66 +
1.14416*10^-182 x^67 + 1.17558*10^-185 x^68 + 9.06958*10^-189 x^69 +
2.21176*10^-192 x^70 - 9.50832*10^-195 x^71 - 2.59087*10^-197 x^72 -
4.54238*10^-200 x^73 - 6.46034*10^-203 x^74 - 7.78592*10^-206 x^75 -
7.76866*10^-209 x^76 - 5.53614*10^-212 x^77 - 2.94067*10^-216 x^78 +
8.38913*10^-218 x^79 + 2.02063*10^-220 x^80 + 3.3642*10^-223 x^81 +
4.55856*10^-226 x^82 + 5.12104*10^-229 x^83 + 4.41889*10^-232 x^84 +
1.79794*10^-235 x^85 - 3.19992*10^-238 x^86 - 1.04824*10^-240 x^87 -
1.89737*10^-243 x^88 - 2.61657*10^-246 x^89 - 2.79632*10^-249 x^90 -
1.9078*10^-252 x^91 + 5.19433*10^-256 x^92 + 4.54755*10^-258 x^93 +
9.28597*10^-261 x^94 + 1.22419*10^-263 x^95 + 9.09785*10^-267 x^96 -
4.87788*10^-270 x^97 - 2.88002*10^-272 x^98 - 3.96187*10^-275 x^99 +
4.65783*10^-278 x^100
If I am understanding you correctly, the giant polynomial has been defined as the variable fit and you evaluating the Manipulate statement. The Manipulate statement works fine for many values of a,b,c,d, but for some values of the parameters, the expression c*(d + (fit /. x -> ((x - b)*a))) is not seen to be plotted in the result.

This is caused by the plot of c*(d + (fit /. x -> ((x - b)*a))) extending outside of the PlotRange of ListPlot[Table[Fibonacci, {nn, 0, 20}]].

When two plots are combined with Show, Show will use the PlotRange of the first argument to it, which in this case is ListPlot[Table[Fibonacci, {nn, 0, 20}]]. Anything from the second plot which lies outside of this range will get clipped, including the entire function's plot if it lies outside the PlotRange of the argument to Show.

To see this, switch the order of the arguments given to Show. You may want to use the PlotRange option inside the Show command to manaully control what the plot range will be.
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract