Differentiate the Lagrangian wrt. momentum? Given
$$
L=L(t, x_i, \dot x_i)
$$
as a function of generalized coordinates/velocity, and
$$
p_i:=\frac{\partial L}{\partial \dot x_i},
$$
how can we calculate
$$\frac{\partial L}{\partial p_i}?$$
 A: I guess the exact answer depends on the context where you found this.
But mathematically, this could be done with the chain rule:
$$ \frac{\partial L}{\partial p_i} = \frac{\partial L}{\partial \dot{x}_i} \frac{\partial \dot{x}_i}{\partial p_i}. $$
Then, as suggested in the comment, you'd have to work out $\dot{x}_i(p_i)$ in order to compute $\partial \dot{x}_i/\partial p_i$.
A possible application of this is comuting the Hamiltonian $H(x_i, p_i)$ from the Lagrangian $L(x_i, \dot{x}_i)$.  In (classical) electromagnetism you know that the conjugate momentum $p_i$ ( $= \partial L/\partial \dot{x}_i$ ) $= \gamma m_0 \dot{x}_i$, i.e. $p_i(\dot{x}_i)$.
You can just invert this by writing $\dot{x}_i = p_i/(\gamma m_0)$, i.e. $\dot{x}_i(p_i)$. This allows you to find the Hamiltonian $H = p_i \dot{x}_i - L = \gamma m_0 c^2$. 
A: @SuperCiocia:
The context is what you mention. Expressing Hamilton Equations only related to Lagrangian, generalized coordinated/velocity, it is not applied to a specific dynamical system, it's general.
Particulary this one
$\frac{\partial H}{\partial p_i}=\dot{x_i}$
If my math are correct we have:
$$
\begin{align}
\frac{\partial H}{\partial p_i} & = \frac{\partial \sum{\dot{x_k}p_k} - L}{\partial p_i} = \dot{x_i} \\
 & = \sum{\frac{\partial \dot{x_k}p_k}{\partial p_i}} - \frac{\partial L}{\partial p_i} \\ 
 & = \sum{\dot{x_k}} - \frac{\partial L}{\partial p_i} (??? NotSure) \\
 & = \dot{x_i} - \frac{\partial L}{\partial p_i} (Or ??? NotSure) \\
\end{align}
$$
What should give us:
$$
\frac{\partial L}{\partial p_i}=\sum{\dot{x_k}}-\dot{x_i}
$$
Or
$$
\frac{\partial L}{\partial p_i}=0
$$
As mentionned by @Frobenius
If it's correct didn't help to express $\frac{\partial H}{\partial p_i}=\dot{x_i}$ only in function of term $(t, x_i, \dot{x_i}, L)$.
