I am solving a variational calculus problem, in which the functional is in the form of: $$ J[p(t),\lambda]=\int_a^b\left(t^2\cdot p^2(t)+t^2\int_0^t p^3(\tau)\cdot g(\tau)d\tau -{\lambda}\cdot{p(t)}\right)dt $$ So the Lagrangian function in in the following form (Lagrangian itself includes an integral!!) $$ L = t^2\cdot p^2(t)+t^2\int_0^t p^3(\tau)\cdot g(\tau)d\tau -{\lambda}\cdot{p(t)} $$ Now I'm confused, how can I use Euler-Lagrange equation for solving this problem. In other words how can I integrate $\int_0^t p^3(\tau)\cdot g(\tau)d\tau$ with respect to $p(t)$? I think a partial derivative method can be used, but I can't find the right answer.
Thanks in advance