Is the sum of unbounded, symmetric operators with same domain self-adjoint?

I'm just starting with unbounded operators and I am trying to find sufficient (perhaps also necessary) conditions for $$H(t) = \sum_{i = 1}^n f_i(t) H_i, \qquad \mathrm{dom}\,H(t) = \mathcal{D}$$ to be self-adjoint, where $\mathcal{D}$ a dense subset of the Hilbert space $\mathcal{H}$, $H_i$ are (possibly unbounded) linear operators on $\mathcal{H}$ with $\mathrm{dom}\, H_i \supset \mathcal{D}$, and $f_i:\mathbb{R} \to \mathbb{R}$ real functions as regular as needed. I found the following theorem on Rudin's Functional Analysis:

Theorem 13.11. If $T$ is a densely defined symmetric operator on a Hilbert space $\mathcal{H}$, and if $\mathrm{Ran}\, T = \mathcal{H}$, then $T$ is self-adjoint and $T^{-1}$ is bounded.

It seems to me that basing on this theorem, if the restrictions to $\mathcal{D}$, $H_i|_\mathcal{D}$, are symmetric and semibounded from below then $H(t)$ is self-adjoint:

1. $H(t)$ is symmetric: for any $\psi,\varphi \in \mathcal{D}$ we have $$\langle \psi, H(t)\varphi \rangle = \sum_{i=0}^n f_i(t) \langle \psi, H_i\varphi \rangle = \sum_{i=0}^n f_i(t) \langle H_i\psi, \varphi \rangle = \langle H(t) \psi, \varphi \rangle,$$ where we have used that every $H_i$ are symmetric in $\mathcal{D}$.
2. Since all $H_i$ are bounded from below, for every $t$ there exists an $M > 0$ such that $H(t) + M$ is positive definite and thus 0 is in the resolvent set of $\tilde{H}(t) = H(t) + M$. This implies $\mathrm{Ran}\,\tilde{H}(t) = \mathcal{H}$, hence it is self-adjoint by the theorem. Then $H(t) = \tilde{H}(t) - M$ is self-adjoint for it is the difference between a self-adjoint operator and a bounded one.

That is as far as I can get, but it looks odd that no condition need to be imposed to the functions $f_i$, so if this reasoning were right that means any linear combination of operators both symmetric and semibounded from below is in fact self-adjoint, which sounds too good to be right. I have probably missed something on point 2, but can't figure out what.

Any help finding errors or hints on how to find conditions for $H(t)$ to be self-adjoint would be nice.

EDIT: Ok, I found an error: $\tilde{H}(t)$ being positive definite just means 0 is not in the discrete spectrum, but if i'm not wrong it could still be in the continuous or residual spectrum, which would mean $\mathrm{Ran}\, \tilde{H}(t) \neq \mathcal{H}$. Still, any help to find when $H(t)$ is self-adjoint would be appreciated.

• If $H$ is densely-defined and selfadjoint, but not defined on all of $\mathcal{H}$, then $H-H$ is not selfadjoint. Aug 9, 2018 at 19:24

Let $H_1=-\frac{d^2}{dx^2}$ on the domain $\mathcal{D}_1$ consisting of all twice absolutely continuous functions $f$ on $[0,1]$ with $f''\in L^2[0,1]$ and $f(0)=f(1)=0$. Let $H_2 = -\frac{d^2}{dx^2}$ on the domain $\mathcal{D}_2$ consisting of all twice absolutely continuous functions $f$ on $[0,1]$ with $f''\in L^2[0,1]$ and $f'(0)=f'(1)=0$. Both of these operators are densely-defined, non-negative selfadjoint linear operators. And $H_1+H_2$ is symmetric positive-definite and densely-defined on $\mathcal{D}=\mathcal{D}_1\cap\mathcal{D}_2$. It is even true that $H_1+H_2$ is closed on this domain, but it is not selfadjoint.