Can someone explain why $\int_{0}^{1} g'(t)\big(-\int_{0}^{t} g ds \big) dt = \int_{0}^{1} g^2 dt$
I know this is quite trivial but I am not able to understand why. Maybe I am missing some fundamental property of integrals ( If so, can someone also provide a good reference to review them?).
Thank you very much