Python Linear Programming
<p>I am trying to solve the following equation:</p>

<p><code>maximize x^{T}Ax</code>   where <code>x</code> is a <code>3 X 1</code> vector of the variables to be maximized and <code>A</code> is a <code>3 X 3</code> matrix of values.</p>

<p>So basically <code>x^{T} = [a,b,c]</code> which are the unknowns to be maximized and <code>A</code> could be something like </p>

<p><code>A = [ [29, 29, 79],
      [28, 28, 48],
      [9, 40, 0 ]]</code></p>

<p>Could someone show me how to represent this in the form of a maximization problem using PuLP or some other linear programming package in python?</p>

<p>Any help would be much appreciated. I am extremely new to this area and have not idea how to get started representing this formulation.</p>

<p>I have so far tried to use <a href="http://www.cvxpy.org/en/latest/" rel="nofollow">CVXPY</a> to model this function.
I have the following code but am seeing an error:</p>

<pre><code>    [1] A = np.array([[29,29,79],[28,28,48],[9,40,0]])
    [2] x=Variable(3)
    [3] objective=Minimize(x.T*A*x)
     Warning: Forming a nonconvex expression (affine)*(affine).
  warnings.warn("Forming a nonconvex expression (affine)*(affine).")
    [4] constraints=[0&lt;=x,x&lt;=1,sum_entries(x)==1] #what I'm trying to say is each entry of x should be between 0 and 1 and all entries should add up to 1.
    [5] prob = Problem(objective, constraints)
    [6] prob.solve()
    DCPError: Problem does not follow DCP rules.
</code></pre>