When does it hold that $\int_{0}^{x} fg=\left(\int_{0}^{x} f\right)\left(\int_0^x g\right)$ I was wondering when it held that
$$\int\limits_0^x fg=\left(\int\limits_0^xf\right)\left(\int\limits_0^xg\right)$$

Let
$$P:= x \mapsto \int\limits_0^x fg$$
$$F:=  x \mapsto \int\limits_0^x f$$
$$G:= x \mapsto \int\limits_0^x g$$
The equality becomes $$P=FG$$

Obviously $f\equiv 0$ or $g\equiv 0$ are solutions.
But are there other solutions?

If you search for solutions of the form
$$f(x)=\sum_{n=0}^{+\infty} a_nx^n$$
$$g(x)=\sum_{n=0}^{+\infty} b_nx^n$$
You get
$$fg(x)=\sum_{n=0}^{+\infty} c_nx^n$$
$$P(x)=\sum_{n=0}^{+\infty}C_nx^n$$
$$F=\sum_{n=0}^{+\infty} A_n x^n$$
$$G=\sum_{n=0}^{+\infty} B_n x^n$$
$$FG(x)=\sum_{n=0}^{+\infty} D_n x^n$$
where
$$\forall n \in \Bbb N, c_n=\sum_{k=0}^na_kb_{n-k}$$
$$\forall n \in \Bbb N^*, C_{n} = \cfrac{c_{n-1}}{n} = \cfrac{1}{n}\left(\sum_{k=0}^{n-1}a_kb_{n-k-1}\right)\text{ and } C_0 = 0$$
$$\forall n \in \Bbb N^*, A_{n} = \cfrac{a_{n-1}}{n}\text{ and } A_0 = 0$$
$$\forall n \in \Bbb N^*, B_{n} = \cfrac{b_{n-1}}{n}\text{ and } B_0 = 0$$
$$\forall n \in \Bbb N, D_{n} = \sum_{k=0}^nA_kB_{n-k}=\sum_{k=1}^{n-1}A_kB_{n-k}=\sum_{k=1}^{n-1}\cfrac{a_{k-1}}{k}\cfrac{b_{n-k-1}}{n-k}$$
And the equality becomes
$$\forall n \in \Bbb N, C_n=D_n$$
We always have that $$C_0=0=D_0$$
But we also have $$0=D_1=C_1=a_0b_0$$. Since the problem is symmetric in $f$ and $g$ and hence in $a_n$ and $b_n$, we can assume WLOG that $a_0=0$.
Which gives $$C_{n} = \cfrac{1}{n}\left(\sum_{k=1}^{n-1}a_kb_{n-k-1}\right)$$
So then the equality becomes
$$\forall n\in \Bbb N, \cfrac{1}{n}\left(\sum_{k=1}^{n-1}a_kb_{n-k-1}\right)=\sum_{k=1}^{n-1}\cfrac{a_{k-1}}{k}\cfrac{b_{n-k-1}}{n-k}$$
And then I'm not sure what I should do...
And I'd also like to know if there are solutions that aren't of this form.
Thank you in advance for your answers.
 A: For analytic functions, as Ma Ming has pointed out, only the trivial solution is possible. However, there are other functions that work to solve the problem, such as ones based around requiring that, at any point, one of the two integrals on the left must be zero. As such, this pair of continuous functions will satisfy the integral relation:
$$
f(x)=\begin{cases}\sin(x)&0<x<2\pi\\0&\text{otherwise}\end{cases}\\
g(x)=\begin{cases}x-2\pi&x>2\pi\\0&\text{otherwise}\end{cases}
$$
This works because $f(x)g(x)=0$ and, for $x\leq2$, $\int_0^x g(x)dx = 0$ and $\int_0^x f(x)g(x)dx = 0$, while for $x>2$, $\int_0^x f(x)dx = 0$ and $\int_0^x f(x)g(x)dx = 0$.
EDIT: Indeed, one can construct everywhere-smooth functions that satisfy the integral relation. Consider the function:
$$
k(x)=\begin{cases}e^{-\frac{1}{x(1-x)}}&0<x<1\\0&\text{otherwise}\end{cases}
$$
Now, $k(x)$ is everywhere-smooth, infinitely-differentiable at every point. We can use this function to construct some interesting functions satisfying the integral relation. The first thing to note is that
$$
\int_0^2 k(x-1)-k(x)dx=0
$$
Now, if we let $\bar x = x-4\lfloor x/4\rfloor$, and take
$$
f(x)=\left[k(\bar x-1)-k(\bar x)\right]\times A\\
g(x)=\left[k(\bar x-3)-k(\bar x-2)\right]\times B
$$
where $A$ and $B$ are constants, then we have two smooth functions, neither of which is zero on an interval larger than 2, that satisfy the integral relation. More complicated smooth functions can also be created on this basis.
A: Differentiating we get $fg=Fg+Gf$, or $ Fg=f(g-G)=F'(g-G)$, or $\frac{F'}{F}=\frac{g}{g-G}$, so 
$$F=\pm C\exp \int \frac{g}{g-G}.$$
Now insert possible $G$ to see what happens really. As the comment below pointed, $F(0)=0$, so $C=0$, there is no non-trivial solution...
