Math people:
This will probably be easy for someone out there. I have functions $u \in C^\infty([0,1])$, $f \in L^1([0,1])$, and $h(t) = \int_0^t f(s)\,ds$. Then $h \in W^{1,1}([0,1])$, right? I'd like to use integration by parts to conclude
$$ \int_0^1 u(t) \frac{d}{dt}(h(t)^2)\,dt = u(t)(h(t))^2|^1_0-\int_0^1 u'(t)(h(t))^2\,dt. $$
Is this valid? I apologize if this is a duplicate. I searched for similar questions and couldn't find one.
To answer your first question: Yes, $h \in W^{1,1}(0,1)$ and $h' = f$.
In order to answer questions similar to your second one, density arguments will do a good job: