How do we take second order of total differential? This is the total differential 
$$df=dx\frac {\partial f}{\partial x}+dy\frac {\partial f}{\partial y}.$$
How do we take higher orders of total differential, $d^2 f=$?
Suppose I have $f(x,y)$ and I want the second order total differential $d^2f$?
 A: $d=dx\frac{\partial}{\partial x}+dy\frac{\partial}{\partial y}$ is a differential operator that when applied to $f$ gives $df=dx\frac{\partial f}{\partial x}+dy\frac{\partial f}{\partial y}$
$d^2=\left(dx\frac{\partial}{\partial x}+dy\frac{\partial}{\partial y}\right)\left(dx\frac{\partial}{\partial x}+dy\frac{\partial}{\partial y}\right)$
$d^2f=\left(dx\frac{\partial}{\partial x}+dy\frac{\partial}{\partial y}\right)\left(dx\frac{\partial}{\partial x}+dy\frac{\partial}{\partial y}\right)f=\left(dx^2\frac{\partial^2}{\partial x^2}+dy^2\frac{\partial^2}{\partial y^2}+2dx dy\frac{\partial^2}{\partial x\partial y}\right)f=dx^2\frac{\partial^2 f}{\partial x^2}+dy^2\frac{\partial^2 f}{\partial y^2}+2dx dy\frac{\partial^2 f}{\partial x\partial y}$
A: I will assume that you are referring to the Fréchet derivative. If $U\subseteq\mathbb{R}^n$ is an open set and we have functions $\omega_{j_1,\dots,j_p}:U\to\mathbb{R}$, then $$
D\left(\sum_{j_1,\dots,j_p} \omega_{j_1,\dots,j_p} dx_{j_1}\otimes\cdots\otimes dx_{j_p}\right) = \sum_{j_1,\dots,j_p}\sum_{j=1}^n \frac{\partial\omega_{j_1,\dots,j_p}}{\partial x_{j}} dx_j\otimes dx_{j_1}\otimes\cdots\otimes dx_{j_p}.
$$
Here $dx_{i}$ is the projection onto the $i$th coordinate, and if $\alpha,\beta$ are multilinear forms then $\alpha\otimes\beta$ is the multilinear form defined by $(\alpha\otimes\beta)(x,y)=\alpha(x)\beta(y)$.
For example, let $f(x,y)=x^3+x^2 y^2+y^3$. Then \begin{align}
Df&=(3x^2+2xy^2)dx+(2x^2y+3y^2)dy; \\
D^2f&=(6x+2y^2)dx\otimes dx+4xy(dx\otimes dy+dy\otimes dx)+(2x^2+6y)dy\otimes dy; \\
D^3f&=6dx\otimes dx\otimes dx+4y(dx\otimes dx\otimes dy+dx\otimes dy\otimes dx+dy\otimes dx\otimes dx)\\
&\qquad+4x(dx\otimes dy\otimes dy+dy\otimes dx\otimes dy+dy\otimes dy\otimes dx) \\
&\qquad+6dy\otimes dy\otimes dy.
\end{align}
Since $D^p f(x)$ is always a symmetric multilinear map if $f$ is of class $C^p$, you might want to simplify the above by using the symmetric product (of tensors).
A: Edit: I interpret your $d^2 f$ as $d^2f=d(df)$.
If $f$ is $C^2(\Omega)$, with $(x,y)\in\Omega$, then
$$d(df)=dy\wedge dx \frac{\partial^2 f}{\partial y\partial x}+dx\wedge dy 
\frac{\partial^2 f}{\partial x\partial y}=\left(\frac{\partial^2 f}{\partial x\partial y}- \frac{\partial^2 f}{\partial y\partial x} \right)dx\wedge dy=0,$$
as $dx \wedge dy=-dy\wedge dx$ and $\frac{\partial^2 f}{\partial x\partial y}= \frac{\partial^2 f}{\partial y\partial x}$ on $\Omega$.
If $f$ is not $C^2$ at $(x,y)$, then we arrive at
$$d(df)=\left(\frac{\partial^2 f}{\partial x\partial y}- \frac{\partial^2 f}{\partial y\partial x} \right)dx\wedge dy. $$
