# Finding a partial derivative of the difference of convex functions that involves limit

Suppose that we have a function $$g$$ defined as $$g(x,\alpha) = \lim_{\alpha\to +\infty} \{f(k - \alpha x) - f(-\alpha x)\} :=\lim_{\alpha\to +\infty} F_\alpha(x)$$ with $$f$$ being a convex function and $$k$$ a constant. The goal is to find $$\frac{\partial g(x,\alpha)}{\partial x}$$ (maybe an approximate one w.r.t $$f'$$ or $$\nabla f$$). Can we argue something about uniform convergence using convexity so that $$\begin{equation} \frac{\partial}{\partial x} \lim_{\alpha\to \infty} F_\alpha(x) = \lim_{\alpha\to\infty} \frac{\partial F_\alpha(x)}{\partial x} \tag{1} \end{equation}$$ Any alternative approaches not using equation (1) are also welcome. The original problem that I have is with multivariables (i.e., $$f:\mathbb{R}^n \to \mathbb{R}$$) but I want to start with the simple case.

• Do you mean $g(x)$ rather than $g(x, \alpha)$? Jul 13 at 14:13
• @RiverLi So we have $g$ as a function of two variables $x$ and $\alpha$.
– aaka
Jul 14 at 8:59
• After taking limit, $\alpha$ disappears? Jul 14 at 10:13
• So, $g(x) = \lim_{\alpha\to +\infty} F_\alpha(x)$. You want $g'(x) = \frac{\mathrm{d} }{\mathrm{d} x} \lim_{\alpha\to +\infty} F_\alpha(x) = \lim_{\alpha\to +\infty} \frac{\partial }{\partial x} F_\alpha(x)$. Jul 14 at 11:05
• @RiverLi Can't tell much about the limiting behaviour of $\alpha$ (not even sure whether or not it will disappear) but we do want to deal with equations that you wrote down. I defined $F_\alpha(x)$ because the function itself will depend on each value of $\alpha$. The problem comes from the convex analysis literature that I'm working on, so sorry if it caused any confusion. Any help would be appreciated.
– aaka
Jul 14 at 11:39

First, if the equation (1) is well-defined. $$g(x,\alpha)$$ should be $$g(x)$$, which is independent of $$\alpha$$.
Second, to exchange derivative and limit: $$\frac{\partial}{\partial_x}\lim_{\alpha\rightarrow\infty}F_\alpha(x)=\lim_{\alpha\rightarrow\infty}\frac{\partial}{\partial_x}F_{\alpha}(x),$$ To make this exchange work, a common conclusion is that if $$F_\alpha(x)$$ and $$\frac{\partial}{\partial_x}F_{\alpha}(x)$$ converge locally uniformly convergence in $$x$$ when $$\alpha\rightarrow\infty$$, then we can do the exchange. In general, I don't see how to make use of convexity here.
For your question from the literature (in your comments), assume $$k\neq \vec{0}$$. when S is a sphere ($$|x|<1$$), we can see $$F_\alpha(x)=|k-\alpha x|-|\alpha x|\,,$$ which implies $$\tag{1} F_{\infty}(x)=\lim_{\alpha\rightarrow\infty}F_{\alpha}(x)=\lim_{\alpha\rightarrow\infty}\frac{|k-\alpha x|^2-|\alpha x|^2}{|k-\alpha x|+|\alpha x|}=\lim_{\alpha\rightarrow\infty}\frac{|k|^2-2\alpha k\cdot x}{|k-\alpha x|+|\alpha x|}=\lim_{\alpha\rightarrow\infty}\frac{\frac{|k|^2}{\alpha}-2k\cdot x}{\frac{|k-\alpha x|+|\alpha x|}{\alpha}}=-k\cdot \frac{x}{|x|}\,.$$ Therefore, it's obvious that $$F_{\infty}(x)$$ is differentiable at $$x\neq \vec{0}$$ and $$\frac{\partial}{\partial_x}F_{\infty}(x)=-\frac{k}{|x|}-\frac{(k\cdot x)x}{|x|^3},\quad x\neq \vec{0}$$ Then we go back to $$F_{\alpha}(x)$$. Fisrt, $$F_{\alpha}(x)$$ is differential at $$x\neq \vec{0}$$ and $$x\neq \frac{k}{\alpha}$$. This implies when $$x\neq \vec{0}$$, when $$\alpha$$ is large enough, $$F_{\alpha}(x)$$ is always differentiable. Furthermore, $$\frac{\partial}{\partial_x} F_{\alpha}(x)=\frac{-\alpha(k-\alpha x)}{|k-\alpha x|}-\frac{|\alpha| x}{|x|}$$ It's easy to verify that $$\tag{2} \lim_{\alpha\rightarrow\infty}\frac{\partial}{\partial_x} F_{\alpha}(x)=\frac{-\alpha(k-\alpha x)}{|k-\alpha x|}-\frac{|\alpha| x}{|x|}=-\frac{k}{|x|}-\frac{(k\cdot x)x}{|x|^3},\quad x\neq \vec{0}\,.$$ Therefore, the derivative and limit can exchange in this case.
In this case, it's easy to check that the convergence in (1) and (2) is locally uniformly when $$x\neq 0$$.
For general convex set $$S$$, we can prove $$\lim_{\alpha\rightarrow\infty}F_\alpha(x)=\max_{w\in S_x}w^\top k\,,$$ where $$S_x=\mathrm{argmax}_{w\in S}-w^\top x$$. But this convergence might not be locally uniformly at some particular point even $$\lim_{\alpha\rightarrow\infty}F_\alpha(x_0)$$ exists. For example, consider $$x\in\mathbb{R}^2$$, $$S=[-1,1]\times \mathbb{R}$$, $$k=(1/2,1/2)$$, then we can see that \lim_{\alpha\rightarrow\infty}F_\alpha(x)=\left\{ \begin{aligned} &-\frac{1}{2},\quad x_{}>0 \\ &\frac{1}{2},\quad x_{}\leq 0 \end{aligned} \right. where $$x_{}$$ is the first component of $$x$$. Because $$F_\alpha(x)$$ is continuous, the convergence is not locally uniformly around $$x_0=(0,x_{})$$ for any $$x_{}\in\mathbb{R}$$.