# First-order condition with arbitrary function

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.

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.

• 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
Jan 12, 2022 at 4:49
• 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
Jan 12, 2022 at 7:29
• @lbt3 thanks, I corrected the mistake
– tdm
Jan 12, 2022 at 11:52