Let $f, g : \mathbb{R} \to \mathbb{R}$ be compactly supported smooth functions. Especially, let us suppose that their supports are both contained in $[0,\infty)$.
Then, I see that we may write their convolution as \begin{equation} (f*g)(x)=\int_{-\infty}^\infty f(y)g(x-y)dy=\int^x_0 f(y)g(x-y)dy \end{equation}
Now, it is well-known that $(f*g)'=f'*g=f*g'$. However, according to the far right-hand side of the above definition for $(f*g)(x)$ the domain of integration itself contains $x$.
So, I think we have to apply the Leibniz rule for integrals to take $\int^x_0$ into account.
However, the middle formula $\int_{-\infty}^\infty f(y)g(x-y)dy$ does NOT contain any $x$ in the doamin of integration.
This is quite confusing for me....Could anyone please clarfiy?
Applying the Leibniz formula to the integral $\int_{-\infty}^\infty f(y)g(x-y)dy$ gives:
$$ \int_{-\infty}^{\infty}f(y)g'(x-y)dy$$
This can be rewritten as follows: $$\begin{align*} \int_{-\infty}^{\infty}f(y)g'(x-y)dy&=\lim_{t\to\infty}\int_{-t}^{t}f(y)g'(x-y)dy\\ &=\lim_{t\to\infty}\int_{0}^{t}f(y)g'(x-y)dy\qquad \text{(since $f(y)=0$ for $y\leq 0$)}\\ &=\int_{0}^{x}f(y)g'(x-y)dy+\lim_{t\to\infty}\int_{x}^{t}f(y)g'(x-y)dy \end{align*}$$
And, using integration by parts, we have for $t>x$:
$$\begin{align*}\int_{x}^{t}f(y)g'(x-y)dy&=[-f(y)g(x-y)]_x^t+\int_{x}^{t}f'(y)g(x-y)dy\\ &=f(x)g(0)-f(t)g(x-t)+\int_{x}^{t}f'(y)g(x-y)dy\\ &=f(x)g(0)\qquad \text{(since $g(s)=0$ for $s<0$)} \end{align*}$$
Thus we get
$$\begin{align*} \int_{-\infty}^{\infty}f(y)g'(x-y)dy=\int_{0}^{x}f(y)g'(x-y)dy+f(x)g(0) \end{align*}$$
Applying the Leibniz formula to the integral $\int^x_0 f(y)g(x-y)dy$ gives the same expression:
$$f(x)g(0)+\int_0^xf(y)g'(x-y)dy$$