Bochner integral: Is $f=g$ $\mu$-a.e. if their integrals are equal on every measurable set? Let $(X, \mathcal F, \mu)$ be a $\sigma$-finite complete measure space, and $(E, |\cdot|_E)$ a Banach space. Assume $f,g:X \to E$ are $\mu$-integrable such that
$$
\int_A f \mathrm d \mu = \int_A g \mathrm d \mu \quad \forall A \in \mathcal F.
$$
Here we use the Bochner integral. If $E = \mathbb R$, then it's well-known that $f=g$ $\mu$-a.e. The proof in this case uses the natural order on $\mathbb R$.
I would like to ask of if $f=g$ $\mu$-a.e. in case $E$ is a general Banach space. Thank you so much!
 A: If $f$ and $g$ are $\mu-$ integrable (in the Bochner sense ) then they are almost separably valued an this reduces the proof to the case when $E$ is a separable Banach Space.
Now $\int_A x^{*}\circ f d\mu= \int_A x^{*}\circ g d\mu$ for all $A$ and all $x^{*} \in E^{*}$. So $x^{*}\circ f=x^{*}\circ g$ a.e. for every $x^{*} \in E^{*}$. [There are too many null sets and we have to overcome this somehow]. Now use the fact that the closed unit ball of $E^{*}$ is a compact metric space. Hence, it is separable.  Using the fact that there is one null set outside which $x^{*}\circ f=x^{*}\circ g$  for every $x^{*}$ in a countable dense  set in $E^{*}$ you see that $f=g$ a.e. [$\mu$].
A: I fill some detail in @geetha290krm's excellent answer to better understand his/her ideas.

We have
$$
\varphi \left (\int_A f \mathrm d \mu\right ) = \varphi \left (\int_A g \mathrm d \mu \right) \quad \forall A \in \mathcal F, \forall \varphi \in E^*.
$$

Lemma: Let $(F, |\cdot|_F)$ be a Banach space and $L:E \to F$ continuous linear. Then $L \circ f \in L_1(X, \mu, F)$ and
$$
L \left ( \int_X f \mathrm d \mu \right ) =  \int_E L \circ f \mathrm d \mu.
$$

This lemma is Theorem 2.11. of Amann's Analysis III. By our Lemma, we get
$$
\int_A \varphi \circ f \mathrm d \mu = \int_A \varphi \circ g \mathrm d \mu \quad \forall A \in \mathcal F, \forall \varphi \in E^*.
$$
Notice that $\varphi \circ f, \varphi \circ g$ are real-valued, so for all $\varphi \in E^*$
$$
\varphi \circ f = \varphi \circ g \quad \quad \text{amost everywhere}.
$$
By Pettis's theorem, $f, g$ are $\mu$-essentially separably valued. By restricting to a separable subspace of $E$, we can assume that $E$ is separable. This implies the closed unit ball $B_{E^*}$ of $E^*$ is compact and metrizable in the weak$^*$ topology $\sigma(E^*, E)$. This comes from Theorem 3.28. of Brezis's Functional Analysis. Compact metric space is separable, so $B_{E^*}$ has a countable dense (w.r.t. $\sigma(E^*, E)$) subset $(\varphi_n)$.
For each $\varphi_n$, there is a $\mu$-null set $N_n \in \mathcal F$ such that
$$
\varphi_n \circ (f-g) (x) = 0 \quad \forall x \in N_n^c := X \setminus N_n.
$$
Let $N := \bigcup_n N_n$. Then $N$ is a $\mu$-null set. Then
$$
\varphi_n \circ (f - g) (x) = 0  \quad \forall n, \forall x \in N^c := X \setminus N
$$
Fix $\varphi \in E^*$. There is a subsequence $\lambda$ such that $\varphi_{\lambda(n)} \xrightarrow{n \to \infty} \varphi$ in $\sigma(E^*, E)$, which is equivalent to
$$
\varphi_{\lambda(n)} (e) \xrightarrow{n \to \infty} \varphi (e) \quad \forall e \in E.
$$
In particular,
$$
\varphi_{\lambda(n)} \circ (f - g) (x) \xrightarrow{n \to \infty} \varphi \circ (f - g) (x) \quad \forall x \in N^c.
$$
It follows that
$$
\varphi \circ (f - g) (x) =0 \quad \forall \varphi \in E^*, \forall x \in N^c.
$$
As such,
$$
(f - g) (x) =0 \quad \forall x \in N^c.
$$
This completes the proof.
A: I have just found a much simpler approach and posted it below.

The proof depends on the following beautiful lemma, i.e.,

Lemma Let $f \in L_1(X, \mu, E)$ and $F$ be a non-empty closed subset of $E$. If
$$
\varphi(A) := \frac{1}{\mu(A)} \int_A f \mathrm d \mu \in F \quad \forall A \in \mathcal F \text{ s.t. } \mu(A) \in (0, \infty),
$$
then $f(x) \in F$ for almost all $x \in X$.

Let $h:= f-g$ and $F := \{0\}$. Then $h$ is $\mu$-integrable and $F$ is closed. It's clear that
$$
\frac{1}{\mu(A)} \int_A h \mathrm d \mu = 0 \in F \quad \forall A \in \mathcal F.
$$
The claim then follows easily from our Lemma. This completes the proof.
