Adjoint of an operator on $L^2$ Consider the Hilbert space $L^2 (1,\infty)$ and a real function $g(x)=x^2$ defined on the interval $(1,\infty)$.
Define an operator $T$ by the formula $T(f)=f \cdot g$ for all $f$ in the domain $$D(T)=\{ f \in L^2 (1,\infty); \space  \space f \cdot g \in L^2 (1,\infty), \space \int_1^{\infty}f(x)\mathrm{d}x=0\}.$$
I'm trying to find the adjoint operator $T^*$, i.e. the operator defined on the set $$D(T^*)=\{h \in L^2 (1,\infty); \space  \space  \mathrm{the \space mapping \space} f \mapsto \langle Tf,h \rangle \mathrm{\space is \space continuous \space on \space} D(T)\}$$
such that $\langle Tf,h \rangle = \langle f,T^* h \rangle$ for every $f \in D(T), \space h \in D(T^*)$.  
I managed to prove that the operator $T$ is densely defined (therefore $T^*$ is well-defined and uniquely determined) and closed (i.e. it has a closed graph).   
Unfortunately, I'm unable to find a nice characterisation of the set $D(T^*)$. My approach is following:
Suppose that $h \in D(T^*)$. Then there exists a uniquely determined (thanks to the density of the domain) function $\Psi \in L^2 (1,\infty)$ such that $\langle 
Tf,h \rangle = \langle f,\Psi \rangle$ for all $f \in D(T)$. Using the definition of the inner product on $L^2 (1,\infty)$ we find out that for all $f \in D(T)$ $$\int_1^{\infty}f \cdot \left( \bar{h} \cdot g \space - \space \bar{\Psi}  \right )=0.$$
But now I'm stuck because I can't guarantee that the function $\bar{h} \cdot g$ is in $L^2(1,\infty)$. If I knew that, then I would just say that $\bar{h} \cdot g$ is equal to $\Psi$ almost everywhere, but without that I don't know how to continue.
Thanks for any advice.
 A: Indeed it need not be the case that $h\cdot g \in L^2(1,\infty)$, $h\cdot g$ and $\Psi$ can differ by a constant function.
It is clear that $A :=\{ h \in L^2(1,\infty) : h \cdot g \in L^2(1,\infty)\} \subset D(T^{\ast})$, and that $T^{\ast}(h) = h\cdot g$ for those $h$. Further, we note that $r \colon x \mapsto x^{-2}$ also belongs to $D(T^{\ast})$, since
$$\langle Tf, r\rangle = \int_1^{\infty} x^2f(x)r(x)\,dx = \int_1^{\infty} f(x)\,dx = 0$$
for all $f \in D(T)$, so $f \mapsto \langle Tf, r\rangle$ is clearly continuous, and we have $T^{\ast}r = 0$. So we know $A \oplus \mathbb{C}\cdot r \subset D(T^{\ast})$, and $T^{\ast}(h + \lambda r) = h\cdot g$ for $h \in A$ and $\lambda \in \mathbb{C}$.
It remains to see that $D(T^{\ast}) = A \oplus \mathbb{C}\cdot r$. For that, we first make a few abstract notes.
If $H_1, H_2$ are Hilbert spaces, $D(B)$ a linear subspace of $H_1$, and $B \colon D(B) \to H_2$ is a linear operator, we define the adjoint relation $B^{\ast}$ of $B$ by
$$\Gamma(B^{\ast}) = \bigl\{ (y,x) \in H_2 \times H_1 : \bigl(\forall u \in D(B)\bigr)\bigl(\langle Bu, y\rangle_{H_2} = \langle u, x\rangle_{H_1}\bigr) \bigr\}.$$
Then we have
$$D(B^{\ast}) = \bigl\{ y \in H_2 : \{y\} \times H_1 \cap \Gamma(B^{\ast}) \neq \varnothing\bigr\} = \bigl\{ y \in H_2 : u \mapsto \langle Bu, y\rangle_{H_2} \text{ is continuous on } D(B)\bigr\},$$
and $B^{\ast}$ is a (linear) function if and only if $D(B)$ is dense in $H_1$.
We note that $\Gamma(B^{\ast})$ is a linear subspace of $H_2 \times H_1$, and we can obtain it in a simple way from $\Gamma(B) = \{ (u,Bu) : u \in D(B)\}$. We make the product space $H_j \times H_k$ a Hilbert space by setting
$$\langle (u,v), (x,y)\rangle_{H_j \times H_k} = \langle u, x\rangle_{H_j} + \langle v,y\rangle_{H_k},$$
and define $V, I \colon H_1 \times H_2 \to H_2 \times H_1$ by $V(x,y) = (y,x)$ and $I(x,y) = (-y,x)$. One easily verifies that $V$ and $I$ are unitary isomorphisms, and that
$$\Gamma(B^{\ast}) = I\bigl(\Gamma(B)^{\perp}\bigr) = \Bigl(I\bigl(\Gamma(B)\bigr)\Bigr)^{\perp}.$$
If $B$ is injective, then $B^{-1}$ is a linear operator from a subspace of $H_2$ to $H_1$, and we have $\Gamma(B^{-1}) = V\bigl(\Gamma(B)\bigr)$, and consequently
$$\Gamma\bigl((B^{-1})^{\ast}\bigr) = I^{-1}\bigl(\Gamma(B^{-1})^{\perp}\bigr) = I^{-1}\Bigl(V\bigl(\Gamma(B)^{\perp}\bigr)\Bigr) = V^{-1}\Bigl(I\bigl(\Gamma(B)^{\perp}\bigr)\Bigr) = V^{-1}\bigl(\Gamma(B^{\ast})\bigr),$$
i.e. the adjoint (relation) of the inverse is the inverse of the adjoint.
Now we apply these considerations to $T$ and its extension $M \colon A \to L^2(1,\infty)$ (given by $M h = h \cdot g$). Clearly $T$ and $M$ are injective, and it is easy to see that $M$ is surjective, its inverse $S$ is the multiplication with $r$, which is a continuous (since $r$ is bounded) self-adjoint operator. Since $r \in L^2(1,\infty)$, the map $\tilde{S} \colon f \mapsto f\cdot r$ is a continuous operator $L^2(1,\infty) \to L^1(1,\infty)$, hence
$$R := \Biggl\{ f \in L^2(1,\infty) : \int_1^{\infty} f(x)r(x)\,dx = 0 \Biggr\}$$
is a closed hyperplane in $L^2(1,\infty)$, and clearly $R = (\mathbb{C}\cdot r)^{\perp}$. Further, one sees that $D(T) = S(R)$, and consequently $R = \operatorname{im} T$. Finally, we find
\begin{align}
\Gamma(T^{\ast}) &= V\Bigl(\Gamma\bigl((T^{-1})^{\ast}\bigr)\Bigr) \\
&= V\Bigl(I\bigl(\Gamma(T^{-1})^{\perp}\bigr)\Bigr) \\
&= V\Bigl(I\bigl((\Gamma(S) \cap R\times L^2)^{\perp}\bigr)\Bigr) \\
&= V\Bigl(I(\bigl(\overline{\Gamma(S)^{\perp} + (R\times L^2)^{\perp}}\bigr)\Bigr) \\
&= V\Bigl(I\bigl(\overline{\Gamma(S)^{\perp} + (\mathbb{C}\cdot r)\times \{0\}}\bigr)\Bigr) \\
&= V\Bigl(I\bigl(\Gamma(S)^{\perp} + (\mathbb{C}\cdot r)\times \{0\}\bigr)\Bigr) \\
&= V\Bigl(I\bigl(\Gamma(S)^{\perp}\bigr)\Bigr) + (\mathbb{C}\cdot r)\times \{0\} \\
&= V\bigl(\Gamma(S^{\ast})\bigr) + (\mathbb{C}\cdot r)\times \{0\} \\
&= V\bigl(\Gamma(S)\bigr) + (\mathbb{C}\cdot r)\times \{0\} \\
&= \Gamma(M) + (\mathbb{C}\cdot r)\times \{0\},
\end{align}
where we used that $(U\cap W)^{\perp} = \overline{U^{\perp} + W^{\perp}}$ for closed subspaces $U,W$ of a Hilbert space, the sum of a closed subspace and a finite-dimensional subspace is closed, linear maps preserve the sum of subspaces ($L(U+W) = L(U) + L(W)$), and $V\bigl(I(U\times \{0\})\bigr) = U\times \{0\}$ for a linear subspace $U$.
A: Let $T : \mathcal{D}(T) \subset L^2\rightarrow L^2$ be as described, and let $M : \mathcal{D}(M) \subset L^2\rightarrow L^2$ be the operator $Mf=x^2f$ defined on the domain $\mathcal{D}(M)$ consisting of all $f\in L^2$ for which $x^2f\in L^2$. The operator $T$ is densely-defined, as you have shown. And, it is easily checked that
$$
           (Tf,g) = (f,Mg),\;\;\;\; f\in\mathcal{D}(T^*),\;g\in\mathcal{D}(M).
$$
Therefore, $M \preceq T^*$, meaning that $M$ is a restriction of $T^*$ which may or may not be a proper restriction.
Conversely, suppose $g\in\mathcal{D}(T^*)$ so that
$$
                  (Tf,g)=(f,T^*g),\;\;\; f\in\mathcal{D}(T).
$$
One such element $f\in\mathcal{D}(T)$ is
$$
              f_{x,h}(t) = \chi_{[1,x]}(t)-(x-1)\frac{1}{h}\chi_{[x,x+h]}(t),\;\; 1 < x,\; h > 0.
$$
Therefore,
$$
      (Tf_{x,h},g) = \int_{1}^{x}t^2g(t)dt-(x-1)\frac{1}{h}\int_{x}^{x+h}t^2g(t)dt \\
        = (f_{x,h},T^*g) = \int_{1}^{x}T^*g dt-(x-1)\frac{1}{h}\int_{x}^{x+h}T^*g dt.
$$
Letting $h\downarrow 0$ and using the Lebesgue differentiation theorem gives the following for a.e. $x$:
$$
               \int_{1}^{x}t^2g(t)dt-(x-1)x^2g(x)=\int_{1}^{x}T^*g dt-(x-1)T^*g(x) \\
    -\frac{1}{(x-1)^2}\int_{1}^{x}t^2g(t)dt+\frac{1}{(x-1)}x^2g(x)
    = -\frac{1}{(x-1)^2}\int_{1}^{x}T^*g dt + \frac{1}{(x-1)}T^*g(x) \\
   \frac{d}{dx}\left(\frac{1}{x-1}\int_{1}^{x}t^2g(t)dt\right)
   = \frac{d}{dx}\left(\frac{1}{x-1}\int_{1}^{x}T^*gdt\right) \\
   C(x-1)+\int_{1}^{x}t^2g(t)dt = \int_{1}^{x} T^*gdt \mbox{ (constant C added 05/01/2017) } \\
        x^2(g(x)+C/x^2) = (T^*g)(x) \;\; a.e.
$$
It follows that every $g\in \mathcal{D}(T^*)$ is such that $(g+C/x^2)\in\mathcal{D}(M)$ for some $C$ and $T^*g = M(g+C/x^2)$. (I jumped to the conclusion that $C$ would have to $0$ in order to have everything in $L^2$, and missed that possibility. I should have known because $T^*(1/x^2)=0$ leads there, too, which I did know.) Statements that follow are not true: Therefore $T^*\preceq M$. Combining with the first paragraph gives $T^*=M$. So the closure of $T$ must equal $M$. 
Corrected Domain of $T^*$: Consists of all $g\in L^2$ for which there exists a $C$ such that $x^2(g+C/x^2)\in L^2$. The constant $C$ is unique for such $g\in\mathcal{D}(T^*)$, and $T^*g=x^2g+C$.
