I am looking at Trefethen and Bau Exercise 37.1:I have two normalizations of the Legendre polynomials with corresponding recurrence relations:$$P_n(1)=1$$which follows$$P_n(x) = \frac{2n-1}{n} x P_{n-1}(x) -\frac{n-1}{n}P_{n-2}(x)$$and$$\|q_n\|=1$$which follows$$xq_n(x)=\beta_{n-1}q_{n-1}(x)+\alpha_n q_n(x) + \beta_n q_{n+1}(x)$$where$$\beta_n = \tfrac12 (1-(2n)^{-2})^{-1/2}$$Apparently, $q_{n+1}$ is proportional to $P_n$. I know that the entries of the Jacobi matrix $t_{ij} = (q_i,xq_j)$ in the $L^2([-1,1])$ inner-product space, and I managed to get the right answer for the $q_j$ with $0$ along the main diagonal, $\beta_{j-1}$ on the upper diagonal and $\beta_j$ along the lower diagonal. However, it doesn't seem that I am getting the right answer for the 1st normalization.Also,  I am asked to find the relationship between the two Jacobi matrices--my intuition is that they are equal but I can't quite justify it--I think it has to do with the fact that the characteristic polynomials are the same monic polynomial.Furthermore, I am asked to find a formula for $q_{n+1}(1)=\|P_n\|$ using the Jacobi matrices. I've tried to solve this by equating the entries for the Jacobi matrices (where one includes a term of $||P_n||^2$) and solving. But I can't get the answer $\|P_n\|=\sqrt{\frac{2}{2n+1}}$.
How to compute the Jacobi matrix (tridiagonal matrix) of a polynomial with a recurrence relationship?
linear algebra;numerical analysis;matrices;polynomials
I'm just going to sketch it out. I think the key mistake is assumingthat the two matrices are going to be equal---the exercise itselfnotes that $P_n$ and $q_{n+1}$ are proportional but normalizeddifferently. Also, I'm not sure how exactly you defined the second matrix  you mention two Jacobi matrices but the exercise just says the two tridiagonal matrices corresponding to the formulas.The matrix $T_{i,j} = (q_i, xq_j)$ has elements $T_{n,n+1} = T_{n+1,n}= \beta_n$. The tridiagonal matrix $P_{i,j}$ defined by the recurrence for $P_n$is obtained from rewriting the recurrence as$$ x P_n(x) = P_{n,n-1} P_{n-1}(x) + P_{n,n+1} P_{n+1}(x). $$This is not the same as $P_{ij} = (P_i, xP_j)$  the tridiagonal matrices $P$and $T$ are the matrix representations of multiplication by $x$ intheir respective polynomial basis ($q$ or $P$). So the relationship between them comes from the fact that it's the same linear operator applied to different bases. To check, the eigenvalues of both $P$ and $T$ should be the same and be identical to the roots of the appropriate polynomialthe two matrices are similar.So it is sufficient to use the fact that $P_n(x) = \|P_n\| q_{n+1}(x)$:$$ \beta_n = T_{n,n+1} = (q_n, xq_{n+1}) = \left(  \frac{P_{n-1}}{\|P_{n-1}\|}, \frac{x P_n}{\|P_n\|} \right) = \frac{\|P_{n-1}\|}{\|P_n\|}\, P_{n,n-1}. $$From here getting the value of $\|P_n\|$ is just straightforwardalgebra and for me it came out to $\sqrt{\frac{2}{2n+1}}$.