<p>There isn't an inconsistency. In the second case you forgot to take into account that below equilibrium price the <span class="math-container">$q(p)$</span> is determined by supply not demand. What you calculated would be consumer surplus if quantity in the market was <span class="math-container">$q(p=8)=12$</span>. But quantity in the market is clearly  <span class="math-container">$q(p=8)=3$</span> not <span class="math-container">$12$</span>.</p>
<p>This is because price floor constrains the quantity that consumers can actually get. You have to take this constraint into account or you will get wrong answer.</p>
<p>The correct problem here is</p>
<p><span class="math-container">$$\int_{p_0}^{p_{max}} q(p) dp \quad \text{s.t. } q = 3 $$</span></p>
<p>This can be rewritten as:</p>
<p><span class="math-container">$$ \int_{p(q=3)}^{p_{max}} q(p) dp +\int_{p_0}^{p(q=3)} 3 dp = 31.5 $$</span></p>
<p>So both definitions are perfectly consistent. You are just making a mistake in the second definition by assuming that market quantity is 12 whereas clearly, as you even show in your picture, market quantity with price constraint is 3 not 12.</p>

CC BY-SA 4.0
2022-10-30T12:50:15.670Z
I'm sorry, I don't get it still. $\int_{8}^{20} q(p) dp + \int_{8}^{8} 3 dp \neq 31.5$. Can yo please elaborate that part? I took $p_0 = 8$ and $p(q=3) = 8$.
marblegoolies
CC BY-SA 4.0
2022-10-30T12:55:15.197Z
@marblegoolies p(q=3) =17 so you made a mistake there (since you say q_d=20-p hence p(q=3)=17 not 8). You are still using demand function, you just need to respect quantity constraint given by supply. CS is still area under demand and above price, however now supply is biding the market quantity not to exceed 3
1muflon1
CC BY-SA 4.0
2022-10-30T13:02:49.293Z
Oh right. Now it's perfect! Thank you
marblegoolies
CC BY-SA 4.0
2022-10-30T12:05:39.463Z
2022-10-30T12:05:39.463Z
1muflon1
<p>I report here the equations you wrote in Desmos:</p>
<p>Demand function (inverse) :</p>
<p><span class="math-container">$y\ =\ -x+20 \;\;\;\; \;\;\;\; \;\;\;\; \;\;\;\; \;\;\;    (1)$</span></p>
<p>Supply function (inverse):</p>
<p><span class="math-container">$y = x+5\;\;\;\; \;\;\;\; \;\;\;\;\;\;\;\; \;\;\;\; \;\;\;\; \;\;(2)$</span></p>
<p>Integrals in Desmos:</p>
<p><span class="math-container">$\int_{8}^{20}\left(-y+20\right)dy\;\;\;\; \;\;\;\; \;\;\;\;\;\;\;\; \; (3)$</span></p>
<p><span class="math-container">$\int_{0}^{3}\left(-x+20-8\right)dx.\;\;\;\; \;\;\;\; \;\;\;\;(4) $</span></p>
<p>I think you made a miscalculation in integral (4), as the integration extreme <span class="math-container">$3$</span> is wrong. You have to calculate the extreme, the <span class="math-container">$q_0$</span> in your original post,  from the demand function, setting <span class="math-container">$y=p_0=8$</span>.</p>
<p>The result is <span class="math-container">$q_0=12$</span>. So <span class="math-container">$12$</span> is the second extreme of integration.</p>
<p>If you integrate from <span class="math-container">$0$</span> to <span class="math-container">$12$</span> you have:</p>
<p><span class="math-container">$\int_{0}^{12}\left(-x+20-8\right)dx=72.\;\;\;\; \;\;\;\; \;\;\;\;(4')$</span></p>
<p>[edit]I posted this answer before I read the answer of muflon1.
I saw the question only from a mathematical point of view, and I confused demand and supply. But supply is here the 'short side' of the market.</p>

CC BY-SA 4.0
2022-10-30T12:39:12.873Z
2022-10-30T12:45:20.963Z
2022-10-30T12:45:20.963Z
BakerStreet
<p>Two days ago, <a href="https://economics.stackexchange.com/questions/53279/consumer-surplus-definition">I asked a question about consumer surplus</a>. I asked if <span class="math-container">$$\text{CS at }p_0 = \int_{0}^{q_0} [p(q) - p_0] \ dq = \int_{p_0}^{p_\max} q(p) \ dp$$</span> holds when <span class="math-container">$p_\max$</span> exists and <span class="math-container">$D(p_\max) = 0$</span>.</p>
<p>I was verifying with an example today and it doesn't seem like that. Consider <span class="math-container">$Q_d = 20 - P_d$</span> and <span class="math-container">$Q_s = P_s - 5$</span>. Suppose the government enforces a price of <span class="math-container">$p_0 = 8$</span>. Then</p>
<p><span class="math-container">$$\int_{0}^{q_0} [p(q) - p_0] \ dq = 31.5 \neq 72 = \int_{p_0}^{p_\max} q(p) \ dp$$</span></p>
<p>seems to be the case here. I have graphically explained every calculation here, thanks to Desmos, so the work becomes easier for you: <a href="https://www.desmos.com/calculator/hnjtruvfyj" rel="nofollow noreferrer">https://www.desmos.com/calculator/hnjtruvfyj</a>.</p>
<p>Please explain the inconsistency and if I am missing something.</p>

<microeconomics>
Consumer surplus definition inconsistency
marblegoolies
# Consumer surplus definition inconsistency

(Asked by: username_0 on 2022-10-30)

Two days ago, [I asked a question about consumer surplus](https://economics.stackexchange.com/questions/53279/consumer-surplus-definition). I asked if $$\text{CS at }p\_0 = \int\_{0}^{q\_0} [p(q) - p\_0] \ dq = \int\_{p\_0}^{p\_\max} q(p) \ dp$$ holds when $p\_\max$ exists and $D(p\_\max) = 0$.

I was verifying with an example today and it doesn't seem like that. Consider $Q\_d = 20 - P\_d$ and $Q\_s = P\_s - 5$. Suppose the government enforces a price of $p\_0 = 8$. Then

$$\int\_{0}^{q\_0} [p(q) - p\_0] \ dq = 31.5 \neq 72 = \int\_{p\_0}^{p\_\max} q(p) \ dp$$

seems to be the case here. I have graphically explained every calculation here, thanks to Desmos, so the work becomes easier for you: <https://www.desmos.com/calculator/hnjtruvfyj>.

Please explain the inconsistency and if I am missing something.

**Tags:** microeconomics


---

## 2 answers

### Answer by username_1 on 2022-10-30. Score: 1 | Accepted answer

There isn't an inconsistency. In the second case you forgot to take into account that below equilibrium price the $q(p)$ is determined by supply not demand. What you calculated would be consumer surplus if quantity in the market was $q(p=8)=12$. But quantity in the market is clearly $q(p=8)=3$ not $12$.

This is because price floor constrains the quantity that consumers can actually get. You have to take this constraint into account or you will get wrong answer.

The correct problem here is

$$\int\_{p\_0}^{p\_{max}} q(p) dp \quad \text{s.t. } q = 3 $$

This can be rewritten as:

$$ \int\_{p(q=3)}^{p\_{max}} q(p) dp +\int\_{p\_0}^{p(q=3)} 3 dp = 31.5 $$

So both definitions are perfectly consistent. You are just making a mistake in the second definition by assuming that market quantity is 12 whereas clearly, as you even show in your picture, market quantity with price constraint is 3 not 12.

> **Comments:**
> **username_0**: I'm sorry, I don't get it still. $\int_{8}^{20} q(p) dp + \int_{8}^{8} 3 dp \neq 31.5$. Can yo please elaborate that part? I took $p_0 = 8$ and $p(q=3) = 8$.  
> **username_1**: @username_0 p(q=3) =17 so you made a mistake there (since you say q_d=20-p hence p(q=3)=17 not 8). You are still using demand function, you just need to respect quantity constraint given by supply. CS is still area under demand and above price, however now supply is biding the market quantity not to exceed 3  
> **username_0**: Oh right. Now it's perfect! Thank you  

---

### Answer by username_2 on 2022-10-30. Score: 0

I report here the equations you wrote in Desmos:

Demand function (inverse) :

$y\ =\ -x+20 \;\;\;\; \;\;\;\; \;\;\;\; \;\;\;\; \;\;\; (1)$

Supply function (inverse):

$y = x+5\;\;\;\; \;\;\;\; \;\;\;\;\;\;\;\; \;\;\;\; \;\;\;\; \;\;(2)$

Integrals in Desmos:

$\int\_{8}^{20}\left(-y+20\right)dy\;\;\;\; \;\;\;\; \;\;\;\;\;\;\;\; \; (3)$

$\int\_{0}^{3}\left(-x+20-8\right)dx.\;\;\;\; \;\;\;\; \;\;\;\;(4) $

I think you made a miscalculation in integral (4), as the integration extreme $3$ is wrong. You have to calculate the extreme, the $q\_0$ in your original post, from the demand function, setting $y=p\_0=8$.

The result is $q\_0=12$. So $12$ is the second extreme of integration.

If you integrate from $0$ to $12$ you have:

$\int\_{0}^{12}\left(-x+20-8\right)dx=72.\;\;\;\; \;\;\;\; \;\;\;\;(4')$

[edit]I posted this answer before I read the answer of muflon1.
I saw the question only from a mathematical point of view, and I confused demand and supply. But supply is here the 'short side' of the market.


---

