TITLE: Are there  functions satisfying the following integral  condition?
QUESTION [5 upvotes]: Can we find two functions $f$ and $g$ that are reasonably defined nontrivial(not everywhere zero, $f\neq g$, not linear polynomials) functions such that the following condition is satisfied?
$$ f( \left(\int_{0}^{t} g(x) \ \text{d}x\right))  = g( \left(\int_{0}^{t} f(x) \ \text{d}x\right)) $$
P.S.: I migrated this question from here on   Math.SE. I am sure this site hosts very knowledgeable mathematicians that keeping on migrating to another site is foolish. I felt a really good feeling for some time as nobody answered my question. But is usually the case that: "There is a general principle that a stupid man can ask such questions to which one hundred wise men would not be able to answer. In accordance with this principle I shall formulate some problems." Vladimir Arnold
Motivation:  The equation that I wrote out was not random. At least, the symmetry I find in it and the absence of an iota of clue at proceeding with any method makes me fall in love with finding a solution. Part of the motivation was to find a function that in some way resembles the exponential function. The exponential map is invariant under differentiation. So, the natural curiosity to find a nontrivial map invariant under integration. For obvious reasons, such map does not exist because of the presence of the constant of integration in indefinite integrals. Hence, I added an extra condition that would make the would-be function more nontrivial and more appealing.

REPLY [4 votes]: Following Igor's comment(or his hunch), I started out with finding polynomial counterexamples of the type: $f(x)= ax^n $ and  $ g(x)= bx^m $ on $(0,\infty)$. It is easy to see that such polynomials satisfy the integral condition only if $m=n$, and $a=b$ if $n$ is even or $a=\pm b$ if $n$ is odd. Then a class of counterexamples on $(0,\infty)$ can be constructed by letting $a= -b$ with odd $n\geq3$ .