Compute the minimizer $u^*$ of the following problem $$\tag1 \min_u J(u) = \frac{1}{2N}\sum_{i=1}^N |x_i^+(u)-\bar x|^2+h\gamma|u| $$ such that $$\tag2 x_i^+ = x_i+\frac{h}{N}\sum_{j=1}^N P_{ij}(x_j-x_i)+hu, \quad x_i\in[-1,1]\ \forall i $$
I think that $x_i^+$ stands for $x_i^{n+1}$ and that we have to consider the problem on a single time interval $[t^n,t^{n+1}]$ (and find the instantaneous control?).
From what I understand
- $N>0$ is the number of agents
- $x_i$ represents the opinion of the agent $i$ ($-1$ and $+1$ represent two opposite opinions)
- $P_{ij} = P(|x_i-x_j|)$ is a function quantifying the influence between agents $i$ and $j$
- $u$ is the control
- $\gamma>0$ expresses the strength of the control
- $h>0$ is the lenght of the time interval
- $\bar x$ is the target opinion
To find the minimizer, I think we have to
- plug the formula for $x_i^+$ inside $(1)$
- simplify
- compute the derivative $\dfrac{dJ(u)}{du}$
- find the minimizer $u^*$ by posing $\dfrac{dJ(u)}{du}=0$
EDIT
Plug the expression for $x_i^+$ inside $J$ $$ J(u) = \frac{1}{2N}\sum_i\bigg|x_i+\frac hN\sum_j P_{ij}(x_j-x_i)+hu-\bar x \bigg|^2+h\gamma|u| $$ Derive wrt $u$ \begin{align} J'(u) &= \frac hN \sum_i \bigg(x_i+\frac hN\sum_j P_{ij}(x_j-x_i)+hu-\bar x \bigg)+h\gamma\,\text{sgn}(u) \\ &= \frac hN \sum_i(x_i-\bar x)+\frac{h^2}{N^2}\underbrace{\sum_i\sum_j P_{ij}(x_j-x_i)}_{=0 \text{ since }P_{ij}=P_{ji}}+h^2u+h\gamma \,\text{sgn}(u) \\ &= \frac hN \sum_i(x_i-\bar x)+h^2u+h\gamma \,\text{sgn}(u) \end{align} By posing $J'(u)=0$ we should be able to find $u$, but how can we isolate it if we have both $u$ and $\text{sgn}(u)$ appearing at the same time?