# Derivation on p.99 of Salanie, The Economics of Taxation (2nd edition)

Starting on p. 98 of Salanie's "The Economic of Taxation" (2nd edition), it explains

To probe it more rigorously, let us define the utility of taxpayer $w$ when he claims to have productivity $w'$: $$V(w', w) = u(C(w'), Y(w'), w).$$ For the mechanism to be revealing, $V$ must be maximal in $w' = w$. Assume that all functions are differentiable and that income $Y$ is positive. Then we have the first-order necessary condition $$\frac{\partial V}{\partial w'} (w, w) = 0 \tag{NC1}$$ and the second-order necessary condition $$\frac{\partial^2 V}{\partial w'^2}(w,w) \leq 0 \tag{NC2}.$$ Differentiating (NC1) gives us $$\frac{\partial^2 V}{\partial w'^2} + \frac{\partial^2 V}{\partial w' \partial w} = 0$$ ...

My question is this: How do we arrive at the last equation from (NC1)? If I differentiate $$\frac{\partial V}{\partial w'} (w', w)$$ with respect to $w$, don't I just end up with $\frac{\partial^2 V}{\partial w'\partial w}$? Likewise, if I differentiate with respect to $w'$, I end up with $\frac{\partial^2 V}{\partial w'^2}$. What am I missing?

-

I think it is the chain rule. Let $w'(w) = w$, since we are looking for revealing mechanisms. The condition $$\frac{\partial V}{\partial w'} (w'(w),w) = 0$$ holds for all $w$ because the mechanism is revealing for all types. As the (not partial) differentiate w.r.t. $w$ of the right hand side is 0, the same goes for the differentiate of the left hand size, hence $$\frac{d \frac{\partial V}{\partial w'} (w'(w),w)}{d w} = 0.$$ According to the chain rule $$\frac{d \frac{\partial V}{\partial w'} (w'(w),w)}{d w} = \frac{d w'(w)}{d w}\cdot \frac{\partial^2 V}{\partial^2 w'} (w'(w),w) + \frac{d w}{d w}\cdot \frac{\partial^2 V}{\partial w \partial w'} (w'(w),w),$$ which in a simplified form is $$\frac{\partial^2 V}{\partial^2 w'} (w'(w),w) + \frac{\partial^2 V}{\partial w \partial w'} (w'(w),w).$$
Why are you doing $\frac{\partial^2 V}{\partial w'^2}$ ?
Even if it is said that $w^{'}=w$ at the optimum, it should be taken different when you differentiate it for first order conditions. So, you differentiate it according to $w^{'}$ and $w$.