TITLE: Normal derivative of a partial derivative
QUESTION [5 upvotes]: I am reading lecture some lecture notes where the professor defines a function as such:
$$\frac{d}{dc}\bigg[\frac{\partial W(c',c)}{\partial c'}\bigg|_{c'=c}\bigg]_{c=c^*} < 0$$
This I can make sense of as: the slope of the function $\frac{\partial W(c',c)}{\partial c'}\bigg|_{c'=c}$ being less than 0 at $c=c^*$
The professor goes on to say that by "carefully differentiating" we can rewrite this as:
$$ \bigg[\frac{\partial^2W(c',c)}{\partial c'^2} + \frac{\partial^2 W(c',c)}{\partial c' \partial c}\bigg]\Bigg|_{c'=c=c^*} < 0 $$
This I do not understand. My initial thought would be that by taking the derivative of $\frac{\partial W(c',c)}{\partial c'}\bigg|_{c'=c}$ with respect to $c$ only should simply yield: $\frac{\partial^2 W(c',c)}{\partial c' \partial c}\bigg|_{c'=c=c^*}$. Where does this extra term of $\frac{\partial^2W(c',c)}{\partial c'^2}$ come from? Can someone point out where I have misunderstood?

REPLY [2 votes]: $W$ is a function of two variables.  Let's call them $a$ and $b$:
$$W=W(a,b)$$
Partial derivative of $W$ w.r.t. its first parameter is also a function of two variables.  Let's call this function $f$:
$$f(a,b) = \frac{\partial}{\partial{a}}W(a,b)$$
We want to turn this into a function of just one parameter $c$ by making $a$ and $b$ be functions of $c$.  Let's call the new function of one variable $g$:
$$g(c) = f(a(c), b(c))$$
Now let's take a derivative of $g(c)$.  The derivative is also a function of $c$:
$$\begin{aligned}\frac{dg}{dc} &= \frac{\partial{f}}{\partial{a}}\frac{da}{dc} + \frac{\partial{f}}{\partial{b}}\frac{db}{dc}\\\\
&=\frac{\partial^2{W}}{\partial{a}^2}\frac{da}{dc} + \frac{\partial^2{W}}{\partial{a}\partial{b}}\frac{db}{dc}
\end{aligned}$$
where $f$ and $W$ are evaluated at $(a(c), b(c))$
In your case, functions $a(c)$ and $b(c)$ are trivial: $a(c) = b(c) = c$.  This makes $da/dc = db/dc = 1$  and the result follows.