Integrating an expression wrt to a variable which is a function of variables which appear in the expression? Say I have an expression like this:
$$\partial C/\partial a = \frac{(a - y)}{a(1-a)x}$$
where $a$ and $y$ are independent, but $a$ is a function of $x$ and possibly some other variables (i.e. $a = f(x)$). Does it make sense to integrate this expression wrt to $a$, even though $a$ depends on $x$? If it is possible, how would it be done for this example?
 A: Off course, it makes sense.
When you differentiate some function partially,
you differentiate the function wrt a variable as if other variables were constans.
So when you want to integrate it in order to get the original function,
you just integrate the partial derivative as if other variables were constans.    
In this example,
\begin{alignat}{2}
\frac{\partial C}{\partial a} &=&& \frac{1}{(1-a)x} -y\frac{1}{a(1-a)x} \\
&=&& \frac{1}{(1-a)x} -\frac{x}{y} \left( \frac{1}{a-1} -\frac{1}{a} \right) \\ 
\therefore \quad C &=&&-\frac{1}{x} \log(a-1) + \frac{y}{x}\log(a-1) - \frac{y}{x}\log a +\phi(x,y) \\
&=&&-\frac{y-1}{x} \log(a-1) - \frac{y}{x}\log a +\phi(x,y)
\end{alignat}
where $\phi(x,y)$ is an arbitrary function of $x,\,y\,$.
A: Yes, it makes sense — but our modern calculus notation doesn't always make this clear. Let me try a variant notation to help.
Let's call $C$ a function of three variables $C(a,x,y)$. These variables are all independent. It makes sense to take partial derivatives with respect to any of these three arguments. We can call the partial derivatives $\partial_1 C$, $\partial_2 C$, $\partial_3 C$.
Now suppose we want to make some of these variables depend on each other. For example, we might want to make $a$ a function of $x$ --- so that $a = f(x)$. In this case, the independent variables will be $x$ and $y$, instead of $x$, $y$, and $a$.
We will need a function which explains how to convert our new independent variables into our old independent variables. In this case, the conversion function is:
$$T(x,y) = \langle f(x),\, x,\, y\rangle$$
And the updated version of $C$ is a new function:
$$C_\text{new} = C \circ T.$$
The definition here is just shorthand for saying that
$$C_{\text{new}}(x,y) = C(f(x), x, y).$$
Now, $C_\text{new}$ is, by design, a function with only two arguments. It makes sense to take partial derivatives with respect to either argument. We can call the partial derivatives $\partial_1 C_{\text{new}}$ and $\partial_2 C_{\text{new}}$.
In this new notation, the derivative you originally stated $\left(\frac{\partial C}{\partial a}\right)$ is now more clearly expressed as $\partial_1 C_{\text{new}}$. And you can easily evaluate this derivative using the chain rule, or integrate it.
