Some key things to remember about partial derivatives are:
- You need to have a function of one or more variables.
- You need to be very clear about what that function is.
- You can only take partial derivatives of that function with respect to each of the variables it is a function of.
So for your Example 1, $z = xa + x$, if what you mean by this to define $z$
as a function of two variables,
$$z = f(x, a) = xa + x,$$
then $\frac{\partial z}{\partial x} = a + 1$ and
$\frac{dz}{dx} = a + 1 + x\frac{da}{dx},$ as you surmised,
though you could also have gotten that last result by considering $a$ as a
function of $x$ and applying the Chain Rule.
But when we write something like
$y = ax^2 + bx + c,$ and we say explicitly that $a$, $b$, and $c$ are
(possibly arbitrary) constants, $y$ is really only a function of one variable:
$$y = g(x) = ax^2 + bx + c.$$
Sure, you can say that $\frac{\partial y}{\partial x}$ is what happens
when you vary $x$ while holding $a$, $b$, and $c$ constant, but that's
about as meaningful as saying you vary $x$ while holding the number $3$ constant.
I suppose technically $\frac{\partial y}{\partial x}$
is defined even if $y$ is a single-variable function of $x$,
but it would then just be $\frac{dy}{dx}$ (the ordinary derivative),
and I can't remember seeing such a thing ever written as a partial derivative.
It would not make it possible to do anything you cannot do with
the ordinary derivative, and it might confuse people (who might try to
guess what other variables $y$ is a function of).
The previous paragraph implies that the answer to your Example 3 is "yes."
It also hints at why I almost wrote "a function of two or more variables"
as part of the first requirement for using partial derivatives.
Technically I think you only need a function of one or more variables,
but you should want a function of at least two variables before you
think about taking partial derivatives.
For Example 2, where we have $x^2 + y^2 = 1$, it is not obvious
what the function is that we would be taking partial derivatives of.
Either $x$ or $y$ could be a function of the other.
(The function would be defined only over a limited domain,
and would produce only some of the points that satisfy the equation, but
it can still be useful to do some analysis under those conditions.)
If you write something besides the equation to make it clear that
(say) $y$ is a function of $x$, giving a sufficiently clear idea which
of the possible functions of $x$ you mean, then I think technically you
could write $\frac{\partial y}{\partial x}$, and you might even find that
$\frac{\partial y}{\partial x} = 2x$, but again this is a lot of trouble
and confusion to get a result you could get simply by using
ordinary derivatives.
On the other hand, suppose we say that
$$h(x,y) = x^2 + y^2 - 1,$$
and we are interested in the points that satisfy $x^2 + y^2 = 1$,
that is, where $h(x,y) = 0$.
Now we have a function of multiple variables, so we can do interesting
things with partial derivatives,
such as compute $\frac{\partial h}{\partial x}$ and
$\frac{\partial h}{\partial y}$ and perhaps use these to look for trajectories
in the $x,y$ plane along which $h$ is constant.
OK, we don't really need partial derivatives to figure out that
those trajectories will run along circular arcs, but we could have
some other two-variable function where the answer is not so obvious.
Let's consider the partial derivative of $an^2$ with respect to the variable $n_{i_0}$.
\begin{align*}
\frac{\partial\left(an^2\right)}{\partial n_{i_0}}
=\frac{\partial}{\partial n_{i_0}}\sum_{i}\sum_{j}n_in_j(1-k_{ij})\sqrt{a_ia_j}\tag{1}
\end{align*}
Note: We should avoid using the same variable name for different purposes. Since $i$ is used as bounded index variable on the RHS, we should not use $n_i$ as variable for the partial derivative on the LHS.
In order to calculate the partial derivative of double sums we have to do some bookkeeping by explicitely considering the parts of the double sum where the indices $i,j$ are equal with $i_0$.
Using for convenience the shorthand $A_{i,j}:=(1-k_{i,j})\sqrt{a_ia_j}$, we obtain from (1)
\begin{align*}
\frac{\partial\left(an^2\right)}{\partial n_{i_0}}&=\frac{\partial}{\partial n_{i_0}}\sum_{i}\sum_{j}A_{i,j}n_in_j\\
&=\frac{\partial}{\partial n_{i_0}}\sum_{i\neq i_0}\sum_{j\neq j_0}A_{i,j}n_in_j
+\frac{\partial}{\partial n_{i_0}}\sum_{i= i_0}\sum_{j= i_0}A_{i,j}n_{i}n_{j}\\
&\qquad+\frac{\partial}{\partial n_{i_0}}\sum_{i= i_0}\sum_{j\neq i_0}A_{{i},j}n_in_j
+\frac{\partial}{\partial n_{i_0}}\sum_{i\neq i_0}\sum_{j= i_0}A_{i,j}n_{i}n_{j}\tag{1}\\
&=\frac{\partial}{\partial n_{i_0}}\sum_{i\neq i_0}\sum_{j\neq i_0}A_{i,j}n_in_j
+\frac{\partial}{\partial n_{i_0}}A_{i_0,i_0}n_{i_0}^2\\
&\qquad+\frac{\partial}{\partial n_{i_0}}\sum_{j\neq i_0}A_{{i_0},j}n_{i_0}n_j
+\frac{\partial}{\partial n_{i_0}}\sum_{i\neq i_0}A_{i,{i_0}}n_{i}n_{i_0}\tag{2}\\
&=0+2A_{i_0,i_0}n_{i_0}+\sum_{j\neq i_0}A_{{i_0},j}n_j+\sum_{i\neq i_0}A_{i,{i_0}}n_{i}\tag{3}\\
&=\sum_{j}\left(A_{i_0,j}+A_{j,i_0}\right)n_j\tag{4}\\
\end{align*}
Comment:
In (1) we split the double sum in portions according to $i_0$ equal to $i,j$ resp. not equal to $i,j$.
In (2) we do some simplification. In fact (1) is only written for demonstration and we could start the apportionment with (2) instead.
In (3) we do the partial differentiation and rearrange the terms in (4)
If we substitute for $A_{i,j}$ back we obtain finally
\begin{align*}
\sum_{j}&\left(A_{i_0,j}+A_{j,i_0}\right)n_j\\
&=\sum_{j}\left((1-k_{i_0,j})\sqrt{a_{i_0}a_j}+(1-k_{j,i_0})\sqrt{a_ja_{i_0}}\right)n_j\\
&=\sqrt{a_{i_0}}\sum_{j}\left(2-k_{i_0,j}-k_{j,i_0}\right)n_j\sqrt{a_j}\tag{5}
\end{align*}
Note: If $k_{i,j}=0$ for all $i,j$ we obtain from (5) in accordance with OPs example
\begin{align*}
2\sqrt{a_{i_0}}\sum_{j}n_j\sqrt{a_j}
\end{align*}
Best Answer
You can try to find $\partial P / \partial T$ and $\partial P / \partial V$ such that: $$\frac{\frac{\partial P}{\partial T}}{\frac{\partial P}{\partial V}}=\frac{\partial V}{\partial T}$$
I hope this will help you