Artificial intelligent assistant

How to show the interpolant polynomial? Consider a uniform grid $\\{x_1, \ldots, x_N\\}$, with $x_{j+1}-x_j=h$ for each $j=1,2,...,N$, and a set of corresponding data values $\\{u_1,\ldots,u_N \\}$. Let $p_j$ be the unique polynomial of degree$\leq$2 with $p_j(x_{j-1})=u_{j-1}$, $p_j(x_{j})=u_{j}$, and $p_j(x_{j+1})=u_{j+1}$. How to show the following statement: $\bullet$ For fixed $j$, the interpolant $p_j$ is given by $$p_j(x)=u_{j-1}a_{-1}(x)+u_ja_0(x)+u_{j+1}a_1(x),$$ where $a_{-1}(x)=\frac{(x-x_j)(x-x_{j+1})}{2h^2}$, $a_0(x)=-\frac{(x-x_{j-1})(x-x_{j+1})}{h^2}$, and $a_1(x)=\frac{(x-x_{j-1})(x-x_j)}{2h^2}$.

Let $p_j(x) = a+b(x_j-x)+c(x_j-x)^2$, where $a,b,c \in R$ are unknowns. Then we have $a = p_j(x_j)=u_j$. So, $p_j(x) = u_j+b(x_j-x)+c(x_j-x)^2$. Now, using $x_j-x_{j-1}=x_{j+1}-x_j=h$, we get $p_j(x_{j-1})=u_j+bh+ch^2=u_{j-1}$ and $p_j(x_{j+1})=u_j-bh+ch^2=u_{j+1}$. Solving for $b$ and $c$ gives $b=\frac{u_{j-1}-u_{j+1}}{2h}$ and $c=\frac{u_{j-1}+u_{j+1}-2u_j}{2h^2}$. Thus, $p_j(x)=u_j+\frac{u_{j-1}-u_{j+1}}{2h}(x_j-x)+\frac{u_{j-1}+u_{j+1}-2u_j}{2h^2}(x_j-x)^2$. Expanding this expression, you can obtain the desired coefficients.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 9ecaf16c4a9ea510381b5242fbd33320