how to work out 3 equations simultaneously So i was doing this linear programming question and got stuck on this part, so how do you workout simultaneously
$2x + 3y = 30   $
$(2/3)x + 2y = 16   $
$(16/3)x + 4y = 64$
According to lpsolve we should have y = 4 and x = 9 based on the maximization of cost $120x + 150y = cost$
Thanks in advance
 A: First off, $x = 9$ and $y = 4$ is not a solution, as you can simply check by entering these values into the first equation: $2x + 5y = 38$, not $46$.
Second, you have three equations in two unknowns, which means your system of equations is overdetermined. If either one of the equations can be constructed from the two others by linear combination, then you have a solution, or it cannot, then there is no solution at all.
It turns out there is no solution. The first two equations together have the solution $x = 18$ and $y = 2$, but these values do not fulfill the third equation.
The cost function never comes into play.

Assuming these are not equations but inequalities ($\leq$), and assuming there is a nonnegativity constraint ($x \geq 0$ and $y \geq 0$), the problem makes more sense. We can visualize it by plotting the "cost" function over $x$ and $y$, and the borders of the areas defined by the inequalities on top of it:

The three equations correspond to the blue, green, and red line, respectively, the grayscale plot in the background shows the "cost" function.
Because the "cost" function increases with both $x$ and $y$, the optimum has to lie on one of the lines (though not the blue line, since it lies completely behind the two others). Because the "cost" is linear, it has a gradient in a single direction, $(15, 12)$, which means sliding along either line we can always make it larger. Consequently, the optimum has to lie at the intersection of the green and red line, or, it has to be the joint solution of the 2nd and 3rd equation.
Solving these leads to $x = 8$ and $y = 5\frac13$, at a "cost" of 1760.
