Problem 4. (Exercise 1 in the lecture on 7.14) Using Gram-Schmidt, compute the first threeLegendre polynomials on the interval (0, 1) with respect to the inner product \langle f, g\rangle=\int_{0}^{1} f(x) g(x) \mathrm{d} x . Then find the coordinates of the polynomial f(x) = x² + x +1 with respect to the Legendre polynomials you get.

Fig: 1

Fig: 2

Fig: 3