TITLE: How many n-th Order Partial Derivatives Exist for a Function of k Variables?
QUESTION [6 upvotes]: Example: 
Let's say for example I have a function, $f$, of $2$ variables :
$f(x,y)$
For this function there exits $2$ first-order partial derivatives namely:
$f_x = \frac{\partial f}{\partial x}$
$f_y = \frac{\partial f}{\partial y}$
Then if we are to differentiate further we will find that there are $4$ computable second-order partial derivatives.
$f_{xx} = \frac{\partial^2 f}{\partial x^2}$
$f_{xy} = \frac{\partial^2 f}{{\partial x} {\partial y}}$
$f_{yy} = \frac{\partial^2 f}{\partial y^2}$
$f_{yx} = \frac{\partial^2 f}{{\partial y} {\partial x}}$
However due to the Equality of Mixed Partials (https://en.wikipedia.org/wiki/Symmetry_of_second_derivatives), two of those second-order partial derivatives are equivalent, $f_{xy} = f_{yx}$, and thus we are left with $3$ second-order partial derivatives for a function of 2 variables.
$f_{xx} = \frac{\partial^2 f}{\partial x^2}$
$f_{xy} = \frac{\partial^2 f}{{\partial x} {\partial y}} \Leftrightarrow  f_{yx} = \frac{\partial^2 f}{{\partial y} {\partial x}}$
$f_{yy} = \frac{\partial^2 f}{\partial y^2}$
Question: Given a function of k variables:
$f(x_1 , x_2,x_3,\dots,x_{k-1},x_k)$
Is there a formula to find the number of $n^{th}$-order partial derivatives, (where $n$ is the order of the partial derivative), for a function of $k$ variables?
For example where $n=1$ (i.e. the first-order derivatives), there would be $k$ partial derivatives, just as in the example above, for a function of $2$ variables there exists $2$ first-order derivatives.

REPLY [4 votes]: In the noncommutative case (I know you weren't asking for it, but I will include it for the sake of completeness), the process of generating the sum of all the derivatives  is nothing but the successive application of the differential operator
$$\left(\frac{\partial}{\partial x_1}+...+\frac{\partial}{\partial x_k}\right)$$
For instance, if $k=2$
$$\left(\frac{\partial}{\partial x}+\frac{\partial}{\partial y}\right)f=\frac{\partial f}{\partial x}+\frac{\partial f}{\partial y}$$
I will develop an example with $k=3$. One good way of calcualting all the derivatives is to draw a table. In the first column I write the operators. In the first row, I write all the functions to which the operators shall be applied. The entries of the table are the results of applying the corresponding operator to the functions. Let's say then that $f=f(x,y,z)$. The process of obtaining all the first order partial derivatives of $f$ could be described by
\begin{array}{cc}
 & f\\
\frac{\partial}{\partial x} & \frac{\partial f}{\partial x}\\
\frac{\partial}{\partial y} & \frac{\partial f}{\partial y}\\
\frac{\partial}{\partial z} & \frac{\partial f}{\partial z}
\end{array}
To get all the second order derivatives, we just use all the entries of this table as the target functions of another table, say
\begin{array}{cccc}
 & \frac{\partial f}{\partial x} & \frac{\partial f}{\partial y} & \frac{\partial f}{\partial z}\\
\frac{\partial}{\partial x} & \frac{\partial^{2}f}{\partial x^{2}} & \frac{\partial^{2}f}{\partial x\partial y} & \frac{\partial^{2}f}{\partial x\partial z}\\
\frac{\partial}{\partial y} & \frac{\partial^{2}f}{\partial y\partial x} & \frac{\partial^{2}f}{\partial y^{2}} & \frac{\partial^{2}f}{\partial y\partial z}\\
\frac{\partial}{\partial z} & \frac{\partial^{2}f}{\partial z\partial x} & \frac{\partial^{2}f}{\partial z\partial y} & \frac{\partial^{2}f}{\partial z^{2}}
\end{array}
The third order derivatives 
\begin{array}{cccccccccc}
 & \frac{\partial^{2}f}{\partial x^{2}} & \frac{\partial^{2}f}{\partial x\partial y} & \frac{\partial^{2}f}{\partial x\partial z} & \frac{\partial^{2}f}{\partial y\partial x} & \frac{\partial^{2}f}{\partial y^{2}} & \frac{\partial^{2}f}{\partial y\partial z} & \frac{\partial^{2}f}{\partial z\partial x} & \frac{\partial^{2}f}{\partial z\partial y} & \frac{\partial^{2}f}{\partial z^{2}}\\
\frac{\partial}{\partial x} & \frac{\partial^{3}f}{\partial x^{3}} & \frac{\partial^{3}f}{\partial x^{2}\partial y} & \frac{\partial^{3}f}{\partial x^{2}\partial z} & \frac{\partial^{3}f}{\partial x\partial y\partial x} & \frac{\partial^{3}f}{\partial x\partial y^{2}} & \frac{\partial^{3}f}{\partial x\partial y\partial z} & \frac{\partial^{3}f}{\partial x\partial z\partial x} & \frac{\partial^{3}f}{\partial x\partial z\partial y} & \frac{\partial^{3}f}{\partial x\partial z^{2}}\\
\frac{\partial}{\partial y} & \frac{\partial^{3}f}{\partial y\partial x^{2}} & \frac{\partial^{3}f}{\partial y\partial x\partial y} & \frac{\partial^{3}f}{\partial y\partial x\partial z} & \frac{\partial^{3}f}{\partial y^{2}\partial x} & \frac{\partial^{3}f}{\partial y^{3}} & \frac{\partial^{3}f}{\partial y^{2}\partial z} & \frac{\partial^{3}f}{\partial y\partial z\partial x} & \frac{\partial^{3}f}{\partial y\partial z\partial y} & \frac{\partial^{3}f}{\partial y\partial z^{2}}\\
\frac{\partial}{\partial z} & \frac{\partial^{3}f}{\partial z\partial x^{2}} & \frac{\partial^{3}f}{\partial z\partial x\partial y} & \frac{\partial^{3}f}{\partial z\partial x\partial z} & \frac{\partial^{3}f}{\partial z\partial y\partial x} & \frac{\partial^{3}f}{\partial z\partial y^{2}} & \frac{\partial^{3}f}{\partial z\partial y\partial z} & \frac{\partial^{3}f}{\partial z^{2}\partial x} & \frac{\partial^{3}f}{\partial z^{2}\partial y} & \frac{\partial^{3}f}{\partial z^{3}}
\end{array}
You can see that the sum of all third order derivatives, given in this case by
$$\left(\frac{\partial}{\partial x}+\frac{\partial}{\partial y}+\frac{\partial}{\partial z}\right)^{3}f$$
Can be calculated simply by summing the entries of this third order table. It's obvious how this can be used for a function of $k$ variables. In each step the table will have $k\times(number\: of\: input\: functions)$ resulting derivatives. Starting with just $f$ as input function, you will have $k^n$ $n^{th}$ order derivatives.
In the fully commutative case, on the other hand, I agree with Joriki. As he said, the procedure is explained in Stars and Bars and Multisets-Counting Multisets. And the result is 
$$N_{PD}=\left(\left(\begin{array}{c}
k\\
n
\end{array}\right)\right)=\left(\begin{array}{c}
k+n-1\\
n
\end{array}\right)=\left(\begin{array}{c}
k+n-1\\
k-1
\end{array}\right)$$
Where $\left(\left(\begin{array}{c}
k\\
n
\end{array}\right)\right)$ is the multiset counting number.