Tutorials › VEE Economics › Surplus Under Nonlinear Curves Using Integration

VEE Economics · Surplus and Economic Efficiency · Tutorial 409 of 998

Surplus Under Nonlinear Curves Using Integration

Learn to set up and evaluate nonlinear surplus integrals from inverse demand and supply curves, and interpret the results in context.

Intermediate 9 min read

What You'll Learn

  • Interpret inverse demand as marginal willingness to pay and inverse supply as marginal cost.
  • Set up consumer- and producer-surplus integrals over the traded quantity.
  • Evaluate integrals for nonlinear curves and interpret their units.
  • Distinguish producer surplus from profit when fixed costs are present.
  • Check endpoint values, signs, and common integration errors.

Why Integrate Surplus?

A demand or supply schedule may list a few quantities and prices, but many economic relationships are represented by smooth curves. When those curves are nonlinear, surplus is still the area between a curve and the market price; integration calculates that area without assuming it is a triangle. This method is useful whenever willingness to pay or marginal cost changes at a nonconstant rate as quantity changes.

The calculations below take the market price and traded quantity as given. The focus is how to measure the surplus over that quantity when the curves are differentiable. The results are aligned with the SOA VEE Economics (Validation by Educational Experience) syllabus.

Definition: Let \(p_D(q)\) be inverse demand: the price representing buyers’ marginal willingness to pay for the \(q\)-th unit. Let \(p_S(q)\) be inverse supply: the price representing sellers’ marginal cost of supplying the \(q\)-th unit. At a uniform market price \(P\) and traded quantity \(Q\), consumer surplus is the area between inverse demand and the price from \(q=0\) to \(q=Q\). Producer surplus is the area between the price and inverse supply over the same range.

The Integral Formulas

Assume the curves are continuous and integrable over \(0\leq q\leq Q\), the units are traded at the same price \(P\), and the curves describe marginal willingness to pay and marginal cost for the units in question. For the usual surplus interpretation, demand values on the traded range are at least \(P\), while supply costs are at most \(P\). Then the formulas are:

$$ CS=\int_0^Q \bigl(p_D(q)-P\bigr)\,dq $$
$$ PS=\int_0^Q \bigl(P-p_S(q)\bigr)\,dq $$

Here \(CS\) is consumer surplus and \(PS\) is producer surplus. If prices are measured in dollars per unit and quantity in units, each integrand is in dollars per unit; multiplying by a quantity interval and integrating gives dollars. The limits matter: these formulas measure surplus on the units from zero through \(Q\), not on units outside the traded range.

The demand curve must be written as price as a function of quantity for this setup. If a problem instead gives quantity as a function of price, do not insert that expression as \(p_D(q)\) or \(p_S(q)\). First express the relevant curve in inverse form, or use an equivalent area calculation with correctly chosen axes and limits.

Why the Formulas Hold

For a small quantity interval of width \(\Delta q\) near quantity \(q\), buyers’ willingness to pay per unit is approximately \(p_D(q)\). They pay \(P\) per unit, so their net benefit per unit is approximately \(p_D(q)-P\). The interval therefore contributes approximately \(\bigl(p_D(q)-P\bigr)\Delta q\) to consumer surplus. Adding these contributions over the traded units and taking the limit as the intervals become arbitrarily narrow gives the integral. The same reasoning applies to sellers: the price received exceeds marginal cost by approximately \(P-p_S(q)\) per unit.

$$ CS=\lim_{\max \Delta q\to 0}\sum \bigl(p_D(q_j)-P\bigr)\Delta q =\int_0^Q \bigl(p_D(q)-P\bigr)\,dq $$

This is the area-between-curves interpretation expressed as a limit of thin rectangles. It also explains why the integrals use a vertical difference in price and integrate with respect to quantity. Reversing the subtraction changes the sign, while integrating with respect to price without changing the setup generally measures the wrong area.

1
Identify the curve and the market outcome.
Write the inverse demand or inverse supply as a price function of quantity, and record the given \(P\) and \(Q\).
2
Check the endpoint.
Evaluate the curve at \(q=Q\). In an equilibrium example, the relevant curve prices should agree with the stated market price at the traded quantity.
3
Form the vertical difference.
Use demand minus price for consumer surplus, and price minus supply for producer surplus.
4
Integrate over traded units.
Use limits \(0\) and \(Q\), retain units, and check whether the resulting area is nonnegative under the stated assumptions.

Worked Calculations

Worked Example: Consumer Surplus Under Quadratic Demand

A hypothetical market for a specialty filter has inverse demand \(p_D(q)=64-q^2\), where price is in dollars per filter and quantity is in filters. The market price is \(P=\$28\), and \(Q=6\) filters are sold. Calculate consumer surplus. The given price and quantity are consistent with the demand curve at the endpoint.

Method. Integrate the vertical distance from inverse demand down to the market price. First check the endpoint:

$$ p_D(6)=64-6^2=64-36=28=P. $$

The price gap for quantity \(q\) is \(p_D(q)-P=(64-q^2)-28=36-q^2\). Therefore:

$$ \begin{aligned} CS&=\int_0^6 (36-q^2)\,dq\\ &=\left[36q-\frac{q^3}{3}\right]_0^6\\ &=\left(36(6)-\frac{6^3}{3}\right)-\left(36(0)-\frac{0^3}{3}\right)\\ &=216-72\\ &=144. \end{aligned} $$

Consumer surplus is \(\$144\). The integrand is nonnegative on the interval: at \(q=0\) the gap is \(36\), and at \(q=6\) it is \(0\). Thus the result has the expected sign. No rounding is needed.

Common mistake avoided. Using the maximum demand price to make a rectangle gives \((64-28)(6)=216\), which overstates surplus because willingness to pay falls as quantity increases. Integration accounts for that changing gap at every quantity.

Worked Example: Producer Surplus and a Fixed Cost

A hypothetical supplier of modular storage units has inverse supply \(p_S(q)=2+q^2\), measured in dollars per unit. The market price is \(\$11\), and the supplier sells \(Q=3\) units. Its fixed operating cost is \(\$7\), separate from the marginal-cost curve. Calculate producer surplus and, using the stated fixed cost, profit after that cost.

Method. Producer surplus is the area between the market price and inverse supply. Verify that the endpoint agrees with the market price:

$$ p_S(3)=2+3^2=2+9=11=P. $$

The vertical gap is \(P-p_S(q)=11-(2+q^2)=9-q^2\). Integrating gives:

$$ \begin{aligned} PS&=\int_0^3 (9-q^2)\,dq\\ &=\left[9q-\frac{q^3}{3}\right]_0^3\\ &=\left(9(3)-\frac{3^3}{3}\right)-0\\ &=27-9\\ &=18. \end{aligned} $$

Producer surplus is \(\$18\). To check, revenue is \(PQ=11(3)=\$33\). The variable cost represented by the marginal-cost curve is:

$$ \int_0^3 (2+q^2)\,dq =\left[2q+\frac{q^3}{3}\right]_0^3 =6+9=15. $$

Revenue minus variable cost is \(\$33-\$15=\$18\), matching the surplus integral. Subtracting the separate fixed cost gives profit after that cost of \(\$18-\$7=\$11\). No rounding is needed.

Common mistake avoided. Producer surplus is not automatically profit after all costs. With the given interpretation of the supply curve, the integral subtracts variable cost; the fixed cost is then subtracted separately to obtain profit.

Worked Example: Both Surpluses Under Nonlinear Curves

In a hypothetical market for a reusable container, inverse demand is \(p_D(q)=70-q^2\) and inverse supply is \(p_S(q)=5+\frac{8}{5}q^2\), with price in dollars per container and quantity in containers. The market trades \(Q=5\) containers at \(P=\$45\). Calculate consumer surplus, producer surplus, and their sum. Report dollar amounts to the nearest cent.

Method. Compute each vertical area separately, then add them. The endpoint check confirms that the given quantity and price meet both curves:

$$ p_D(5)=70-25=45,\qquad p_S(5)=5+\frac{8}{5}(25)=5+40=45. $$

For consumers, the gap is \(p_D(q)-P=70-q^2-45=25-q^2\):

$$ \begin{aligned} CS&=\int_0^5(25-q^2)\,dq\\ &=\left[25q-\frac{q^3}{3}\right]_0^5\\ &=125-\frac{125}{3} =\frac{250}{3} \approx \$83.33. \end{aligned} $$

For producers, the gap is \(P-p_S(q)=45-\left(5+\frac{8}{5}q^2\right)=40-\frac{8}{5}q^2\):

$$ \begin{aligned} PS&=\int_0^5\left(40-\frac{8}{5}q^2\right)\,dq\\ &=\left[40q-\frac{8}{15}q^3\right]_0^5\\ &=200-\frac{200}{3} =\frac{400}{3} \approx \$133.33. \end{aligned} $$

The sum is \(\frac{250}{3}+\frac{400}{3}=\frac{650}{3}\), or \(\$216.67\) to the nearest cent. The exact fractions are added before rounding. Both integrands are nonnegative on the interval and fall to zero at \(q=5\), consistent with the endpoint checks.

Common mistake avoided. Do not subtract supply from demand and call the result consumer surplus. That difference is the combined vertical gap between buyers’ willingness to pay and sellers’ cost. Consumer and producer surplus each use the market price as one boundary, so they require separate integrals.

Interpretation and Checks

An integral is not only a mechanical calculation; its setup carries the economic meaning. Consumer surplus adds buyers’ marginal willingness to pay above the price they actually pay. Producer surplus adds the price received above sellers’ marginal cost. The curves need not be straight for these definitions to apply.

When inverse supply represents marginal cost, producer surplus equals revenue minus variable cost over the supplied units. It does not account for fixed costs unless those costs are explicitly included in the model. This distinction is important when moving from a surplus calculation to a statement about profit.

Before accepting a numerical answer, check the following:

  • Correct boundaries: the integral covers the traded range from zero to \(Q\).
  • Correct orientation: use demand minus price for consumer surplus and price minus supply for producer surplus.
  • Consistent units: dollars per unit integrated over units produces dollars.
  • Endpoint consistency: when the setup describes equilibrium, the relevant curve values at \(Q\) agree with \(P\).
  • Reasonable sign: if the curves lie on their expected sides of the market price throughout the interval, the corresponding surplus should be nonnegative.

If the curve crosses the market price before \(Q\), the signed integral can include both positive and negative areas. Do not silently treat the entire result as a positive area: first check whether the stated quantity and curve assumptions support the usual surplus interpretation.

Key takeaway: For nonlinear inverse curves, surplus is found by integrating a vertical price difference with respect to quantity: demand minus price for consumers, and price minus supply for producers. Check the endpoints, signs, units, and any costs excluded from the curves.

Check Your Understanding

For each problem, show the vertical gap, integrate over the stated traded quantity, and check the result against the curve values or stated cost information.

  1. A hypothetical demand curve is \(p_D(q)=90-2q^2\). The market trades \(5\) units at \(\$40\). Find consumer surplus. (Answer: \(\frac{500}{3}\) dollars, or \(\$166.67\) to the nearest cent.)
  2. A hypothetical supplier has inverse supply \(p_S(q)=6+\frac{1}{2}q^2\). It sells \(6\) units at \(\$24\). Find producer surplus. (Answer: \(\$72\).)
  3. Demand for a hypothetical service is \(p_D(q)=120-q^3\). At a price of \(\$56\), \(4\) units are traded. Calculate consumer surplus and verify that the demand curve meets the given price at the traded quantity. (Answer: \(\$192\).)
  4. For a hypothetical market, \(p_D(q)=54-2q^2\) and \(p_S(q)=9+3q^2\). The market trades \(3\) units at \(\$36\). Find consumer surplus, producer surplus, and their sum. (Answer: consumer surplus \(\$36\), producer surplus \(\$54\), sum \(\$90\).)
  5. A hypothetical product has \(p_D(q)=84-q^2\) and \(p_S(q)=4+4q^2\). The traded quantity is \(4\), and the price is \(\$68\). Find both surpluses, then state the combined surplus to the nearest cent. (Answer: consumer surplus \(\frac{128}{3}\) dollars, producer surplus \(\frac{512}{3}\) dollars, combined surplus \(\$213.33\).)
Clinical Biostats