I appreciate with hindsight that there was a lot to take in this this lecture. The punchline was that for an optimal auction (maximizing the seller's expected revenue), the fact that we want a direct revelation mechanism forces:

\[ P_i(\theta_i) = \theta_iV_i(\theta_i)-\int_{\theta_i^*}^{\theta_i} V_i(w)dw\tag{1}

\]

where $P_i(\theta_i)$ is bidder $i$'s expected payment (and $V_i(\theta_i)$ is his probability of winning the item) given that his valuation for the item is $\theta_i$, and thus that

\[ \text{seller's expected revenue}=E\left[\sum_i\phi_i(\theta_i)g(\theta_i)v_i(\theta_1,\ldots,\theta_n)\right].

\] So the auctioneer should arrange that for every $\theta_1,\dotsc,\theta_n$, he maximizes $\sum_i\phi_i(\theta_i)g(\theta_i)v_i(\theta_1,\ldots,\theta_n)$. This simply means awarding the item to the bidder with the largest non-negative value of $g(\theta_i)$, and not awarding the item to anyone if no $g(\theta_i)$ is positive.

This becomes more interesting when agents are heterogeneous, so that $F_i$ differ. The anaysis alters only slightly, becoming

\[ \text{seller's expected revenue}=E\left[\sum_i\phi_i(\theta_i)g_i(\theta_i)v_i(\theta_1,\ldots,\theta_n)\right].

\] For example, if $n=2$ and $\theta_1,\theta_2$ are independent and distributed $U[0,1]$ and $U[0,2]$ then $g_1(\theta_1)=2\theta_1-1$ and $g_2(\theta_2)=2\theta_2-2$. So the optimal auction is one in which

(a) Bidder 1 wins the item if $2\theta_1-1\geq 2\theta_2-2$ and $\theta_1\geq 1/2$.

(b) Bidder 2 wins the item if $2\theta_2-2> 2\theta_1-1$ and $\theta_2\geq 1$.

(c) Otherwise the item is not won.

\[ P_i(\theta_i) = \theta_iV_i(\theta_i)-\int_{\theta_i^*}^{\theta_i} V_i(w)dw\tag{1}

\]

where $P_i(\theta_i)$ is bidder $i$'s expected payment (and $V_i(\theta_i)$ is his probability of winning the item) given that his valuation for the item is $\theta_i$, and thus that

\[ \text{seller's expected revenue}=E\left[\sum_i\phi_i(\theta_i)g(\theta_i)v_i(\theta_1,\ldots,\theta_n)\right].

\] So the auctioneer should arrange that for every $\theta_1,\dotsc,\theta_n$, he maximizes $\sum_i\phi_i(\theta_i)g(\theta_i)v_i(\theta_1,\ldots,\theta_n)$. This simply means awarding the item to the bidder with the largest non-negative value of $g(\theta_i)$, and not awarding the item to anyone if no $g(\theta_i)$ is positive.

This becomes more interesting when agents are heterogeneous, so that $F_i$ differ. The anaysis alters only slightly, becoming

\[ \text{seller's expected revenue}=E\left[\sum_i\phi_i(\theta_i)g_i(\theta_i)v_i(\theta_1,\ldots,\theta_n)\right].

\] For example, if $n=2$ and $\theta_1,\theta_2$ are independent and distributed $U[0,1]$ and $U[0,2]$ then $g_1(\theta_1)=2\theta_1-1$ and $g_2(\theta_2)=2\theta_2-2$. So the optimal auction is one in which

(a) Bidder 1 wins the item if $2\theta_1-1\geq 2\theta_2-2$ and $\theta_1\geq 1/2$.

(b) Bidder 2 wins the item if $2\theta_2-2> 2\theta_1-1$ and $\theta_2\geq 1$.

(c) Otherwise the item is not won.

Appropriate payments for the auction design have to be worked out using (1). However, another way to figure the payments is by the VCG mechanism. This boils down to agent $i$ paying, when he wins, the least $\theta_i$ for which he would still win. E.g. in case (a) bidder 1 should win, and pay $\max\{\theta_2-1/2,1/2\}$.