Problem Statement
A firm uses two inputs, labor $(L)$ and capital $(K)$, to produce output $(Q)$ using a $Cobb$-$Douglas$ production function:
$$
Q(L, K) = A \cdot L^{\alpha} \cdot K^{\beta}
$$
where $(A)$ is total factor productivity, and $(\alpha)$ and $(\beta)$ are output elasticities of labor and capital, respectively.
Given:
- $(A = 1)$, $(\alpha = 0.4)$, $(\beta = 0.6)$
- Budget for inputs: $(B = 1000)$
- Prices: $(p_L = 10)$ (per unit of labor), $(p_K = 20)$ (per unit of capital)
Objective:
Maximize output $Q(L, K)$ subject to the budget constraint:
$$
10L + 20K \leq 1000
$$
Python Implementation
We solve this optimization problem using SciPy.
1 | import numpy as np |
Explanation
Production Function:
The $Cobb$-$Douglas$ function is modeled as negative for minimization sincescipy.optimize.minimizeminimizes objectives by default.Budget Constraint:
The constraint ensures the total cost of labor $(10L)$ and capital $(20K)$ does not exceed the budget.Optimization:
SciPy‘sminimizefinds the optimal levels of $(L)$ and $(K)$ that maximize production $Q(L, K)$ within the budget.Visualization:
- The budget constraint is plotted as a line.
- Isoquants represent levels of production.
- The optimal point is shown at the intersection of the budget line and the highest achievable isoquant.
Explanation of Results
Optimal labor (L): 39.99936839032418 Optimal capital (K): 30.000315804863785 Maximum output (Q): 33.658654360606

Optimal Values:
- Labor (L): 40.00
- Capital (K): 30.00
- Maximum Output (Q): 33.66
Budget Constraint:
The blue line represents the budget constraint $(10L + 20K = 1000)$, showing the feasible combinations of labor and capital.Isoquants:
The dashed curves (orange, green, blue) are isoquants representing different output levels.
The highest isoquant achievable ($33.66$) touches the budget constraint at the optimal point.Optimal Point:
The red dot at $(L = 40, K = 30)$ indicates the optimal allocation of inputs that maximizes output given the budget constraint.








