Defining a function whose graph consists of a periodic "wave" formed from quarter circles

567 Views Asked by At

I draw a unit circle's first quadrant as in figure $1$ and define $y$ in terms of $n$ as $y=\sqrt{1-n^2}$. I can also plot this in MATLAB or Python.

But if all four quadrants of the unit circle forms a periodic function as in figure $2$, how is $y$ defined in terms of $n$? I want to plot that function in figure $2$ but cannot define it.

enter image description here

I dont want an angular variable, I want $y$ in terms of only $n$ for $n\geq0$.

1

There are 1 best solutions below

0
On BEST ANSWER

Your first semicircle is $y=\sqrt{1-(1-n)^2}$. The whole graph is $y=\pm\sqrt{1-(N-n)^2}$ where $N$ is the closest odd integer to $n$ and the sign is chosen by whether $N \equiv 1 \pmod 4$, where it is positive, or $N \equiv 3 \pmod 3$, where it is negative.