The integral is not just about area — it measures inequality between nations, excess profit between investments, and the "typical" value of any continuously changing quantity.
Why This Section Matters
The World's Richest 1% Own More Than Half of Everything
In 2023, Oxfam reported that the wealthiest 1% accumulated as much new wealth as the bottom 99% combined over the previous decade. Pakistan's own data shows the richest 20% earn over 40% of national income, while the poorest 20% earn less than 9%.
How do economists measure inequality precisely? Not with opinion — with calculus. The Lorenz curve and Gini Index turn wealth distribution into a definite integral. The gap between a fair society and the real one is literally the area between two curves.
In this section you will see the definite integral at work in three real-world contexts: measuring the gap between two economic plans (net excess profit), quantifying inequality with the Gini Index, and computing the average value of any continuously changing quantity.
Learning Objectives
What You Will Master
1
Find the area between two curves and use it to compute net excess profit and the Gini Index (Lorenz curves).
2
Derive and apply the formula for the average value of a function.
3
Interpret average value in terms of rate and area (two interpretations).
§ 1 — Area Between Two Curves
What "Area Between Two Curves" Really Means
You already know how to compute the area under a single curve. Now we ask: what is the area of the region trapped between two curves?
The Core Idea — Visually
Area between curves
=
Area under f(x)
−
Area under g(x)
The yellow region = everything under f minus everything under g. Subtracting integrals = integrating the difference.
Each thin vertical rectangle spanning from g(x) up to f(x) has height $f(x)-g(x)$ and width $\Delta x$. Summing all these and taking the limit gives the formula:
Area Between Two Curves
If $f(x) \geq g(x)$ on $[a,b]$, the area of the region between the two curves is:
$$A = \int_a^b \bigl[f(x) - g(x)\bigr]\,dx$$
Always put the top curve first. The difference $f(x)-g(x) \geq 0$, so $A \geq 0$ always.
📐 Area Between Two Curves — Explorer
Top curve f(x) — choose or swap
Bottom curve g(x)
Interval [a, b]
to
Rectangles
Exact Area
6.800000
numerical (4000 pts)
Estimated (Mid)
6.850000
n = 8 rectangles
Absolute Error
0.050000
≈ 0.74% off
Accuracy
99.26%
f(x) — selected top
g(x) — selected bottom
f > g region (gold)
g > f region (violet)
sample point
💡 Try this: Set f = −x²+4 and g = x²−0.5, interval [−1.5, 1.5]. Drag n from 4 → 200 and watch the estimate converge to the exact value. Notice mid-point converges fastest!
§ 1a — Derivation (Optional)
Where Does the Formula Come From?
The formula follows the same Riemann sum logic used in §5.3. Click below for the full derivation.
Divide $[a,b]$ into $n$ equal subintervals of width $\Delta x = \dfrac{b-a}{n}$. Pick sample point $x_i^*$ in the $i$-th subinterval.
The $i$-th rectangle has height $f(x_i^*)-g(x_i^*)$ and area:
In an exam you will only be given equations, not graphs. You must:
Find intersection points: set $f(x)=g(x)$ and solve. These become your limits or split points.
Determine which is on top in each sub-region by testing a point between each pair of crossings.
Split the integral at every crossing. Always write larger minus smaller.
The Golden Rule: If $f(c)=g(c)$ for some c inside $[a,b]$, the curves switch which is on top at x=c. Write separate integrals: $\int_a^c[\text{top}-\text{bottom}]\,dx + \int_c^b[\text{new top}-\text{new bottom}]\,dx$.
Example 4 — Area Enclosed by $y=x^3$ and $y=x^2$
Find the area of the region enclosed by the curves $y=x^3$ and $y=x^2$.
⚠ Graph for understanding only — not guaranteed in exams
Imagine comparing two business investment plans — Plan 1 and Plan 2 — both generating profit over time but at different rates. Over the next N years, how much more total profit does the better plan accumulate? The answer is the area between the two rate-of-profit curves.
Net Excess Profit
Suppose two plans generate profits $P_1(t)$ and $P_2(t)$ with rates $P_1'(t)$ and $P_2'(t)$. If $P_2'(t)\geq P_1'(t)$ over $[0,N]$, the net excess profit of Plan 2 over Plan 1 is:
$$NE = \int_0^N\bigl[P_2'(t)-P_1'(t)\bigr]\,dt$$
This is the area between the two rate curves $P_2'$ and $P_1'$ over $[0,N]$.
Net Excess Profit — Visualised
The shaded region = how much extra Plan 2 earns over Plan 1, accumulated over $[0,N]$.
Why it works: By the Net Change Theorem, $\int_0^N[P_2'(t)-P_1'(t)]\,dt = [P_2(N)-P_1(N)] - [P_2(0)-P_1(0)]$ — the total accumulated excess profit of Plan 2 over Plan 1 from start to finish.
Example 7 — LUMS Canteen Franchise Plans
Two franchise options have profit rates (PKR lakhs/year): $P_1'(t)=2t+4$ and $P_2'(t)=-t^2+8t+4$. Find the net excess profit of Plan 2 over Plan 1 over $N=5$ years.
Step 1 — Verify Plan 2 is better throughout $[0,5]$.
$P_2'-P_1'= -t^2+8t+4-(2t+4)=-t^2+6t=t(6-t)\geq 0$ for $t\in[0,6]$. ✓
Two startup plans: $P_1'(t)=t^2-4t+5$ and $P_2'(t)=-t^2+4t+1$ over $[0,6]$ years. Find the total net excess profit (whichever plan is better at each moment).
In 1905, American economist Max Lorenz was studying income data and had a brilliant idea: draw a single curve capturing how evenly income is distributed. Forty years later, Italian statistician Corrado Gini converted that curve into a single number — the Gini Index — now used by every government and the World Bank to rank inequality across nations.
The Gini Index is literally a ratio of two areas — and computing it requires the definite integral you just learned.
Building the Lorenz Curve — Step by Step
1
Rank everyone by incomeSort the entire population from poorest to richest. Each person gets a number 0%–100% based on their rank in the income ladder.
2
Think in cumulative percentagesThe point (x, y) on the Lorenz curve means: "the bottom x% of the population earns y% of total income." So (0.4, 0.12) means the bottom 40% earn only 12% of total income.
3
The perfect equality lineIf everyone earned exactly the same, the bottom 30% would earn 30%, bottom 50% would earn 50%, etc. This gives the straight line y=x — the "line of perfect equality."
4
Real curves bow downwardIn reality the poor earn a smaller share than their population fraction. The Lorenz curve always lies below or on y=x. The further it bows, the more unequal the society.
The Lorenz Curve
A Lorenz curve $y=L(x)$, $x\in[0,1]$ satisfies: (1) $L(0)=0$ and $L(1)=1$; (2) $L(x)\leq x$ for all $x\in[0,1]$; (3) $L$ is increasing and convex (bows downward).
The Gini Index
The Gini Index $G$ measures the area between the perfect equality line and the Lorenz curve, as a fraction of the full triangle:
Pakistan context: Pakistan's Gini Index is approximately 0.29–0.33 (World Bank, 2023), suggesting moderate income inequality. However, wealth inequality is significantly higher — the richest 10% hold over 60% of total wealth.
Example 9 — Gini Index from $L(x)=x^3$
A country's income distribution is modelled by $L(x)=x^3$. Find the Gini Index and interpret.
District A is more equal ($G_A < G_B$). The Gini gap is $\approx 0.083$ — District B has substantially more inequality.
§ 6 — Average Value of a Function
What Is the "Average" of a Continuously Changing Quantity?
You know how to average a finite list: add them up, divide by the count. But what if the quantity changes continuously — like temperature through a day, speed over a trip, or drug concentration in blood?
Deriving the Formula from First Principles
Divide $[a,b]$ into $n$ subintervals, width $\Delta x=(b-a)/n$, sample $f(x_1),\ldots,f(x_n)$.
Equivalently: $f_{\text{avg}}\cdot(b-a)=\int_a^b f(x)\,dx$ — average value times interval length equals area under the curve.
📏 Average Value Explorer
f(x)
Area under f(x)
Rectangle height = f_avg (same area!)
§ 7 — Two Interpretations of Average Value
Two Ways to Understand Average Value
🔷 Geometric Interpretation
$f_{\text{avg}}$ is the height of a rectangle on $[a,b]$ that has exactly the same area as the region under $f(x)$.
The rectangle with height $f_{\text{avg}}$ and width $(b-a)$ has area:
$$f_{\text{avg}}\cdot(b-a)=\int_a^b f(x)\,dx$$
$f_{\text{avg}}$ "levels out" the function — it is the height at which you can replace the wavy curve with a flat horizontal line and preserve the exact same total area.
⚡ Rate Interpretation
When $f(t)$ represents a rate of change, the average value has a direct physical meaning:
Rate Interpretation
If $f(t)$ is the rate of change of some quantity $Q$, then $f_{\text{avg}}$ is the constant rate that would produce the same total change in $Q$ over $[a,b]$.
$f(t)$ represents
$f_{\text{avg}}$ means
Speed (km/h)
Average speed — same distance if travelling at this constant speed
Power consumption (MW)
Average power — same total energy consumed
Marginal revenue (PKR/unit)
Average marginal revenue over the production range
Temperature (°C)
Average daily temperature reading
Example 12 — Average Temperature in Lahore
During a summer day, temperature (°C) at time $t$ hours after midnight is $T(t)=-0.3t^2+6t+22$, $0\leq t\leq 20$. Find the average temperature.
A Gini of 0.43 signals significant inequality in this village.
Problem 9 — Challenge — Three Curves
Find the area enclosed among $y=x^2$, $y=2-x^2$, and $y=2x-1$.
Pairwise intersections: $x^2=2-x^2 \Rightarrow x=\pm 1$; $x^2=2x-1 \Rightarrow x=1$; $2-x^2=2x-1 \Rightarrow x=-3,1$. The enclosed region is on $[-1,1]$ where top $=2-x^2$, bottom $=x^2$.
Coming up next — §5.5 Applications to Business: consumer and producer surplus, present and future value of income streams, and more economic tools built on everything you have learned in this chapter.