Looks like the online graphing programs do not recognise the discontinuity for these kinds of graphs. I tried desmos, geogebra and wolfram alpha. They all converted the function to sin2x before graphing them.
Is there a better graphing program out there that shows the discontinuity?