<p>The idea about the calculus of variations is to start from an optimal solution <span class="math-container">$y_i^\ast(p)$</span> (assuming there exists one) and to look at small perturbations of the form:
<span class="math-container">$$
y_i(p) = y_i^\ast(p) + \varepsilon \eta(p).
$$</span>
Here <span class="math-container">$\eta(p)$</span> is a (smooth) continuous function of <span class="math-container">$p$</span> and <span class="math-container">$\varepsilon \in \mathbb{R}$</span>. Depending on the boundary or shape conditions of  <span class="math-container">$y_i$</span>, suitable boundary or shape conditions on <span class="math-container">$\eta(p)$</span> have to be imposed. I don't know if this is the case here, so I am going to ignore those.</p>
<p>Notice that as <span class="math-container">$y_i^\ast(p)$</span> is optimal, it will be (locally) optimal to set <span class="math-container">$\varepsilon = 0$</span> and this for all suitable choices of <span class="math-container">$\eta(p)$</span>.</p>
<p>Let <span class="math-container">$g(p|y)$</span> be the density of <span class="math-container">$G(p,|y)$</span>. Let us plug in <span class="math-container">$y_i(p) = y_i^\ast(p) + \varepsilon \eta(p)$</span> into the objective function.
<span class="math-container">$$
V(\varepsilon) = \int_r^\infty\left( \left[\int_0^{y_i(p)^\ast + \varepsilon \eta(p)} v_i(u) du\right] - p (y_i^\ast(p) + \varepsilon \eta(p))\right) g(p_c|y_i^\ast(p)+ \varepsilon \eta(p)) dp_c
$$</span></p>
<p>Then assuming a local (interior) optimum at <span class="math-container">$\varepsilon = 0$</span>, we can take the first order condition with respect to <span class="math-container">$\varepsilon$</span> and evaluate it equal to <span class="math-container">$0$</span> at <span class="math-container">$\varepsilon = 0$</span> (touch wood I did not make any mistake):
<span class="math-container">$$
\begin{align*}
\frac{d V}{d \varepsilon}(0) &amp;= \int_r^\infty \left[v_i(y_i^\ast(p))\eta(p) - p \eta(p)\right]g(p|y^\ast) dp\\
&amp;+ \int_r^\infty \left(\left[\int_0^{y_i^\ast(p)} v_i(u) du\right] - p y_i^\ast(p)\right)\dfrac{\partial g}{\partial y}(p|y_i^\ast(p))\eta(p) dp = 0
\end{align*}
$$</span>
Now, we can factor out the function <span class="math-container">$\eta(p)$</span> under the outer integral.  Also given that this has to hold for every smooth function <span class="math-container">$\eta(p)$</span>, the value under the integral has to be zero for all <span class="math-container">$p$</span>. As such, we get the condition that for all <span class="math-container">$p$</span>:
<span class="math-container">$$
\begin{align*}
&amp;\left(v_i(y^\ast(p)) - p\right) g(p|y^\ast(p)) + \frac{\partial g}{\partial y}(p|y_i^\ast(p)) \left(\int_0^{y^\ast(p)} v_i(u) du  - p y_i^\ast(p)\right) = 0\\
\leftrightarrow &amp;\left(v_i(y^\ast(p)) - p\right) g(p|y^\ast(p)) + \pi(p) \frac{\partial g}{\partial y}(p, y_i^\ast(p)) = 0
\end{align*}
$$</span>
Don't know if this makes sense.</p>

CC BY-SA 4.0
2022-01-12T04:49:06.687Z
I think this actually does make sense. It might be very difficult for me to solve for v in this case, which is what I had hoped rewriting it might do. Thank you
lbt3
CC BY-SA 4.0
2022-01-12T07:29:19.200Z
EDIT: although I believe in the very last line you left out $g_y$, so it should be $(v_i(y^*(p)) - p))g + \pi(p)*g_y = 0$
lbt3
CC BY-SA 4.0
2022-01-12T11:52:05.603Z
@lbt3 thanks, I corrected the mistake
tdm
CC BY-SA 4.0
2022-01-11T08:15:18.457Z
2022-01-12T11:51:10.347Z
2022-01-12T11:51:10.347Z
tdm
<p>I am trying to use an auction model to simulate bids in a uniform price carbon emissions auction. That means it would be an auction with multiple bidders and one seller selling multiple units, or shares. In such an auction, one bids for blocks of allowances, submitting a bid schedule--the prices at which you want to buy certain amounts of allowances. Each bidder receives the amount of allowances that have a bid price over the market clearing price, <span class="math-container">$p_c$</span>, which is where the aggregate demand intersects the total supply.</p>
<p>Let the auction have <span class="math-container">$N$</span> total bidders. The auction has reserve price r. Each bidder wants up to <span class="math-container">$y_i^{max} &lt; \infty$</span> allowances with a nonincreasing marginal valuation schedule <span class="math-container">$v_{it}(q) =  (v_{it}(1),...,v_{it}(y_i^{max})) \in V$</span>. A bid is a nonincreasing price schedule <span class="math-container">$p_{it}() = (p_{it}(1),...,p_{it}(y_i^{max}))$</span> or a nonincreasing bid schedule <span class="math-container">$y_{it} \equiv max(0 \leq y \leq y_i^{max}: p_{it} \leq p)$</span>. Set <span class="math-container">$p_it(0) = \infty$</span> and <span class="math-container">$\forall y &gt; y_i^{max}, p_{it}(y) = 0$</span>. Each bidder faces residual supply <span class="math-container">$RS_{-i} = Q_t - \sum_{k=1, k \neq i}^{N}y_{kt}(p)$</span>.</p>
<p>Each bidder wants to solve the problem <span class="math-container">$\int_{r}^{\infty}[\int_{0}^{y_i(p_c)}v_i(u)du - p_c*y_i(p_c)]dG(p_c|y_i(p))$</span>, where <span class="math-container">$G(p_c|y_i(p))$</span> is the distribution of market clearing prices. We can also use <span class="math-container">$H$</span> instead, where <span class="math-container">$H = Pr[y_i(p) \leq RS_{-i}(p)]$</span>.</p>
<p>Let <span class="math-container">$\pi(p_c) = \int_{0}^{y_i(p_c)}v_i(u)du - p_c*y_i(p_c)$</span>, or the profit made at the market clearing price. Then, <span class="math-container">$\frac{\partial \pi}{\partial p_c} = y_i'(p)*v_i(y(p)) - y_i(p) - py_i'(p)$</span>. <span class="math-container">$\pi(\infty) = 0$</span> because nobody would be willing to buy allowances at that price.</p>
<p>If we use integration by parts (and H) to rewrite the problem that each bidder is solving, I believe we would get:
<span class="math-container">$$
-\pi(r)H(r, y_i(r)) - \int_{r}^{\infty}(y_i'(p_c)*v_i(y(p_c)) - y_i(p_c) - py_i'(p_c))H(p_c, y(p_c))dp_c
$$</span>
At this point I am a little confused. Given that <span class="math-container">$y_i$</span> is bidder i's bid strategy, that is the only thing the bidder can change to maximize their profit. Thus, in order to maximize with respect to it, the first order condition would be taken with respect to y. My confusion is that y is a function, so I am not sure if that functions the same way as a partial with a real-valued variable. I have been told that it has to do with Kamien and Schwartz's 1993 book on the calculus of variations, but I am not familiar with this (I have just taken through multi-variable calculus). Am I looking in the wrong place, or is this much simpler than I believe it to be? Any help or guidance would be appreciated.</p>

<auctions>
First-order condition with arbitrary function
lbt3
# First-order condition with arbitrary function

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

I am trying to use an auction model to simulate bids in a uniform price carbon emissions auction. That means it would be an auction with multiple bidders and one seller selling multiple units, or shares. In such an auction, one bids for blocks of allowances, submitting a bid schedule--the prices at which you want to buy certain amounts of allowances. Each bidder receives the amount of allowances that have a bid price over the market clearing price, $p\_c$, which is where the aggregate demand intersects the total supply.

Let the auction have $N$ total bidders. The auction has reserve price r. Each bidder wants up to $y\_i^{max} < \infty$ allowances with a nonincreasing marginal valuation schedule $v\_{it}(q) = (v\_{it}(1),...,v\_{it}(y\_i^{max})) \in V$. A bid is a nonincreasing price schedule $p\_{it}() = (p\_{it}(1),...,p\_{it}(y\_i^{max}))$ or a nonincreasing bid schedule $y\_{it} \equiv max(0 \leq y \leq y\_i^{max}: p\_{it} \leq p)$. Set $p\_it(0) = \infty$ and $\forall y > y\_i^{max}, p\_{it}(y) = 0$. Each bidder faces residual supply $RS\_{-i} = Q\_t - \sum\_{k=1, k \neq i}^{N}y\_{kt}(p)$.

Each bidder wants to solve the problem $\int\_{r}^{\infty}[\int\_{0}^{y\_i(p\_c)}v\_i(u)du - p\_c\*y\_i(p\_c)]dG(p\_c|y\_i(p))$, where $G(p\_c|y\_i(p))$ is the distribution of market clearing prices. We can also use $H$ instead, where $H = Pr[y\_i(p) \leq RS\_{-i}(p)]$.

Let $\pi(p\_c) = \int\_{0}^{y\_i(p\_c)}v\_i(u)du - p\_c\*y\_i(p\_c)$, or the profit made at the market clearing price. Then, $\frac{\partial \pi}{\partial p\_c} = y\_i'(p)\*v\_i(y(p)) - y\_i(p) - py\_i'(p)$. $\pi(\infty) = 0$ because nobody would be willing to buy allowances at that price.

If we use integration by parts (and H) to rewrite the problem that each bidder is solving, I believe we would get:
$$
-\pi(r)H(r, y\_i(r)) - \int\_{r}^{\infty}(y\_i'(p\_c)\*v\_i(y(p\_c)) - y\_i(p\_c) - py\_i'(p\_c))H(p\_c, y(p\_c))dp\_c
$$
At this point I am a little confused. Given that $y\_i$ is bidder i's bid strategy, that is the only thing the bidder can change to maximize their profit. Thus, in order to maximize with respect to it, the first order condition would be taken with respect to y. My confusion is that y is a function, so I am not sure if that functions the same way as a partial with a real-valued variable. I have been told that it has to do with Kamien and Schwartz's 1993 book on the calculus of variations, but I am not familiar with this (I have just taken through multi-variable calculus). Am I looking in the wrong place, or is this much simpler than I believe it to be? Any help or guidance would be appreciated.

**Tags:** auctions

---

## 1 answers

### Answer by username_1 on 2022-01-11. Score: 3

The idea about the calculus of variations is to start from an optimal solution $y\_i^\ast(p)$ (assuming there exists one) and to look at small perturbations of the form:
$$
y\_i(p) = y\_i^\ast(p) + \varepsilon \eta(p).
$$
Here $\eta(p)$ is a (smooth) continuous function of $p$ and $\varepsilon \in \mathbb{R}$. Depending on the boundary or shape conditions of $y\_i$, suitable boundary or shape conditions on $\eta(p)$ have to be imposed. I don't know if this is the case here, so I am going to ignore those.

Notice that as $y\_i^\ast(p)$ is optimal, it will be (locally) optimal to set $\varepsilon = 0$ and this for all suitable choices of $\eta(p)$.

Let $g(p|y)$ be the density of $G(p,|y)$. Let us plug in $y\_i(p) = y\_i^\ast(p) + \varepsilon \eta(p)$ into the objective function.
$$
V(\varepsilon) = \int\_r^\infty\left( \left[\int\_0^{y\_i(p)^\ast + \varepsilon \eta(p)} v\_i(u) du\right] - p (y\_i^\ast(p) + \varepsilon \eta(p))\right) g(p\_c|y\_i^\ast(p)+ \varepsilon \eta(p)) dp\_c
$$

Then assuming a local (interior) optimum at $\varepsilon = 0$, we can take the first order condition with respect to $\varepsilon$ and evaluate it equal to $0$ at $\varepsilon = 0$ (touch wood I did not make any mistake):
$$
\begin{align\*}
\frac{d V}{d \varepsilon}(0) &= \int\_r^\infty \left[v\_i(y\_i^\ast(p))\eta(p) - p \eta(p)\right]g(p|y^\ast) dp\\
&+ \int\_r^\infty \left(\left[\int\_0^{y\_i^\ast(p)} v\_i(u) du\right] - p y\_i^\ast(p)\right)\dfrac{\partial g}{\partial y}(p|y\_i^\ast(p))\eta(p) dp = 0
\end{align\*}
$$
Now, we can factor out the function $\eta(p)$ under the outer integral. Also given that this has to hold for every smooth function $\eta(p)$, the value under the integral has to be zero for all $p$. As such, we get the condition that for all $p$:
$$
\begin{align\*}
&\left(v\_i(y^\ast(p)) - p\right) g(p|y^\ast(p)) + \frac{\partial g}{\partial y}(p|y\_i^\ast(p)) \left(\int\_0^{y^\ast(p)} v\_i(u) du - p y\_i^\ast(p)\right) = 0\\
\leftrightarrow &\left(v\_i(y^\ast(p)) - p\right) g(p|y^\ast(p)) + \pi(p) \frac{\partial g}{\partial y}(p, y\_i^\ast(p)) = 0
\end{align\*}
$$
Don't know if this makes sense.

> **Comments:**
> **username_0**: I think this actually does make sense. It might be very difficult for me to solve for v in this case, which is what I had hoped rewriting it might do. Thank you  
> **username_0**: EDIT: although I believe in the very last line you left out $g_y$, so it should be $(v_i(y^*(p)) - p))g + \pi(p)*g_y = 0$  
> **username_1**: @lbt3 thanks, I corrected the mistake  

---

