In my convex optimization textbook, there is statement that goes as follows:
Using Stokes' theorem from calculus, we have $$\nabla \int_Bf(x+v)dv = \int_Sf(x+u)\frac{u}{\|u\|}du. $$
Here $f: \mathbb{R}^n \to \mathbb{R}$ is a continuously differentiable function, $B\subset \mathbb{R}^n$ corresponds to the unit ball, and $S$ its surface.
However, I have failed to see how Stokes' theorem comes into play. More specifically, I do not see notions like curl, surface, or boundary appearing in this equation. The only intuition I have is when $f: \mathbb{R}^1 \to \mathbb{R}$, then this is simply a consequence of fundamental theorem of calculus. Yet this argument clearly does not apply to higher dimensional case.
I would appreciate explanations on how Stokes' theorem is applied here.
Yes, as @Jose27 suggested, this is a vector equality, so you should prove it component by component. The $i$th component of the LHS is $$\frac{\partial}{\partial x_i} \int_B f(x+v)\,dv = \int_B \frac{\partial f}{\partial x_i}(x+v)\,dv.$$ This is the integral over $B$ of the divergence of the vector field $\vec F = (0,\dots,0,f,0\dots,0)$, where $f$ is in the $i$th slot. Now, what is the flux of $\vec F$ over $S$? (Remember that the unit normal at $u$ to a sphere centered at the origin is $u/\|u\|$.)