I'm interested to find the solution to the following variational problem:
$$ J[y]=\int_{T=0}^{\infty}\int_{t=0}^{T}L(t,y(t),y'(t))p(T)dtdT $$
where $p(T)$ is a probability distribution function over $T$ ($T$ is greater than zero).
My question is what are the conditions for $y$ that will minimise $J[y]$.
Hints:
Use Fubini's theorem to argue that under pertinent assumptions, the functional takes the form $$\tag{1} J[y] ~=~ \int_0^{\infty}\! dt ~L~P, \qquad P(t)~:=~\int_t^{\infty}\! dT ~p(T). $$
Moreover, to have a well-defined variational problem, one should impose pertinent boundary conditions (BCs), e.g. Dirichlet BCs $y(0)=a$ and $\lim_{t\to \infty}y(t)=b$.
The condition for a stationary configuration $t\mapsto y(t)$ is given by the corresponding Euler-Lagrange (EL) equation $$\tag{2} P \frac{\partial L}{\partial y}~=~\frac{d}{dt}\left(P\frac{\partial L}{\partial y^{\prime}}\right). $$