<s>[INST] computing the adjoint of operator $T$ on the space $P_2(\mathbb{R})$ Suppose that the inner product on $P_2(\mathbb{R})$ is defined by $$\langle f,g \rangle:= f(-1)g(-1)+f(0)g(0)+f(1)g(1).$$
Consider the operator $T \in B(P_2(\mathbb{R}))$ which is defined as $Tf=f'$, so the derivative of $f$. Find the adjoint of $T$.
I am trying to find the adjoint in the following way.
Since $\langle Tf, g\rangle = \langle f, T^*g\rangle$ then we have that 
$\langle f, T^*g\rangle = f'(-1)g(-1) + f'(0)g(0) + f'(1)g(1)$. How do I continue now since I don't know how $T^*$ looks like? I appreciate your help.
 [/INST] Every $f\in P_2$ can be written as
$$
    f=f(-1)\frac{1}{2}x(x-1)+f(0)(1-x^2)+f(1)\frac{1}{2}x(x+1)$$
Therefore,
$$
   f'(x)=f(-1)(x-\frac{1}{2})-2f(0)x+f(1)(x+\frac{1}{2})
$$
which gives
\begin{align}
   f'(-1)&=-\frac{3}{2}f(-1)+2f(0)-\frac{1}{2}f(1) \\
   f'(0)&=-\frac{1}{2}f(-1)+\frac{1}{2}f(1) \\
   f'(1)&=\frac{1}{2}f(-1)-2f(0)+\frac{3}{2}f(1)
\end{align}
So
$$
   \left[\begin{array}{c}(Tf)(-1)\\ (Tf)(0)\\ (Tf)(1)\end{array}\right]
   = \left[\begin{array}{ccc}-\frac{3}{2} & 2 & -\frac{1}{2} \\
     -\frac{1}{2} & 0 & \frac{1}{2} \\
      \frac{1}{2} & -2 & \frac{3}{2}\end{array}\right]\left[\begin{array}{c} f(-1)\\f(0)\\f(1)\end{array}\right]
$$
Therefore, $T^*$ is represented by the transpose
$$
   \left[\begin{array}{c}(T^*f)(-1)\\ (T^*f)(0)\\ (T^*f)(1)\end{array}\right]
   = \left[\begin{array}{ccc}-\frac{3}{2} & -\frac{1}{2} & \frac{1}{2} \\
     2 & 0 & -2 \\
      -\frac{1}{2} & \frac{1}{2} & \frac{3}{2}\end{array}\right]\left[\begin{array}{c} f(-1)\\f(0)\\f(1)\end{array}\right]
$$
Therefore,
\begin{align}
   T^*f &= (T^*f)(-1)\frac{1}{2}x(x-1) \\ & +(T^*f)(0)(1-x^2)\\ &+(T^*f)(1)\frac{1}{2}x(x+1) \\
 &= \left(-\frac{3}{2}f(-1)-\frac{1}{2}f(0)+\frac{1}{2}f(1)\right)\frac{1}{2}x(x+1) \\
 &+2\left(f(-1)-f(1)\right)(1-x^2) \\
 &+\left(-\frac{1}{2}f(-1)+\frac{1}{2}f(0)+\frac{3}{2}f(1)\right)\frac{1}{2}x(x-1) \\
 &= f(-1)A(x)+f(0)B(x)+f(1)C(x).
\end{align}
I'll let you write $A,B,C$.
</s>