HP Forums

Full Version: Plotting a function not working correctly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey!
I've been experimenting and finding roots of polynomials graphically but today I came across a weird glitch.
I tried to plot the following function: 0.1x^5 + 1.3x^4 - x^3 - 15x^2 - 8x - 1, a function that has 5 different roots.
The problem is that I cannot see the line that is supposed to cross the x-axis for the first time, all I see are very sparsely scattered dots instead of a continuous line.
Has anyone else come across such a problem before on the Prime? If so, have you found a fix for it?
(04-13-2015 03:46 PM)Ollie Wrote: [ -> ]Hey!
I've been experimenting and finding roots of polynomials graphically but today I came across a weird glitch.
I tried to plot the following function: 0.1x^5 + 1.3x^4 - x^3 - 15x^2 - 8x - 1, a function that has 5 different roots.
The problem is that I cannot see the line that is supposed to cross the x-axis for the first time, all I see are very sparsely scattered dots instead of a continuous line.
Has anyone else come across such a problem before on the Prime? If so, have you found a fix for it?

Check your plot settings. Press [Shift][Plot] to open the plot settings, and look at the second page of settings (use the menu option at the bottom of the screen to get to different pages of settings).
(04-13-2015 03:46 PM)Ollie Wrote: [ -> ]Hey!
I've been experimenting and finding roots of polynomials graphically but today I came across a weird glitch.
I tried to plot the following function: 0.1x^5 + 1.3x^4 - x^3 - 15x^2 - 8x - 1, a function that has 5 different roots.
The problem is that I cannot see the line that is supposed to cross the x-axis for the first time, all I see are very sparsely scattered dots instead of a continuous line.
Has anyone else come across such a problem before on the Prime? If so, have you found a fix for it?

Plots ok on my Prime. You have to zoom in on the x-axis quite a bit to see where the curve crosses the axis. As Han suggested, check your plot settings to make sure your plot style is either fixed step segments or Adaptive-not fixed step dots.
Unfortunately I'm still having problems with this.
I can see all the other intersections but there's one missing at x ~ -12.91
[Image: 315b2ff8f2.png]
Settings:
[Image: 05a7546c2e.png]
The more I go up the more lonely single dots I can see on the curve. :/
[Image: f13b9a1213.png]
(04-18-2015 11:43 AM)Ollie Wrote: [ -> ]Unfortunately I'm still having problems with this.
I can see all the other intersections but there's one missing at x ~ -12.91
[Image: 315b2ff8f2.png]
Settings:
[Image: 05a7546c2e.png]
The more I go up the more lonely single dots I can see on the curve. :/
[Image: f13b9a1213.png]
Nothing really new to me here... Note that the 50g does a perfect job here, just much slower.
(04-18-2015 12:05 PM)Tugdual Wrote: [ -> ]Nothing really new to me here... Note that the 50g does a perfect job here, just much slower.

Are you trying to say that this is intended and not a bug/glitch of some sort?
Because if it is then that's just outright dumb, even my TI84 can graph the function perfectly without leaving any lonely dots on the curve.
(04-18-2015 12:09 PM)Ollie Wrote: [ -> ]
(04-18-2015 12:05 PM)Tugdual Wrote: [ -> ]Nothing really new to me here... Note that the 50g does a perfect job here, just much slower.

Are you trying to say that this is intended and not a bug/glitch of some sort?
Because if it is then that's just outright dumb, even my TI84 can graph the function perfectly without leaving any lonely dots on the curve.
I don't think it is intended, I'm just meant that it is a glitch I have seen a long time ago and was never fixed.
Hi,
If you use the Advanced Graphing, you will see the correct graph, but this is very long and not very practicaly. All my TI calculator can graph this fonction correctly!
Marcel
I'll ch k this out when I get home.

In the meantime, try out solve(), zeros() and fsolve() in CAS which should all give you solutions quickly.
Hi,

It looks like to be able to see the whole part of the graph that includes all roots, you need to set the x-range to include all roots, and the y-range to be at least the max/min of your polynomial over the selected x-range. In this case x from -15 to 15 and y from -100 to 100 seem to work. An estimate for the x-range can be easily found (Lagrange).
(04-18-2015 04:52 PM)Alberto Candel Wrote: [ -> ]Hi,

It looks like to be able to see the whole part of the graph that includes all roots, you need to set the x-range to include all roots, and the y-range to be at least the max/min of your polynomial over the selected x-range. In this case x from -15 to 15 and y from -100 to 100 seem to work. An estimate for the x-range can be easily found (Lagrange).

Ooh, It works!
It seems like the calculator sort of dismisses the parts that go outside your x- and y-ranges but setting the correct ranges fixes it.
Kinda annoying, but I guess we can live with it.
Thanks!
The max of your polynomial over the range of the roots (like -15<x<3) is not larger than 3000, but the plot shows the relevant part (the 5 roots) with a y-range setting of about +/-100.
Reference URL's