In a book deriving the update for Fast Gradient Sign Method (FGSM) attack, it is said
$g$ is the target loss, and we can conduct the first-order Taylor expansion of $g(x)$ on the initial solution $x_0$ (assuming that we start from the original natural example): $$g(x)\approx g(x_0) + \nabla g(x_0)^T(x-x_0)$$ We can solve the following constraint optimization problem, which is an approximation of $$\text{argmax}_x \nabla g(x_0)^T (x − x_0) \text{ s.t. } x \in \|x − x_0\|_{\infty} \leq\epsilon $$ Now we can easily see that it has a closed-form solution $$x_1 = x_0 + \text{sign}(\nabla g(x_0))$$
May I ask how is the closed form solution derived? (I tried to use Lagrange while have difficulty in taking derivative on the $l_{\infty}$ norm)
Any help would be appreciated!
$\def\ed{\stackrel{\text{def}}{=}} $ Hints