I have the following integral:
$\int_{0}^{t} f(t-\tau)g(\tau)d\tau\:g(t)$
The function $f(t)$ is known and $g(t)=C+\frac{1}{2}q(t)^2$, where C is some constant.
I want to differentiate the whole expression with respect to $q(t)$, but I am unsure how to exactly proceed since there is a $q(\tau)$ inside the integral.
Any hint on how to deal with this is much appreciated.
I think the way to go about it is to just solve for $\frac{dh(t,\tau)}{dt} = \frac{d}{dt}\int_{0}^{t} f(t-\tau)g(\tau)d\tau\:g(t)$, then if you can specify $q(t)$ and find the implicit equation for $\frac{dt}{dq}$ we can obtain the derivative with respect to $q$.
To take the actual derivative, it's probably best to use the Leibniz Integral Rule.
Using that formula, I get:
\begin{equation} \begin{split} \frac{d}{dt} \int_{0}^{t} f(t-\tau)g(\tau)d\tau\:g(t) & = g(t)[f(0)g(t)+\int_0^t f'(t-\tau)g(\tau)d\tau] + g'(t)\int_0^tf(t-\tau)g(\tau)d\tau \end{split} \end{equation}
Now if you have a form for $q(t)$ we can find $\frac{dt}{dq}$, and multiply:
\begin{equation} \frac{dh(t,\tau)}{dq} = \frac{dh(t,\tau)}{dt}\frac{dt}{dq} \end{equation}