What is the total derivative of a partial derivative of a function, whos total derivative depends on that function? I have a function $c(t,\lambda)$ with 
$$\frac{\text dc}{\text dt}=f(c,\lambda),$$
or
$$\left(\frac{\text dc}{\text dt}\right)(t,\lambda)=f(c(t,\lambda),\lambda),$$

How to compute 
  $$\frac{\text d}{\text dt}\left(\frac{\partial c}{\partial \lambda}\right)\ ?$$

Or more importantly why/how?
 A: Let primes denote total derivatives with respect to $t$
and subscripts denote partial derivatives,
so that $t_\lambda=\lambda_t=0$ but
$\lambda'=\frac{d\lambda}{dt}$ is "irreducible"
(and not necessarily zero),
and assume that all derivatives below exist.
Given the equation
$$
c'=\frac{d}{dt}c(t,\lambda)=f(c,\lambda)
$$
for the total derivative of $c$ with respect to $t$,
note that (a priori)
$$
dc
=\frac{\partial c}{\partial t}dt
+\frac{\partial c}{\partial \lambda}d\lambda
\quad\implies\quad
c'=c_t+c_\lambda\lambda'
$$
which in our case (a posteriori),
i.e. from $f=c'$, implies that
$$
\frac{\partial c}{\partial \lambda}
=c_\lambda=\frac{c'-c_t}{\lambda'}
=\frac{f-c_t}{\lambda'}.
$$
Although $c_t$ and $c_\lambda$ are,
like $c(t,\lambda)$, functions of the
independent variables $t$ and $\lambda$,
they nevertheless also satisfy a constraint
with respect to the the total derivative.
This is true a priori. However, in our case,
we are given that $c$ satisfies an ordinary
differential equation with respect to time,
i.e. the total derivative of $c$ with respect to "time" $t$
is itself a function $f$ of $c$ and $\lambda$.
This is specific to our problem (a posteriori),
and introduces extra paths (from $c'$ to $c$ and $\lambda$),
but not cycles, in the directed graph
or DAG of variable dependencies depicted below.
These extra dependency paths are shown in green,
while the original depenencies of $c(t,\lambda)$ are red,
and all the rest, which follow from a priori principles
(like the total derivative a.k.a. chain rule formula are black).

Now from the (a priori) definition of total derivative,
$$
\frac{d}{dt}f(c,\lambda)
=f_cc'+f_\lambda\lambda'
=ff_c+\lambda'f_\lambda
$$
and
$$
(c_t)'=c_{tt}+\lambda'c_{t\lambda}
$$
so that (using the quotient rule)
$$
\frac{d}{dt}
\left(
\frac{\partial c}{\partial \lambda}
\right)
=
(c_\lambda)'
=
\left(
\frac{f-c_t}{\lambda'}
\right)'
=
\frac{
\left(f'-(c_t)'\right)\lambda'
-
\left(f-c_t\right)\lambda''
}{(\lambda')^2}
$$
$$
=\frac{
 \left(ff_c+\lambda'f_\lambda\right)
-\left(c_{tt}+\lambda'c_{t\lambda}\right)
-\lambda''c_\lambda
}{\lambda'}
$$
$$
=f_\lambda-c_{t\lambda}
+\frac{ff_c-c_{tt}-\lambda''c_\lambda}{\lambda'}
$$
Note that we did not need or use the equations
$$(c_\lambda)'=c_{\lambda t}+\lambda'c_{\lambda\lambda}$$
$$(c')_t=c_{tt}+\lambda'c_{\lambda t}$$
but by the latter, we can see that
$(c_t)'=(c')_t$ $\iff$
$c_{\lambda t}=c_{t\lambda}$
$\iff$ $c(t,\lambda)\in C^2$.
Also, note that


*

*the answer would just be $(c_\lambda)'=c_{\lambda t}$, by the former equation above, if $\lambda$ were a model parameter so that $\lambda'=0$;

*the answer would be quite different if $f$ were the partial, rather than the total, derivative of $c$, i.e. if we were given $\frac{\partial}{\partial t}c(t,\lambda)=f(c,\lambda)$ in the original problem.

