Let $V$ be the $\mathbb{R}$-Vector space of polynomials with degree $\leq$ 2. Let $\psi\colon V \times V \rightarrow \mathbb{R}$ be the bilinear form $$(p,q) \mapsto \int_{0}^{1}p(x)q(x)dx$$ Let $\phi$ be a linear form $p \mapsto p(0)$. Find a $q \in V$, such that $\phi(p)=\psi(p,q)$ for all $p\in V$
I still have trouble understanding, what this $q$ that I'm looking for actually is and especially how I would manage to find it.
There are clever choices of "sampling functions" $p$ that you can use to tease out the coefficients of this polynomial $q$, but I'm going to show you the robust (if verbose) method to determine $q$.
The vector space $V$ has a basis $\{1, x, x^2\}$ over $\mathbb{R}$. In other words, each $p \in V$ is expressed uniquely as $$ p = ax^2 + bx + c $$ for some $a, b, c \in \mathbb{R}$. Or in the language of coordinates, with respect to the monomial basis, $p$ has coordinates $$ \begin{bmatrix} a \\ b \\ c \end{bmatrix} \in \mathbb{R}^3. $$
Let's express our unknown special function $q \in V$ in this basis too: $$ q = Ax^2 + Bx + C. $$ Our goal is to determine $A, B, C \in \mathbb{R}$ such that $\phi(p) = \psi(p, q)$ for all $p \in V$.
First, in this basis, what is $\phi(p)$? Evaluate at $x=0$: $\phi(p) = p(0) = c$.
Now, the bilinear form involves the product $pq$, so let's work that out in coordinates: \begin{align} p(x) \, q(x) &= \bigl( ax^2 + bx + c \bigr) \bigl( Ax^2 + Bx + C \bigr) \\ &= aA\,x^4 + (bA + aB)\,x^3 + (cA + bB + aC)\,x^2 + (cB + bC)\,x + cC. \end{align} Now, we're supposed to integrate this over $[0, 1]$. Since $$ \int_0^1 k \, x^n \, dx = \biggl. \frac{k}{n+1} x^{n+1} \, \biggr\rvert_0^1 = \frac{k}{n+1} x^{n+1} $$ and integration is a linear operator, \begin{align} \psi(p,q) &= \int_0^1 \, p(x) \, q(x) \, dx \\ &= \int_0^1 \, \Bigl( aA\,x^4 + (bA + aB)\,x^3 + (cA + bB + aC)\,x^2 + (cB + bC)\,x + cC \Bigr) \, dx \\ &= \tfrac15 aA + \tfrac14 (bA + aB) + \tfrac13 (cA + bB + aC) + \tfrac12 (cB + bC) + cC \\ &= \bigl( \tfrac15 a + \tfrac14 b + \tfrac13 c \bigr) A + \bigl( \tfrac14 a + \tfrac13 b + \tfrac12 c \bigr) B + \bigl( \tfrac12 a + \tfrac12 b + c \bigr) C \end{align} In coordinates, $$ \psi(p, q) = \begin{bmatrix} a & b & c \end{bmatrix} \begin{bmatrix} \tfrac15 & \tfrac14 & \tfrac13 \\ \tfrac14 & \tfrac13 & \tfrac12 \\ \tfrac13 & \tfrac12 & \tfrac11 \end{bmatrix} \begin{bmatrix} A \\ B \\ C \end{bmatrix} $$ Now, the requirement that $\psi(p, q) = \phi(p)$ becomes $$ \begin{bmatrix} a & b & c \end{bmatrix} \begin{bmatrix} \tfrac15 & \tfrac14 & \tfrac13 \\ \tfrac14 & \tfrac13 & \tfrac12 \\ \tfrac13 & \tfrac12 & \tfrac11 \end{bmatrix} \begin{bmatrix} A \\ B \\ C \end{bmatrix} = \begin{bmatrix} a & b & c \end{bmatrix} \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} $$ Since we need this equation to hold for any $a, b, c \in \mathbb{R}$, we need to solve the equation $$ \begin{bmatrix} \tfrac15 & \tfrac14 & \tfrac13 \\ \tfrac14 & \tfrac13 & \tfrac12 \\ \tfrac13 & \tfrac12 & \tfrac11 \end{bmatrix} \begin{bmatrix} A \\ B \\ C \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}. $$ Can you take it from here?