Can every function be written as a total derivative? This is motivated by a question in the Physics SE, but it's a math question not a physical one. For every function $G(x, t)$, can the function be written as a total derivative (wrt $t$) of some other function $F(x, t)$?
A simple counterexample would be fine; hopefully that would be simpler for a poor physicist to understand! A general proof/disproof would be great too.
If it would be easier to take a concrete example, if $G(x, t)$ is $x^2$ can this be written as a total derivative wrt $t$ of some function $F(x, t)$?
 A: No, not every function is the derivative of another function.  Differentiability places a lot of constraints on functions.  The one that jumps to mind is that all differentiable functions are the pointwise limits of continuous functions, which implies (by the Baire category theorem) that they must be continuous except on a meager set.  For our purposes let's just say that meager means what it intuitively means.  To construct a counterexample from this take whatever your favorite highly discontinuous function is and use that (mine is the indicator function of the rationals, which is nowhere continuous).  I'll think about whether I can come up with a characterization for "nice" initial conditions.
A: Perhaps you can do the following thing: Based on your question and comments to Chris' answer it seems like you want to assume that $x = x(t)$ is a differentiable function of $t$. Then write $g(t) = G(x(t), t)$, a differentiable function of $t$. Define $$F(x,t)  = \int_0^t g(s) ds$$ and then from the fundamental theorem of calculus and the fact that $F(x,t)$ does not depend on $x$ you get $$\frac{dF}{dt} = g(t) = G(x(t),t) = G(x,t)$$
A: This question needs interpretation: For functions $F,G$ of two variables and a function $x$ of one variable (this already has various interpretations that do not matter too much for this question; we just assume them to be smooth and the domains of definition to be $\mathbb{R}^2$ and $\mathbb{R}$ respectively) you would like to have
$$\frac{\partial F}{\partial x}(x(t),t) x'(t) + \frac{\partial F}{\partial t}(x(t),t) = G(x(t),t)$$
for all $t$. $G$ is given and $F$ is to be found, but the big question is: is $x$ given or should the same $F$ work for all $x$?
In the first case it is easy to find an $F$; just let $F$ only depend on $t$ and integrate $G(x(t),t)$ (see treble's answer). The second case is more complicated, but it turns out such an $F$ only exists in the trivial case $\partial G/\partial x=0$, that is, $G$ does not depend on $x$.
A: Any reasonable function $G:\ (x,t)\mapsto G(x,t)$ is the derivative with respect to $t$ of another function $F:\ (x,t)\mapsto F(x,t)$. If $(x_0,t_0)$ is a point in the domain of $G$ there is a neighborhood $U$ of this point such that
$$F(x,t):=\int_{t_0}^t G(x,t')\ dt'\qquad\bigl((x,t)\in U\bigr)$$
is such a function.
It is another matter if you are given, explicitly or via some extra condition like a differential equation $\dot x=H(x,t)$, a function $t\mapsto x(t)$, and you are really interested in the function $\phi(t):=G\bigl(x(t),t\bigr)$. This function $t\mapsto\phi(t)$ will then be the derivative of some function $t\mapsto\Phi(t)$ which will of course depend  on this extra condition. But there is no such thing as a "total derivative" of a "naked" function $(x,t)\mapsto F(x,t)$ with respect to $t$. 
