0
$\begingroup$

If $x_{1},x_{2},x_{3}$ are positive scalars and $a,\lambda_{1},\lambda_{2},\lambda_{3}$ are constant positive scalar values. \begin{align} x_{1}^2+x_{2}^2+x_{3}^2+\lambda_{1}(x_{1}-a(x_{2}+x_{3}))+\lambda_{2}(x_{2}-a(x_{1}+x_{3}))+\lambda_{3}(x_{3}-a(x_{1}+x_{2}))\quad\quad\text{(1)}\\ \sum\limits_{n=1}^3 x_{n}^2+\sum\limits_{n=1}^3\lambda_{n}(x_{n}-a(\sum\limits_{a=1}^3 x_{a}-x_{n}))\quad\quad\text{(2)} \end{align} Differentiating 1 w.r.t $x_{1},x_{2},x_{3}$ gives \begin{align} 2 x_{1}+\lambda_{1}-a\lambda_{2}-a\lambda_{3}=0\quad\quad\text{(3)}\\ x_{1}=(-\lambda_{1}+a\lambda_{2}+a\lambda_{3})/2\quad\quad\text{(4)} \end{align} Similarly \begin{align} x_{2}=(-\lambda_{2}+a\lambda_{1}+a\lambda_{3})/2\quad\quad\text{(5)}\\ x_{3}=(-\lambda_{3}+a\lambda_{1}+a\lambda_{2})/2\quad\quad\text{(6)} \end{align} Or \begin{align} x_{n}=(-\lambda_{n}+a(\sum\limits_{a=1}^3\lambda_{a}-\lambda_{n}))/2\quad\quad\text{(7)}\\ \end{align} Differentiating 2 w.r.t $x_{n}$ gives \begin{align} 2 x_{n}+\lambda_{n}-a(1-1)=0\quad\quad\text{(8)}\\ x_{n}=-\lambda_{n}/2\quad\quad\text{(9)} \end{align} Are 1 and 2 equivalent?If yes, why differentiation of both doesn't return the same result( i.e (7)$\neq$(9)). Which basic rule of derivative am I forgetting while differentiating 2?

1 Answers 1

1

Differentiating 2 w.r.t $x_{n}$ gives $$2 x_{n}+\lambda_{n}-a(1-1)=0\quad\quad\text{(8)}$$

Error here is that $x_n$ appears in all terms of the sum, but only gets differentiated in one of them. This is made more confusing by using $n$ as both the index of the sum and the variable being differentiated against. The correct derivative in $x_k$ is:

$$ \begin{align} \frac{\partial}{\partial x_k} \left(\sum\limits_{n=1}^3 x_{n}^2+\sum\limits_{n=1}^3\lambda_{n}(x_{n}-a(\sum\limits_{a=1}^3 x_{a}-x_{n}))\right) &= 2 x_k + \lambda_k\left(1-a(1-1)\right) + \sum_{n=1, n \ne k}^3 \lambda_n\left(-a\right) \\ & = 2 x_k + \lambda_k - a\sum_{n=1, n \ne k}^3 \lambda_n \end{align} $$

  • 0
    Thank you so much. Can you explain a bit how are you differentiating the last part. I don't get how are you getting the summation over $\lambda$2017-02-01
  • 0
    @ZainAli You just break the second sum into the $n=k$ term plus the sum of all others terms where $n \ne k$.2017-02-01
  • 0
    @ZainAli When $n \ne k$ the derivative is: $$\frac{\partial}{\partial x_k}\left(\lambda_{n}(x_{n}-a(\sum\limits_{a=1}^3 x_{a}-x_{n}))\right) = \lambda_n(0 - a(1 -0))=-\lambda_n\,a$$2017-02-01