desmos.com graph only goes from -π/2 το +π/2

76 Views Asked by At

Here is my graph: https://www.desmos.com/calculator/l8o2bapufk

If you do not want to visit the link, here is a screenshot:

The dashed line is the built-in sin(x) function.

The superimposed orange line is an approximation function.

My question is:

Why is desmos only plotting the part between -π/2 and +π/2 ?

I would have expected the orange line to extend over all of the dashed line, covering it entirely.

The other two approximation functions (hidden away in folders) do not suffer from this problem.

(I tried adding a desmos.com tag, but apparently I need to have 1000 rep to add a new tag.)

A recap of the answer:

As Michael Riberdy answered, the graph does not end there where it seems to end, it continues waaaay out of the screen, so you have to zoom out a lot (or zoom to fit) in order to see it.

As Troposphere wrote in a comment, the discontinuity is due to a faulty term, and the fault is mine. The original code was:

x -= 0.25 + Math.floor( x + 0.25 );

and I naively transcribed this as

f33(x) = x - 0.25 + floor( x + 0.25 )

while in fact I should have of course transcribed it as

f33(x) = x - 0.25 - floor( x + 0.25 )

due to operator precedence.

1

There are 1 best solutions below

3
On BEST ANSWER

You need to zoom out to see the rest.