TITLE: A question on the integral of Hilbert valued functions
QUESTION [20 upvotes]: This questions stems from an attempt to recast in a form suitable for teaching some standard computations which are usually proved by handwaving, without much care about the details. My hope is that some expert in this area is hanging around and can give me an immediate answer off the top of their head...
A function $f:I\to H$ from an interval of the reals into a Hilbert space is said to be scalarly integrable if $(f(t),x)$ is in $L^1(I)$ for all $x\in H$. This is sufficient to guarantee that for every measurable subset $E$ of $I$  one can find an $x_E\in H$ with the property $(x_E,x)=\int_E(f(t),x)dt$ for all $x\in H$. The vector $x_E$ is called the Pettis integral of $f$ over $E$. Now if $T:H\to K$ is a bounded map from $H$ to a second Hilbert space $K$, also $Tf$ is Pettis integrable and $T\int_E f=\int_E Tf$. This is quite easy to prove. I need the same property for any closed unbounded operator $T$. This kind of property is well known for stronger notions of integral (for the Bochner integral this is due to Hille), but I guess it is false in such generality for the Pettis integral.
Now my question: assume I know that $f:I\to H$ is scalarly integrable, thus has a Pettis integral, moreover it takes values into the domain $D(T)$, and  the integrals $\int_E f$ are all contained in $D(T)$. Can I conclude that $Tf$ has a Pettis integral and $T\int_I f=\int_I Tf$?
EDIT: after an excellent series of posts, it seems that the question is almost settled, in the following sense. Assume in addition that $D(T)$ is dense and that $H$ is separable (or the interval $I$ is replaced by a discrete measure space). Then the result is true. This covers all the relevant applications, where the Hilbert spaces are some $L^2(R^n)$ and $T$ is a closed, densely defined operator like a differential operator possibly with variable coefficients.
I think Bill, Gerald and fedja should wrap up their arguments in a short paper, this can be useful to other people, and the mathematics is not trivial. On the other hand, I do not know which posts should be checked as answer; the final word is Gerald's but Bill's key argument on finite sums is quite cool. Tell me what to do :)

REPLY [4 votes]: This is some kind of wrap-up of what has already been said. I quite carefully checked all the details involved here, and concluded that the following holds.
Theorem A. Let $\mu$ be a $\sigma$−finite measure on $\Omega$, and let $T:H\supseteq D\to H_1$ be a closed linear operator of real or complex Hilbert spaces with $H$ separable. Let $f:\Omega\to D$ be a function such that $(f;\mu,H)$ is Pettis with $^{\rm Pettis}H$−$\int_Af{\rm d}\mu\in D$ for all $A\in {\rm dom\ }\mu$. Then also $(T\circ f;\mu,H_1)$ is Pettis with $^{\rm Pettis}H_1$−$\int_\Omega T\circ f{\rm d}\mu=T\big({}^{\rm Pettis}H$−$\int_\Omega f{\rm d}\mu\big)$.
The "measure−vector" map $(f;\mu,H)=(f,(\mu,H))$ being Pettis means that for every $A\in{\rm dom\ }\mu$ there is $x\in H$ such that for all continuous linear $u:H\to\boldsymbol K$ the scalar map $(u\circ f;\mu,\boldsymbol K)$ is integrable with $u(x)=\int_Au\circ f{\rm d}\mu$. Here $\boldsymbol K$ is either the standard real or complex topological field and $H$ might be any Hausdorff locally convex space over $\boldsymbol K$. The $x$ when existing is unique, and I then write $x={}^{\rm Pettis}H$−$\int_Af{\rm d}\mu$.
Note that scalar integrability of $(f;\mu,H)$ is a sufficient condition for its being Pettis when $H$ is a reflexive Banach space, in particular, when it is Hilbert. For aesthetical reasons, I did not include this in the formulation of Theorem A above.
To handle the $\sigma$-finite case, one proceeds similarly as in Gerald Edgar's answer but in place of the sets $J_k$ takes the sets $\Omega_{i_k}\cap J_{j_k}$ where $k\mapsto(i_k,j_k)$ is some bijection $\mathbb N\to\mathbb N\times\mathbb N$ , and $\langle\Omega_i:i\in\mathbb N\rangle$ is a measurable partition of $\Omega$ into sets of finite measure.
If I were to write a decent proof of Theorem A, I would divide the proof into a sequence of lemmas e.g. as follows.
First reformulate the problem as follows. Let $H_2$ be the Hilbert space with $D$ as its underlying set and structured so that $[{\rm id},T]:x\mapsto(x,Tx)$ becomes linear and isometric $H_2\to H\times H_1$. So the inner product for $H_2$ is $\varphi_2=\varphi+\varphi_1\circ[T,T]$ when $\varphi,\varphi_1$ are the ones for $H,H_1$, respectively. Let $S$ be the subset of the dual of $H_2$ formed be the linear forms of the form $x\mapsto\varphi(x,y)$ for some $y\in H$. Putting $ E = (H_2)_\sigma(S)$, i.e. the vector space $H_2$ equipped with the weak topology giving the dual $S$, we then assume that $(f;\mu,E)$ is Pettis, and ask whether also $(f;\mu,H_2)$ is such. If it is, it trivially follows that so is $(T\circ f;\mu,H_1)$ since $T:H_2\to H_1$ is a continous linear map.
Lemma 1. In the above setting $S$ is dense in $(H_2)'_\beta$ .
Lemma 2. In the above setting $(f;\mu,H_2)$ is scalarly measurable.
Lemma 3. In the above setting $H_2$ is separable.
Lemma 4. Let $E$ be a Hausdorff locally convex space and let $K$ be compact in $E_\sigma$. Let the non-empty family $\boldsymbol x:I\to E$ be such that $\sum_B\boldsymbol x\in K$ for all non-empty finite $B\subseteq I$. Then $\boldsymbol x$ is summable in $E_\sigma$ with $E_\sigma$−$\sum\boldsymbol x\in K$.
Lemma 5. Let $F$ be a reflexive Banach space with $S$ a dense vector subspace in $F'_\beta$. Let $\boldsymbol x=\langle x_i:i\in\mathbb N_0\rangle$ be a sequence in $F$ such that $\sum_{i\in\mathbb N_0}|u(x_i)|$ is finite, for all $u\in S$. Assume that for every $B\subseteq\mathbb N_0$ there is $s_B \in F$ with $u(s_B)=\sum_{i\in B}u(x_i)$ for all $u\in S$. Then $\mathrm{rng \,} \boldsymbol x$ is a bounded set in $F$ and $\boldsymbol x$ is summable in $F_\sigma$.
Lemma 5 is essentially what is contained in Bill Johnson's answer, and Lemma 4 is the WUC−matter needed there.