Represent a function as a difference of two convex function I know that if $f:\mathbb{R}\to\mathbb{R}$ is $C^2$ it can be rewrite as a difference of two convex function. I ask to you if there is someone who know if it's possible extend this property to the function which have $\mathbb{R}^n$ as domain.

It is possible, for example:
If $f \in C^2(D,\mathbb{R})$ and $D$ a non-empty, convex and compact subset of $\mathbb{R}^n$, then $f$ is a dc-function, i.e. the difference of two convex functions.
The proof can't be done the same way as in $\mathbb{R}$. Note that in this statement you need a compact subset.
Here is a reference (Sanjo's answer): https://math.stackexchange.com/a/843020/797553
For a proof use $g(x)=f(x) + \rho/2 \cdot x^Tx$ and $h(x)=\rho/2 \cdot x^Tx$, where $\rho=\left| ~min ~\{\lambda_{min}(Hessf(x)): x\in D\} ~\right|$. Then $f=g-h$. Note that $\rho$ only exists as $D$ is compact.
EDIT: For $D=\mathbb{R}^n$ the statement is still true. (see [Konno H., Thach P.T., Tuy H. (1997) D.C. Functions and D.C. Sets. In: Optimization on Low Rank Nonconvex Structures. Nonconvex Optimization and Its Applications, vol 15. Springer, Boston, MA]). In this book you'll also find a proof for the statement above.
