Derivative of $\lceil 1/x \rceil$ I'm looking for the derivative $\frac{d}{dx}\lceil 1/x \rceil$.
I would like to find a real number $1<x \le y$ satisfying the minimum of $\left\lceil \frac{y}{x} \right\rceil x$, when $y$ is a fixed value $>0$.
Is the ceiling function a problem ?
 A: Let $f(x)=\left\lceil\frac{y}x\right\rceil x$. If $x>y$, then $f(x)=x$, so $f(x)$ can be made arbitrarily large.
If we limit $x$ to the interval $[1,y]$, however, things are more interesting. Let $n=\lceil y\rceil$; as $x$ runs from $1$ to $y$, $\left\lceil\frac{y}x\right\rceil$ runs from $n$ down to $1$. Let $x_n=1$, and for $k=1,2,\ldots,n-1$ let $x_k=\frac{y}k$; then 
$$\left\{x\in[1,y]:\left\lceil\frac{y}x\right\rceil=k\right\}=[x_k,x_{k-1})\;.$$
For $2\le k\le n$ the function $f(x)$ is increasing on $[x_k,x_{k-1})$, and
$$\lim_{x\to x_{k-1}^-}f(x)=kx_{k-1}=\frac{ky}{k-1}\;,$$
though this limit is not attained. Finally, $\frac{k}{k-1}$ is maximized at $k=2$, so as $x$ approaches $x_1=y$ from the left, $f(x)$ approaches $2y$ from below. The function $f(x)$ does not actually attain a maximum on $[1,y]$, but it is bounded above by $2y$ and attains values arbitrarily close to this.
Added: Somehow I managed to read minimum as maximum. Of course the analysis above shows that the minimum on $[x_k,x_{k-1})$ is $$f(x_k)=k\frac{y}{x_k}=y\;,$$ so the function achieves a minimum value of $y$ at each $x_k$.
A: $\large x > 0:$

\begin{align}
\left\lceil x\right\rceil
&=
\Theta\left(x\right)\Theta\left(1 - x\right)
+
2\Theta\left(x - 1\right)\Theta\left(2 - x\right)
+
3\Theta\left(x - 2\right)\Theta\left(3 - x\right) + \cdots
\\[3mm]&=
\sum_{n = 0}^{\infty}\left(n + 1\right)\Theta\left(x - n\right)
\Theta\left(n + 1 - x\right)
\end{align}


\begin{align}
{{\rm d}\left\lceil x\right\rceil \over {\rm d}x}
&=
\sum_{n = 0}^{\infty}\left(n + 1\right)\left[%
\delta\left(x - n\right)
\Theta\left(n + 1 - x\right)
-
\Theta\left(x - n\right)
\delta\left(n + 1 - x\right)
\right]
\\[3mm]&=
\sum_{n = 0}^{\infty}\left(n + 1\right)\left[%
\delta\left(x - n\right)
\Theta\left(1\right)
-
\Theta\left(1\right)
\delta\left(n + 1 - x\right)
\right]
\\[3mm]&=
\sum_{n = 0}^{\infty}\left(n + 1\right)
\delta\left(x - n\right)
-
\sum_{n = 1}^{\infty}
n\,\delta\left(n - x\right)
=
\sum_{n = 0}^{\infty}\delta\left(x - n\right)
\end{align}


\begin{align}
{{\rm d}\left\lceil x\right\rceil \over {\rm d}x}
&=
\sum_{n = 0}^{\infty}\delta\left(x - n\right)\,,
\qquad
\left\lceil x \right\rceil = 1\ \mbox{when}\ 0 < x < 1
\end{align}


\begin{align}
{{\rm d}\left\lceil 1/x\right\rceil \over {\rm d}x}
&=
\sum_{n = 0}^{\infty}\delta\left({1 \over x} - n\right)\,
\left(-\,{1 \over x^{2}}\right)
=
\sum_{n = 1}^{\infty}
{\delta\left(x - 1/n\right) \over \left\vert -1/x^{2}\right\vert}\,
\left(-\,{1 \over x^{2}}\right)
\end{align}


\begin{align}
\color{#ff0000}{\large{{\rm d}\left\lceil 1/x\right\rceil \over {\rm d}x}}
&\color{#000000}{\large\ =\ }
\color{#ff0000}{\large -\sum_{n = 1}^{\infty}\delta\left(x - {1 \over n}\right)}
\end{align}

