# Partial derivative and dependent variables

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.

• The function $f$ might be given by a formula that technically (mathematically) still makes sense for such $a,b$ that do not satisfy the constraint. Then $\partial f /\partial a$ would be the local rate of change of the value of $f$ if we just increase $a$ independently. That doesn't give us any result for the context of the constraint, but we could compute the directional derivative, which is the gradient of f multiplied with a unit vector indicating a direction. This gives us the rate of change of $f$ if we change $a$ and $b$ along the line with that direction-this makes sense in context. Sep 11, 2015 at 1:40

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$.