Definition:Square Wave

Definition
A square wave is a periodic real function $S: \R \to \R$ defined as follows:


 * $\forall x \in \R: \map S x = \begin {cases}

\delta + \gamma & : x \in \openint \alpha {\alpha + \lambda} \\ \delta - \gamma & : x \in \openint {\alpha - \lambda} \alpha \\ \map S {\alpha + 2 \lambda} : & x < \alpha - \lambda \\ \map S {\alpha - 2 \lambda} : & x > \alpha + \lambda \end {cases}$

where:
 * $\alpha$, $\lambda$, $\gamma$ and $\delta$ are given real constants.

Points of Discontinuity
The points $\alpha + n l$, for $n \in \Z$, are finite discontinuities.

The values $\map S \alpha$ and $\map S {\alpha + l}$ may or may not be explicitly defined.

It is a common approach to include either endpoint of the intervals from $\alpha$ to $\alpha + l$, and from $\alpha - l$ to $\alpha$, in order to ensure that the domain of $S$ is simply defined, for example:


 * $\forall x \in \R: \map S x = \begin {cases}

+c & : x \in \hointr \alpha {\alpha + l} \\ -c & : x \in \hointr {\alpha - l} \alpha \\ \map S {\alpha + 2 l} : & x < \alpha - l \\ \map S {\alpha - 2 l} : & x \ge \alpha + l \end {cases}$

Another approach is to make $\map S {\alpha + n l} = 0$ for