3x[1]+x[2]<=12,x[1]+x[2]<=15,z=2x[1]+x[2]

I need the simplex for this problem. I have the right answer but keep coming up with a differant answer. This in our book as a practice problem.

Do you have the answer?

Since you have not given the extra constraints x1 > 0 and x2 > 0, you will get x1=-1.5 and x2=16.5, which is where the first two constraints intersect.

Possible extra constraints:

x1 ≥ 0
x2 ≥ 0

To solve this problem using the simplex method, you need to follow several steps:

Step 1: Set up the initial tableau
- Identify the decision variables and the objective function.
- Write the constraints in a standard form:
3x[1] + x[2] ≤ 12
x[1] + x[2] ≤ 15

Step 2: Convert inequalities to equations by adding slack variables (s1, s2)
- Convert the inequalities into equations by introducing slack variables (s1, s2):
3x[1] + x[2] + s1 = 12
x[1] + x[2] + s2 = 15

Step 3: Set up the initial tableau
- Write the objective function:
z = 2x[1] + x[2]
- Set up the initial tableau by writing the coefficient matrix and the augmented matrix:
```
Coefficient matrix (C):
3 1 1 0
1 1 0 1

Augmented matrix (AX):
12 0 1 0
15 0 0 1

Objective function (Z):
0 0 -2 -1
```

Step 4: Check if the tableau is optimal
- Calculate the reduced cost (Cj - Zj) for each column:
-2 -1 0 1

- Since there are negative values in the reduced cost row, the tableau is not optimal.

Step 5: Determine the pivot column
- Select the variable that has the most negative reduced cost, which is x[1] (-2).

Step 6: Determine the pivot row
- To determine the pivot row, calculate the ratios of right-hand side values (b) with their corresponding coefficients for the selected pivot column:
Row 1: 12 / 3 = 4
Row 2: 15 / 1 = 15

- The minimum positive ratio corresponds to row 1, so it will be the pivot row.

Step 7: Perform the pivot operation
- Use row operations to make the pivot value (a[11] = 3) equal to 1:
Divide row 1 by 3: (1/3)*Row 1

- Perform row operations to make the pivot column elements zero:
Multiply (1/3)*Row 1 by the appropriate factors and subtract them from Row 2.

- The resulting tableau is:
```
C x[1] x[2] s1 s2
------------------------------
0 0 1/3 1/3 0 1/3
1 0 2/3 -1/3 0 -2/3
0 0 -2/3 2/3 1 -1/3
```

Step 8: Repeat steps 4-7 until the tableau is optimal
- Repeat steps 4 to 7 until there are no negative values in the reduced cost row or an optimal solution is reached.

In this case, you need to repeat these steps one more time, choosing x[2] as the pivot column, and x[1] as the pivot row.

Following the steps outlined above should help you get the correct solution for the given problem.