Can Grapher plot periodic functions, other than trigonometric ones?

Solution 1:

Yes, indeed it can:

  • Square wave: try something like y = (-1)^round(x)(but with proper formatting). Something like y = (round(x+0.5) - round(x)) - 0.5 would also work.

  • Sawtooth wave: try something like y = x mod 1 or, more elaborately, y = 2((x-0.5) mod 1) - 1. However, something like y = x - round(x) would also work. If you don't like any of these, try something like y = x - floor(x).

The triangular wave is left as an exercise to the reader ;-)

Of course, you can also use the truncated Fourier series, but that may be too wiggly for your taste.