Tutorials › Calculus III › Crop Yields Under Water And Nitrogen Constraints

Applied Multivariable Optimization · Tutorial 495 of 999

Crop Yields Under Water And Nitrogen Constraints

Learn how to maximize a two-input crop-yield model while checking whether water, nitrogen, or neither resource budget binds.

Advanced 11 min read

What You'll Learn

  • Define a feasible set from nonnegative water and nitrogen applications and their separate upper limits
  • Find the unconstrained stationary point of a two-input yield function
  • Check whether that point fits within both resource budgets
  • Optimize along a boundary when the water or nitrogen limit is active
  • Use concavity and derivative signs to verify a constrained maximum
  • Identify why an unconstrained optimum may not be feasible

Crop Yield and Resource Budgets

A crop’s yield can respond to water and nitrogen in different ways. Adding either input may increase yield when the crop is under-supplied, but the benefit can diminish as application rises. A useful optimization model must account for both effects: the shape of the yield response and the limits on available resources.

We will work with a specific concave response function and two separate upper limits. The aim is not to claim that one formula describes every crop. Rather, the model makes it possible to see clearly how an unconstrained yield maximum changes when water or nitrogen is limited.

Model and feasible set: Let \(w\) be the water applied per hectare, measured in units of \(100\) cubic metres per hectare, and let \(n\) be the nitrogen applied per hectare, measured in units of \(10\) kilograms per hectare. The yield index is $$ Y(w,n)=20w+16n-2w^2-n^2+wn. $$ Given resource limits \(W\) and \(N\), the feasible choices satisfy \(0\leq w\leq W\) and \(0\leq n\leq N\). The goal is to maximize \(Y(w,n)\) over that rectangle.

The term \(wn\) represents interaction: the yield effect of one input can depend on the level of the other. The negative squared terms represent diminishing returns. The variables are applications, so negative values are not meaningful; that is why the feasible set also includes \(w\geq 0\) and \(n\geq 0\).

Start by Finding the Unconstrained Candidate

The first step is to find the stationary point of \(Y\), without yet imposing the two upper limits. The partial derivatives are

$$ Y_w=20-4w+n, \qquad Y_n=16-2n+w. $$

At an interior maximum, both partial derivatives must be zero. Solving the resulting equations gives

$$ 20-4w+n=0, \qquad 16-2n+w=0. $$

The first equation gives \(n=4w-20\). Substituting this into the second equation gives \(-w+2(4w-20)=16\), so \(7w=56\), hence \(w=8\) and \(n=12\). This candidate is feasible only if both resource limits permit those application levels.

Worked Example: Both Resource Limits Allow an Interior Optimum

Suppose \(W=10\) and \(N=14\). The stationary point \((8,12)\) satisfies \(0<8<10\) and \(0<12<14\), so it is feasible and strictly inside the allowed rectangle.

Its yield index is

$$ \begin{aligned} Y(8,12) &=20(8)+16(12)-2(8^2)-12^2+(8)(12)\\ &=160+192-128-144+96\\ &=176. \end{aligned} $$

The derivatives there are \(Y_w(8,12)=20-32+12=0\) and \(Y_n(8,12)=16-24+8=0\). The concavity argument below confirms that this stationary point is the global maximum on the feasible rectangle. Neither resource limit binds: \(8<10\) and \(12<14\).

Why Concavity Makes the Check Reliable

A stationary point is not automatically a maximum. Here, however, the function is strictly concave, which means its curvature bends downward in every nonzero direction. Its Hessian matrix is

$$ \mathbf{H} = \begin{pmatrix} -4 & 1\\ 1 & -2 \end{pmatrix}. $$

For any direction \((u,v)\), the associated quadratic form is

$$ \begin{aligned} \begin{pmatrix}u&v\end{pmatrix} \mathbf{H} \begin{pmatrix}u\\v\end{pmatrix} &=-4u^2+2uv-2v^2\\ &=-4\left(u-\frac{v}{4}\right)^2-\frac{7}{4}v^2. \end{aligned} $$

This expression is strictly negative whenever \((u,v)\neq(0,0)\). Thus the yield function is strictly concave. In particular, it has at most one maximum on the rectangle. Strict concavity also lets us verify boundary candidates by checking how the gradient points relative to feasible movements.

Theorem: For a differentiable concave function \(f\) on a convex feasible set, a feasible point \(p\) is a global maximum if \( \nabla f(p)\mathbin{\cdot}(q-p)\leq 0 \) for every feasible point \(q\). For a strictly concave function, that maximum is unique. In this model, the feasible rectangle is convex, so this criterion applies.

To see why the criterion works here, take any feasible point \(q\) and consider the one-variable function \(g(t)=Y(p+t(q-p))\), for \(0\leq t\leq 1\). The segment from \(p\) to \(q\) stays in the rectangle, and concavity implies \(g''(t)\leq 0\). Therefore \(g'(t)\leq g'(0)\), and integrating from \(0\) to \(1\) gives \(g(1)-g(0)\leq g'(0)\). By the chain rule, \(g'(0)=\nabla Y(p)\mathbin{\cdot}(q-p)\). Consequently, if that dot product is nonpositive for every feasible \(q\), then \(Y(q)\leq Y(p)\) throughout the feasible set. Strict concavity makes the inequality strict for \(q\neq p\) when \(p\) is a maximum.

When the Water Limit Binds

Suppose the water limit is below the unconstrained value \(8\), while the nitrogen limit is large enough that nitrogen need not be fully used. If the water limit is \(W=6\), the optimum may lie on the edge \(w=6\). Along that edge, set \(w=6\) in the yield function and maximize with respect to \(n\).

Worked Example: Water Is the Binding Resource

Let \(W=6\) and \(N=15\). Along the water boundary,

$$ Y(6,n)=120+16n-72-n^2+6n=48+22n-n^2. $$

Differentiating this one-variable expression gives \(22-2n=0\), so \(n=11\). This is feasible because \(0<11<15\). The candidate is \((6,11)\), and its yield is

$$ \begin{aligned} Y(6,11) &=20(6)+16(11)-2(6^2)-11^2+(6)(11)\\ &=120+176-72-121+66\\ &=169. \end{aligned} $$

At this point, \(Y_n(6,11)=16-22+6=0\), while \(Y_w(6,11)=20-24+11=7\). For any feasible \((w,n)\), the theorem’s dot product is

$$ \nabla Y(6,11)\mathbin{\cdot}(w-6,n-11) =7(w-6)\leq 0, $$

because every feasible choice has \(w\leq 6\). Thus \((6,11)\) is the global maximum. Water binds since \(w=W=6\); nitrogen does not bind since \(11<15\).

The positive water derivative at the boundary is consistent with the limit being active: increasing water from \(6\) would locally raise yield, but that movement is not allowed. By contrast, nitrogen is at a conditional maximum along the water boundary, so its partial derivative is zero.

When the Nitrogen Limit Binds

The same reasoning applies if nitrogen is scarce. Fix nitrogen at its upper limit, then optimize yield with respect to water along that edge. A candidate on this edge is a true maximum if the gradient test also rules out improvement by moving into the feasible rectangle.

Worked Example: Nitrogen Is the Binding Resource

Let \(W=10\) and \(N=9\). On the nitrogen boundary,

$$ Y(w,9)=20w+144-2w^2-81+9w=29w-2w^2+63. $$

Differentiating with respect to \(w\) gives \(29-4w=0\), so \(w=29/4\). This is feasible because \(0<29/4<10\). At the candidate \((29/4,9)\), the yield is

$$ \begin{aligned} Y\left(\frac{29}{4},9\right) &=20\left(\frac{29}{4}\right)+16(9) -2\left(\frac{29}{4}\right)^2-9^2 +\left(\frac{29}{4}\right)(9)\\ &=145+144-\frac{841}{8}-81+\frac{261}{4}\\ &=\frac{1345}{8}=168.125. \end{aligned} $$

The derivatives are \(Y_w(29/4,9)=20-29+9=0\) and \(Y_n(29/4,9)=16-18+29/4=21/4\). For any feasible \((w,n)\),

$$ \nabla Y\left(\frac{29}{4},9\right) \mathbin{\cdot} \left(w-\frac{29}{4},n-9\right) =\frac{21}{4}(n-9)\leq 0, $$

since \(n\leq 9\). The candidate is therefore the global maximum. Nitrogen binds, while water does not: \(n=N=9\) and \(29/4<10\).

A Practical Decision Process

The examples illustrate a reliable approach. Begin with the unconstrained stationary point, but do not assume it remains feasible. If one upper limit excludes it, optimize along the corresponding boundary and then check that feasible movements away from that boundary cannot improve yield.

1
Find the interior candidate.
Set both partial derivatives equal to zero and solve for \(w\) and \(n\).
2
Test feasibility.
Check nonnegativity and both upper limits. If the candidate lies within the rectangle, it is the maximum for this strictly concave model.
3
Optimize on an active edge if needed.
For a water limit, fix \(w=W\) and optimize over \(n\); for a nitrogen limit, fix \(n=N\) and optimize over \(w\).
4
Check the remaining feasible directions.
At an active upper limit, the corresponding partial derivative should be nonnegative; at a free interior coordinate, it should be zero. Verify the candidate against feasible movements, including the other bounds.

If both resource limits are small, both may bind, so the corner \((W,N)\) must also be considered. The nonnegativity edges matter as well if a candidate would otherwise require a negative application. The gradient criterion provides a general check for all these cases; simply solving the unconstrained equations does not.

A Common Mistake: Ignoring Feasibility

A tempting but incorrect conclusion is that the stationary point \((8,12)\) is always the answer because it makes both partial derivatives zero. Under \(W=6\), however, this point violates the water limit: \(8>6\). It is not a feasible crop plan, no matter how attractive its unconstrained yield may be.

The correction is to optimize on the feasible water boundary. For \(W=6\), that calculation gives \(n=11\), and the feasible maximum is \((6,11)\), with yield index \(169\). The distinction is important: a stationary point answers an unconstrained question, while the crop plan must satisfy the resource budgets.

Key takeaway: First locate the unconstrained stationary point. Use it only if it satisfies every resource limit. Otherwise, examine the relevant boundary and verify the candidate using concavity and feasible-direction checks.

Check Your Understanding

Use the model and reasoning in this tutorial to answer the following questions.

  1. What are the two partial derivatives of the yield function?
  2. For \(W=10\) and \(N=14\), why is the stationary point feasible and interior?
  3. In the water-limited example, why does a positive water derivative at the optimum not contradict maximization?
  4. For a nitrogen upper limit that binds, what sign should the nitrogen partial derivative have at a candidate maximum, and why?
  5. Why is it not enough to solve the two stationary equations without checking the resource limits?