# How would you write this set of linear programming problems as latex?

I am not able to make self understood over at Mathematics Stackexchange in this question.

Therefore I ask here the Mathematica experts how to write these linear programming problems as latex, the standard way of communicating mathematics at the stack exchange network:

(*start*)
nn = 18;
TableForm[
L2 = Table[
LinearProgramming[
Table[1/n, {n, 1, k}], {Table[If[n == 1, k, 1], {n, 1, k}]}, {{1,
0}}, Table[
If[n == 1, {-1, 1}, {-2 (n - 1), 0 (n - 1)}], {n, 1, k}]], {k,
1, nn}]]
(*end*)


Here is my own try:

$$\begin{array}{ll} \text{minimize} & \displaystyle\sum_{n=1}^{n=k} \frac{x_{n}}{n} \\ \text{subject to constraints:} & k + \displaystyle\sum_{n=2}^{n=k}x_{n}=1 \\ & x_1 \geq -1 \end{array}$$

for all $$k$$ and for $$n>1$$ $$-2(n-1) \leq x_n \leq 0 \tag{4}$$

• Mma. S.E is specifically for mathematica software related questions, using and understanding the wolfram langauge, and not so much about latex. For that you can go to the tex.stackexchange.com sister site to ask. – morbo Jun 22 '19 at 11:56
• Posted at the tex site now: tex.stackexchange.com/q/496916/13320 – Mats Granvik Jun 22 '19 at 12:03