How to do optimization on expression which includes Reciprocal The conditions are: $w$ is a known value, and $x_{11} >0, x_{12}>0, ..., x_{nn}>0;$
\begin{equation} x_{11} \leq w \end{equation}
\begin{equation}x_{12} + x_{22} \leq w\end{equation}
\begin{equation}x_{13} + x_{23} + x_{33} \leq w\end{equation}
\begin{equation} ...\end{equation}
\begin{equation}x_{1n} + x_{2n} +... + x_{nn} \leq w\end{equation}
How can I choose $x_{ij}$ to minimize {R} and make these expressions be true?
\begin{equation} \frac{1}{x_{11}} + \frac{1}{x_{12}} + \frac{1}{x_{13}} + ... \frac{1}{x_{1n}} = R;\end{equation}
\begin{equation} \frac{1}{x_{22}} + \frac{1}{x_{23}} +  ... \frac{1}{x_{2n}} = R;\end{equation}
\begin{equation}...\end{equation}
\begin{equation} \frac{1}{x_{nn}} = R;\end{equation}
The question is from a wire width issue:
In a rectangle (width is w) have n wires, length are 1, 2, 3, 4 ... n
I want they have same resistance, and the resistance is minimum. Their width can be changed in each step. So I need choose each line's width (x11, x12, ... ). I think a number computation way maybe can solve the problem, but have no idea about how to do it.

Thanks
 A: Let's look at the longest constraint with its equality: $$\begin{align}x_{1n}+x_{2n}+\cdots+x_{nn}\le w\\
\frac{1}{x_{1n}}+\frac{1}{x_{2n}}+\cdots+\frac{1}{x_{nn}}=R\end{align}$$
where $x_{ij}>0$ for all $i,j$.  The objective is to minimize $R$.  Taking the partial derivative w.r.t. $x_{in}$ we have $$\frac{\partial}{\partial x_{in}}R=-x_{in}^{-2}.$$  This cannot equal 0, so there is no finite stationary point, and the minimum is achieved for the maximum possible value of $x_{in}$.  In other words, the constraint will be active: $$x_{1n}+x_{2n}+\cdots+x_{nn}=w.$$  Assume we have some $x_{in}<x_{jn}$ in that equality.  Then $$-x_{in}^{-2}>-x_{jn}^{-2},$$ which means by increasing $x_{in}$ the value of $R$ changes more rapidly per unit than by decreasing $x_{jn}$, and the lowest value of $R$ is achieved when $x_{1n}=x_{2n}=\cdots=x_{nn}$.
Thus $$x_{in}=\frac{w}{n}$$ and $$R=\frac{n^2}{w}.$$ You can argue similarly to above that $x_{ij}=x_{kj}$ for all $j$, hence all your $x$ values are now fixed now that you know $R$: $$x_{ij}=\frac{wj}{n^2}.$$
