What kind of curve is made of half circles? 
I have this curve. It's definitely no sine or cosine. It consists of half circles. How do you call it and how do you describe it mathematically?
 A: Let's define a family of functions ($ r $ is the radius of a semicircle and $ n\in \mathbb {Z}$):
$$f_n(x, r)=(-1)^n\sqrt {r^2-(x-nr)^2}$$
Then the function you're looking for is (viewing functions as sets):
$$F (x, r)=\bigcup_{n\in \mathbb {Z}} f_n (x, r)$$
I don't know the name for this function and I honestly don't think it has one. 
A: The Fourier series corresponding the curve is on the form :
$$y(x)=a_0+\sum_{n=1}^\infty \big(a_n \cos(\frac{n\pi x}{2r})+b_n \sin(\frac{n\pi x}{2r}) \big)$$
with $a_0=0$ and $b_n=0$
$$a_n=\frac{1}{L}\int_{-L}^L f(x) \cos(\frac{n\pi x}{L})dx=\frac{1}{2r}\int_{-2r}^{2r} f(x) \cos(\frac{n\pi x}{2r})dx$$
where $L=2r$ and $f(x)=\sqrt{r^2-x^2}$ in $-r<x<r$ and $f(x)=-\sqrt{r^2-x^2}$  in $-2r<x<-r$ and in $r<x<2r$
The functions are even, which allows  the simplification :
$$a_n=\frac{1}{2r}4\int_{0}^{r} \sqrt{r^2-x^2} \cos(\frac{n\pi x}{2r})dx=\frac{2r}{n}J_1(\frac{\pi}{2}n)$$
$J_1$ is the Bessel function of the first kind and of order $n$.
$$y(x)=2r\sum_{n=1}^\infty \frac{1}{n}J_1(\frac{\pi}{2}n) \cos(\frac{n\pi x}{2 r})$$
This is only for theoretical interest. On the practical viewpoint, drawing the curve from the Fourier series is of no interest at all. The series is far to be quickly convergent and the numerical computation of the Bessel functions would be too much time consuming.
A: Bruteforced answer (don't take this too seriously)
\begin{equation}
y=\sqrt{1-(x-2n)^2}, \qquad n\in\mathbb{Z} \\
y \ge 0 \quad \text{if} \quad n|2 \\
y \le 0 \quad \text{if} \quad n\not|\ 2 
\end{equation}
Replace $1$ with $r^2$ if you want the semi-circles of arbitrary radius.
A: 
30 terms of the series given by  Plot[Pi (BesselJ[1, Pi/2] Sin[x] - (BesselJ[1, (3 Pi)/2] Sin[3 x])/ 3 + (BesselJ[1, (5 Pi)/2] Sin[5 x])/ 5 - (BesselJ[1, (7 Pi)/2] Sin[7 x])/ 7 + (BesselJ[1, (9 Pi)/2] Sin[9 x])/9 ), {x, -50, 50}] has blocks that look like semi-circles of the form : Plot [Sqrt[ (Pi/2)^2 - (x - Pi/2)^2], {x, 0,Pi } ] , 
A: To avoid convergence issues due to a Fourier Series, you could realize the periodicity using functions like Mod And Floor:
$$
\sqrt{1-(((x+1) \bmod 2)-1)^2} \left(1-2 \left\lfloor (\frac{x+1}{2} \bmod 2)\right\rfloor \right)
$$
A: It is not "a" or one smooth curve. It is a wave form of an infinite series of curves with second order discontinuity at $ x = (2 k-1) \pi/2 $, slope and point continuities are ok.  At every point on the x-axis curvature jumps from $ -\pi/2  \rightarrow  +\pi/2$ then  again $ -\pi/2 \rightarrow  + \pi/2 ..$ 
We can evaluate coefficients in a Fourier series as for any periodic wave, as  smoothness is not required. In electrical engg. applications such waves create infinite current flow at every jump point, so cannot be adopted. 
If you want non-infinite slope then they are not full semi-circles.The wave can be defined as a sloping straight line and then as a circle from tangent point..
Integrating an ODE 
$$ \dfrac {y'' y}{1+ y'^2 }= - 2 $$
you get a curve Elastica having proportion 1.2: 1 width/height with better curvature continuity.
A: There's one really close to that one, but those aren't really semicircles, it goes like this $$y=\sin(x)+\sin(y)$$ Don't know if it is what you're looking for but I hope it helps.

A: Note that a half-circle centered at $x=c$ with radius $r$ is of the form $y = \pm \sqrt{r^2-(x-c)^2}$, where the sign is based on the center of the circle. Now we can use a step function to jump discretely from one half-circle to the next. Let $c = \text{round}(\frac{x}{r})r$ where "round" rounds to the nearest integer (and rounds arbitrarily when its argument is halfway between two integers). Let $s = 1 - 2(c \text{ mod } 2)$, which gives 1 or $-1$, respectively, when $c$ is the center of a circle going above or below the $x$ axis. Then we get the formula for the entire curve $y = s\sqrt{r^2-(x-c)^2}$.
