Tutorials › Calculus I › Allocating Resources Between Two Products

Optimization and Newton's Method · Tutorial 877 of 1495

Allocating Resources Between Two Products

Learn how to translate a shared resource constraint into a total-profit function and compare every interior critical point with the feasible endpoint allocations.

Advanced 11 min read

What You'll Learn

  • Represent two production quantities using one binding resource constraint
  • Determine the feasible interval after eliminating one quantity
  • Build and differentiate a total-profit objective
  • Interpret an interior critical point as an equality of profit per resource unit
  • Compare interior candidates with endpoint allocations to find a global maximum

Introduction

When two products compete for one limited resource, producing more of one generally leaves less of that resource available for the other. The best allocation depends not just on how much profit each product can generate, but on how those profits change as production changes and on how much of the shared resource each product requires.

The optimization can be organized in three stages: express the production quantities using the resource constraint, write total profit as a function of one variable, and compare the feasible endpoints with every interior critical point. An interior critical point is a candidate, not automatically the best allocation.

Modeling a Two-Product Allocation

Let \(x\) be the quantity of product A and \(y\) the quantity of product B. Suppose each unit of A uses \(a\) units of a resource, each unit of B uses \(b\) units, and the available resource amount is \(R\), where \(a,b,R>0\). Assume all of the resource must be allocated, so the constraint is \(ax+by=R\), with \(x,y\geq 0\).

Definition: A two-product resource-allocation model has feasible production quantities \(x,y\geq 0\) satisfying \(ax+by=R\). If the profit functions for the products are \(P_A(x)\) and \(P_B(y)\), total profit is \(P_A(x)+P_B(y)\).

The constraint lets us eliminate one variable. Solving for \(y\) gives \(y=(R-ax)/b\). Nonnegative production requires \(0\leq x\leq R/a\), so the feasible choices for \(x\) form a closed interval. Once \(x\) is chosen in this interval, the constraint determines \(y\).

Substituting into total profit produces a one-variable objective:

$$ F(x)=P_A(x)+P_B\!\left(\frac{R-ax}{b}\right), \qquad 0\leq x\leq \frac{R}{a}. $$

Here, \(P_A\) and \(P_B\) are the total profit functions associated with each product, not necessarily constant profit per unit. They may account for costs as well as revenue. This model assumes production quantities can vary continuously and that the resource constraint is an equality; a model that permits unused resource has a different feasible set.

The Interior Critical-Point Condition

If the profit functions are differentiable, the chain rule gives the derivative of the total profit. The derivative of the substituted quantity \(y=(R-ax)/b\) with respect to \(x\) is \(-a/b\). Therefore

$$ F'(x) = P_A'(x)-\frac{a}{b}P_B'(y), \qquad y=\frac{R-ax}{b}. $$

An interior critical point must satisfy \(F'(x)=0\). Rearranging yields a useful interpretation: the marginal profit from one additional unit of A, divided by the resource A uses per unit, equals the corresponding marginal profit per resource unit for B.

$$ \frac{P_A'(x)}{a}=\frac{P_B'(y)}{b}. $$

This condition compares the products on the same basis: profit change per additional unit of the shared resource. It is a necessary condition for an interior maximum when the objective is differentiable there. It is not, on its own, proof of a maximum; the point might instead be a minimum or another type of stationary point.

Why the condition works: Increasing \(x\) by a small amount uses \(a\) more resource units. To keep the constraint satisfied, \(y\) must decrease by \(a/b\) units for each unit added to \(x\). The resulting first-order change in total profit is \(P_A'(x)-(a/b)P_B'(y)\). At an interior optimum, this change must be zero: the gain from reallocating resource toward A balances the profit lost from reallocating it away from B.

Why Endpoints Must Be Checked

The interval \(0\leq x\leq R/a\) includes two boundary allocations. At \(x=0\), all the resource goes to B. At \(x=R/a\), all of it goes to A. These allocations are feasible even though they are not interior points, so the derivative condition does not decide whether either one is best.

If \(F\) is continuous on the closed feasible interval and differentiable at every interior point, the extreme value theorem guarantees that a global maximum is attained. If that maximum is at an interior point, Fermat’s theorem says its derivative is zero. Thus, for a differentiable model, the maximum must occur at an endpoint or an interior critical point. Evaluate the objective at every such candidate and compare the resulting values.

1
Eliminate one production quantity.
Use the resource equation to express \(y\) in terms of \(x\), and state the closed feasible interval.
2
Build and differentiate total profit.
Substitute into both profit functions and use the chain rule to find \(F'(x)\).
3
Find all candidates.
Include both feasible endpoints and every interior solution of \(F'(x)=0\).
4
Evaluate and compare.
Calculate total profit at every candidate; the greatest value gives a global maximum.

Worked Examples

Worked Example: An Interior Allocation Gives the Greatest Profit

Product A uses \(2\) resource units per item and product B uses \(1\). There are \(100\) resource units to allocate. Suppose their profit functions are \(P_A(x)=100x-x^2\) and \(P_B(y)=80y-\tfrac12 y^2\). Find the allocation that gives the greatest total profit.

The constraint is \(2x+y=100\), so \(y=100-2x\). Nonnegative production requires \(0\leq x\leq 50\). Substitute into total profit:

$$ \begin{aligned} F(x) &=100x-x^2+80(100-2x)-\frac12(100-2x)^2\\ &=100x-x^2+8000-160x-500+200x-2x^2\\ &=7500+140x-3x^2. \end{aligned} $$

Differentiate and solve for the interior critical point:

$$ F'(x)=140-6x, \qquad 140-6x=0, \qquad x=\frac{70}{3}. $$

This value lies in \([0,50]\). The corresponding quantity of B is \(y=100-2(70/3)=160/3\). Evaluate total profit at this point and at both endpoints:

$$ \begin{aligned} F\!\left(\frac{70}{3}\right) &=7500+140\!\left(\frac{70}{3}\right)-3\!\left(\frac{70}{3}\right)^2 =\frac{27400}{3},\\ F(0)&=7500,\\ F(50)&=7500+140(50)-3(50)^2=2500. \end{aligned} $$

Since \(27400/3\) is greater than \(7500\) and \(2500\), the maximum occurs at \(x=70/3\), \(y=160/3\). Check the resource constraint: \(2(70/3)+160/3=300/3=100\). The derivative is zero at the reported interior quantity, since \(140-6(70/3)=0\), and the evaluated objective gives the reported profit.

Worked Example: An Interior Critical Point Is Not the Maximum

Suppose \(x\) and \(y\) are measured in item units, the resource constraint is \(3x+2y=12\), and the profit functions are \(P_A(x)=x^2\) and \(P_B(y)=y^2\). Determine the global maximum on the feasible allocations.

Eliminate \(y\): \(y=(12-3x)/2=6-\tfrac32x\). Since \(x,y\geq0\), the feasible interval is \(0\leq x\leq4\). The total-profit objective is

$$ F(x)=x^2+\left(6-\frac32x\right)^2 =\frac{13}{4}x^2-18x+36. $$

Differentiate:

$$ F'(x)=\frac{13}{2}x-18. $$

The critical point satisfies \(\frac{13}{2}x=18\), so \(x=36/13\). It is feasible, and \(y=6-\tfrac32(36/13)=24/13\). Compare its value with the endpoint values:

$$ \begin{aligned} F\!\left(\frac{36}{13}\right) &=\frac{13}{4}\left(\frac{36}{13}\right)^2 -18\left(\frac{36}{13}\right)+36 =\frac{144}{13},\\ F(0)&=36,\\ F(4)&=16. \end{aligned} $$

The critical point has lower profit than \(x=0\), where \(y=6\). The global maximum is therefore \(36\), at the endpoint allocation \((x,y)=(0,6)\). As a check, \(3(0)+2(6)=12\), and direct substitution into the profit functions gives \(0^2+6^2=36\). The critical point is a minimum in this example, not a maximum.

Worked Example: Comparing Both Endpoints with an Interior Maximum

Product A uses \(2\) resource units per item and product B uses \(3\). The available amount is \(24\), and the profits are \(P_A(x)=20x-x^2\) and \(P_B(y)=20y-y^2\). Find the maximum total profit.

The resource constraint \(2x+3y=24\) gives \(y=8-\tfrac23x\), and nonnegative production requires \(0\leq x\leq12\). Substitution gives

$$ \begin{aligned} F(x) &=20x-x^2+20\left(8-\frac23x\right) -\left(8-\frac23x\right)^2\\ &=96+\frac{52}{3}x-\frac{13}{9}x^2. \end{aligned} $$

Thus

$$ F'(x)=\frac{52}{3}-\frac{26}{9}x=0 \quad\Longrightarrow\quad x=6. $$

The constraint then gives \(y=8-\tfrac23(6)=4\). Evaluate all candidates:

$$ \begin{aligned} F(6)&=(20(6)-6^2)+(20(4)-4^2)=84+64=148,\\ F(0)&=P_A(0)+P_B(8)=0+(160-64)=96,\\ F(12)&=P_A(12)+P_B(0)=(240-144)+0=96. \end{aligned} $$

The interior allocation \((6,4)\) gives the greatest profit, \(148\). Check the resource use: \(2(6)+3(4)=12+12=24\). Also, \(F'(6)=52/3-(26/9)(6)=0\), and direct evaluation of the two product profits confirms the reported total.

A Common Chain-Rule Error

When the eliminated quantity is \(y=(R-ax)/b\), its derivative is \(-a/b\), not merely \(-1\). Forgetting this multiplier changes the critical-point equation and can produce an incorrect allocation.

For the first worked example, the contribution from product B is \(P_B(y)=80y-\tfrac12y^2\), with \(P_B'(y)=80-y\), and \(y=100-2x\). A common incorrect calculation is to use \(-P_B'(y)\) for the derivative of \(P_B(y(x))\), omitting the factor \(2\). That gives the false equation

$$ 100-2x-(80-y)=0 \quad\Longrightarrow\quad 100-2x-\bigl(80-(100-2x)\bigr)=0 \quad\Longrightarrow\quad x=30. $$

The correct chain-rule term is \(-2P_B'(y)\), so the correct equation is \(100-2x-2(80-y)=0\), giving \(x=70/3\). The incorrect value \(x=30\) is not even a critical point of the true objective: \(F'(30)=140-6(30)=-40\ne0\). The resource multiplier matters because the two products use different amounts of resource per item.

Using the Model Carefully

The best allocation need not be interior. If an endpoint has the largest objective value, the model recommends directing all of the resource to one product. Nor does an interior critical point automatically give a global maximum: as the second example shows, it can be a minimum.

The marginal-profit condition is valuable for finding interior candidates, but it does not replace the final comparison. The assumptions matter as well: the feasible interval is closed, the objective must be continuous there for a maximum to be guaranteed, and the derivative condition applies only to interior points where the objective is differentiable. If the model has a nondifferentiable interior point, that point must also be considered as a candidate.

Check Your Understanding

Use the two-product model to answer these questions.

  1. If A uses \(a\) resource units and B uses \(b\), what expression for \(y\) follows from \(ax+by=R\)?
  2. Why does the feasible interval for \(x\) include both endpoints?
  3. What condition must an interior critical point satisfy in terms of marginal profit per resource unit?
  4. Why is an interior critical point not necessarily a global maximum?
  5. For a differentiable objective on a closed feasible interval, which candidates must be compared to find a global maximum?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon