Christopher C. answered 03/19/26
Mathematician with academic honors and 10+ years of experience
8 years late but, better late than never, right?
First we need to indentify our objective function, (what are we trying to achieve), and that is to maximize the profit for Sophia. Let xT represent tomatoes and xB represent beans.
Maximize Profit: 2 xT + 5 xB
Next we establish our constraints, which are sq. yards available, money available, and individual crop requirements.
Yards : 2 xT + 4 xB ≤ 24
Budget: xT + 3 xB ≤ 15
Tomatoes: 1 ≤ xT ≤ 8
Beans: 1 ≤ xB
Then its either trail and error at this point or taking it to a computer.
I actually did a full deep-dive into this specific problem—from setting up the logic to running the Python code to find the optimal solution
You can watch the full walkthrough here: Can you help Sophia with her farming problem? | Linear Programming