# Thread: Linear Programming: Optimization

1. ## Linear Programming: Optimization

Hello,
I would like to learn how to solve this problem without Excel Solver. Can someone please show me the steps on how to simultaneously solve the equations from this problem? Thanks.

A farmer has 900 acres of land. The farmer is going to plant each acre with corn, soybean, or wheat.

Each acre planted with wheat yields 2k profit.
Each acre with soybean yields 2.5k profit.
Each acre with wheat yields 3k profit.

The farmer has 100 workers.
The farme has 150 tons of fertilizer.

Per acre
Corn requires: .1 worker, .2 tons of fertilizer
Soubean requires: .3 worker, .1 tons of fertilizer
Wheat requires: .2 worker, .4 tons of fertilizer

objective:
2000Corn + 2500Soy + 3000Wheat = Max Profit

Equations.
XCorn + YSoy + Zwheat <= 900
.1Corn + .3Soy + .2wheat <=100
.2Corn + .3Soy +.4wheat <= 150

2. Originally Posted by buddha1119
Each acre planted with wheat yields 2k profit.
Each acre with soybean yields 2.5k profit.
Each acre with wheat yields 3k profit.
Top one should be corn (I think)...I'll try and figure this out too.

I believe the best way would be lagrange multipliers (requireing calculus)...

EDIT: Do you know the answer?

3. EDIT: THIS IS WITH ONE CONSTRAINT, THE PROCESS IS SIMILAIR WITH TWO CONSTRAINTS, THE ONLY DIFFERENCE IS YOU GET 5 EQUATIONS WITH 5 VARIABLES, NOT 4 AND 4. THIS ANSWER IS NOT CORRECT, BUT THE PROCESS CORRECT.

Maximize: F
$\displaystyle 2000c+2500s+3000w$

Constraints:
$\displaystyle .1c+.3s+.2w=100$
$\displaystyle .2c+.3s+.4w=150$
I set them = not less than or equal to because we truely want to maximize using on contraint then try it using the other.

$\displaystyle \nabla F = <2000c,2500s,3000w>$
set this equal to the gradient of a constraint:
$\displaystyle <2000c,2500s,3000w>=\lambda<.1,.3,.2>$

Get all the equations:
$\displaystyle 2000c=\lambda.03$
$\displaystyle 2500s=\lambda.09$
$\displaystyle 3000w=\lambda.04$

Solve for lambda ($\displaystyle \lambda$) and set top 2 equal:
$\displaystyle 2000c/.03=2500s/.09$
Same thing for bottom 2 equations
$\displaystyle 2500s/.09=3000w/.04$

after simplifying:
$\displaystyle 2.4c=s$
$\displaystyle 10s=27w$

adjust ratios to get all of them "equal"
$\displaystyle 24c=10s=27w$

Solve for "c" in terms of s and then in terms of w serpately.
$\displaystyle 2.4c=s$
$\displaystyle 8/9c=w$

plug in first constraint:
[tex].1c+.3(2.4)c+.2(8/9)c=100
$\displaystyle c=100.222$
$\displaystyle s=240.535$
$\displaystyle w=88\frac{8}{9}$

put these back into the equation you want to maximize (profit)
you get about: \displaystyle 1069042.5$4. Here is how to set it up. It would be the exact same process as before only with the added constraint. [tex]<2000c,2500s,3000w>=\lambda<.1,.3,.2> + \mu<.2,.3,.4> Now you have 5 equations and 5 variables. Now all you need to do is solve. Generally solving for$\displaystyle \lambda\$ and setting things equal helps simplify.