[Math] Partial derivative and dependent variables

partial derivative

Suppose I have two variables, $a$ and $b$, that are related by $a + b = 1$.
This establishes that the only acceptable values of $a$ and $b$ are on a line in the $(a,b)$ plane from $(0,1)$ to $(1,0)$.

Consider a function $f(a,b)$. Can we compute the partial derivative, $\partial f / \partial a|_b$, even though making a differential change of $a$ while $b$ is fixed will fail to satisfy $a + b = 1$?

I think we can't compute the derivative, because fixing $b$ fixes $a$. In my field it appears common to simply ignore algebraic constraints between variables – that is, computing $\partial f / \partial a$ and $\partial f / \partial b$ as if there is no dependency between $a$ and $b$. This massively simplifies the calculation, but I think it's wrong.

Context: computing sensitivities of a differential-algebraic system governing the evolution of chemical reactors. The constrained variables are chemical mass fractions (must sum to 1), and the functions of interest are reaction rates. The above is an attempt at a minimum working example.

Best Answer

In you enforce that at any order $a+b=1$, then $f$ is not really a function of $a$ and $b$, but just one of them, say $a$. Then $f(a,b)=f(a,b(a))\equiv F(a)$ where $b(a)=1-a$. Then there is only ordinary derivatives, namely, $\frac{dF}{da}(a)$.

Alternatively, you may consider $f(a,b)$ a mathematically valid even outside of the line $a+b=1$, but from a physical point of view, you happen to be only interested in the derivatives along the line $a+b=1$. Then you are dealing with function of two variables, and the actual derivative of $f$ is really the gradient of $f$, $\nabla f$. See for instance here.

In short then, the derivative is a function that is well defined in a point along that line -assuming $f$ is indeed derivable on all points of that line.

You can also think of it in the following way: Taking the partials is just a trick, or a mnemonic for us to easily calculate the limit involved in the definition of $\nabla f$ or $dF/da$.

Related Question