Adjoint of derivative operator on polynomial space
Solution 1:
In this business, to find the (formal) adjoint of a differential operator, integrate by parts. If $T = \frac{d}{dt}$, then
\begin{align*} \langle Tf, g\rangle &= \int_0^1 f'(t)g(t)dt \\ &= f(t)g(t)\bigg|_0^1 - \int_0^1 f(t)g'(t)dt \\ &= f(t)g(t)\bigg|_0^1 - \langle f,Tg\rangle \\ &= \bigg( f(1)g(1) - f(0)g(0)\bigg) - \langle f,Tg\rangle \end{align*}
This is easier if you restrict to the space of polynomials which have $f(0) = f(1)$ (often, both zero); then, $T^* = -T$. Otherwise, as Daniel Fischer points out, you need an operator $B$ which has $\langle f, Bg \rangle = f(1)g(1) - f(0)g(0).$
Solution 2:
Let's try this when $n=2$: An orthonormal basis emerges from the Gram--Schmidt process: $$ f_0=1,\qquad f_1=2\sqrt{3}\left(x-\frac12\right), \qquad f_2=6\sqrt{5}\left(x^2 - x + \frac16\right) $$ Now observe that $f_2'=6\sqrt{5}(2)\left(x-\frac12\right) = 2\sqrt{15}f_1$ and $f_1'= 2\sqrt{3} f_0$ and $f_0'=0$, so the matrix is $$ \begin{bmatrix} 0 & 2\sqrt{3} & 0 \\ 0 & 0 & 2\sqrt{15} \\ 0 & 0 & 0 \end{bmatrix}. $$
The matrix of the adjoint ought to be the transpose of this: $$ \begin{bmatrix} 0 & 0 & 0 \\ 2\sqrt{3} & 0 & 0 \\ 0 & 2\sqrt{15} & 0 \end{bmatrix}. $$ So $f_0 \mapsto 2\sqrt{3}\,f_1$ and $f_1\mapsto 2\sqrt{15}\, f_2$ and $f_2\mapsto 0$.