Closed unbounded operator with domain not closed
I am looking for an example for further understanding of the Closed Graph Theorem:
Let $X,Y$ be Banach spaces and $T:X\to Y$ closed (i.e. the graph of $T$ is closed in $X\times Y$). Then if $\mathcal{D}(T)$ is closed in $X$, $T$ is bounded.
I am looking for an unbounded operator whose graph $\mathcal{G}(T)$ is closed in $X\times Y$ and whose domain $\mathcal{D}(T)$ is not closed in $X$, to clearify the necessity of $\mathcal{D}(T)$ being closed.
This question arose due to the definition of the norm of a graph $\lVert (x,Tx)\rVert:=\lVert x\rVert+\lVert Tx\rVert$, where I thought the following statement would be true: [$\mathcal{G}(T)$ closed $\Rightarrow\mathcal{D}(T)$ closed] which in general is false.
One of the simplest examples is the following:
Let $D(T) = C^1[0,1]$ be the space of of continuously differentiable functions (one-sided derivative at the end points) and let $X = C^0[0,1]$ be equipped with the norm $\lVert f \rVert_\infty = \sup_{x \in [0,1]} \lvert f(x)\rvert$.
Then the derivative $T = \frac d{dx}$ is an operator $D(T) \subset C^0[0,1] \to C^0[0,1]$ and $T$ is easily checked to have closed graph. Remember: if $f_n \to f$ pointwise and $f_{n}' \to g$ uniformly then $g$ is the derivative of $f$ by an application of the fundamental theorem of calculus.
However, $D(T)$ is not closed (it is dense but not all of $C^0[0,1]$) and $T$ is not bounded (consider $x^n$).
If there is a Cauchy sequence $\{x_n\} \subset \mathcal D(T)\subset X$ whose $\{T x_n\}$ is not Cauchy in $Y$, then the definition doesn't cover this particular sequence.
In order to make $\mathcal D(T)$ closed, you need to guarantee ALL Cauchy sequences in $\mathcal D(T)$ to accumulate inside $\mathcal D(T)$. The definition of a closed operator, however, can only guarantee those Cauchy sequences $\{x_n\}$, which BOTH the $\{x_n\}$ and $\{T x_n\}$ are Cauchy, has a limit inside $D(T)$.