Desmos and Wolfram|Alpha - challenge plots

The following functions are challenging for any graph plotter to get right. Most of them involve discontinuities (where the values go off to +∞ or −∞) and are (by definition) not continuous.

Even simple curves like y = sin(x) are not quite right when the domain gets really large. There's the possibility where the curve no longer plots because it's reached its maximum number of data points, or may have more anomolies than the actual correct curve points.

1. Desmos plots

The following Desmos graphs all exhibit issues where the plot is not quite right, as you can see.

I've deliberately picked "unfortunate" domains and ranges for the following examples to demonstrate the problems they manifest. You can set the domain to −10 < x < 10 and range to −10 < y < 10 using the checkbox above each graph to get a better sense of what the graph should look like.

Animation: The Desmos graphs have "internal" animation (you can animate the a and q values - click on the » icon at the top left of each graph), but it wasn't even possible to animate the entire graphs like you can see in the JSXGraph rendering of these functions and the ASVG rendering.

Zoom: On a desktop, you can zoom in and out of the graphs using your mousewheel. You can zoom in the x- or y-directions only by holding down the <Shift> key on your keyboard and hovering over the respective axes while rotating the mousewheel.

Axis values are unreadable: You'll notice that as you zoom in or out, and as the graph becomes more "dense", it becomes impossible to see the numbers on the x- and/or y-axes. So it can be guesswork where to point for the zoom centre.

Other attempts

  1. You can see Wolfram|Alpha's attempts at these plots below the Desmos examples later on this page.
  2. JSXGraph is another math function plotter, which also has problems displaying these graphs when the domain is wide, and when animations are involved (but at least the animations were possible).

More successful plots

See the same functions using ASVG, a lightweight grapher that is fast and handles animations well, and where I've made use of the following to make things look better, and animate more successfully:

1. Graph of y = a tan(qx)

2. Graph of y = a tan(qx2)

3. Graph of y = a sin(qx)

4. Graph of y = ax sin(qx2)

5. Graph of $ y = \frac{1}{a \sin(qx) + \cos(qx\sqrt{3})} $

6. Graph of a Fourier series

$$ y = \frac{10}{\pi} \sum_{i=1}^{n}\frac{1}{2i-1}\sin\left(\frac{(2i-1)\pi x}{4}\right) $$

(Desmos script used with permission from Desmos Studio PBC)

Wolfram|Alpha plots

Here are screen shots of Wolfram|Alpha's attempts at the same 6 "challenge plots", using the same domain and range used in the Desmos examples above. There's also a link to each one so you can see the originals.

1. Wolfram|Alpha: Graph of y = tan(x)

This plot (with the given domain and range) should be a solid block of colour.

See it on Wolfram|Alpha

Plot of y = tan(x)

2. Wolfram|Alpha: Graph of y = tan(x2)

This plot should be 2 solid blocks of colour either side of the y-axis.

See it on Wolfram|Alpha

Plot of y = tan(x^2)

3. Wolfram|Alpha: Graph of y = sin(x)

This should be a solid block of colour between −1 and 1. You can see small anomalies where the local mimima and maxima don't quite make it to those values.

See it on Wolfram|Alpha

Plot of y = sin(x)

4. Wolfram|Alpha: Graph of y = x sin(x2)

This plot should appear to be 2 solid triangles, but as you can see, there are many gaps.

See it on Wolfram|Alpha

Plot of y = x sin(x^2)

5. Wolfram|Alpha: Graph of $ y = \frac{1}{ \sin(qx) + \cos(x\sqrt{3})} $

This should be a solid block of colour.

See it on Wolfram|Alpha

Plot of y=1/(sin(x)+cos(x sqrt(3)))

6. Wolfram|Alpha: Graph of a Fourier series

This should be a solid block of colour betwen −2.8 and 2.8.

See it on Wolfram|Alpha

Plot of Fourier series.