# Show that there is a polynomial of degree at most $2n-1$ for which $f(x_i) = a_i$ and $f'(x_i) = b_i$

Let $a_1,\ldots,a_n,b_1,\ldots,b_n$ real numbers and $x_1,\ldots,x_n$ be distinct real numbers. Show that there is a polynomial of degree at most $2n-1$ for which $f(x_i) = a_i$ and $f'(x_i) = b_i.$

This is a follow-up question to this. I think we can use the same Lagrangian interpolation idea here. But I don't know how to adjust for the fact that $f'(x_i) = b_i$.

• You can indeed use the same kind of trick. Try to construct two families of polynomials $p_1,\dots,p_n$ and $q_1,\cdots q_n$ in such a way that $p_i(x_j)=\delta_{ij}$, $p'_i(x_j)=0$, $q_i(x_j)=0$ and $q'_i(x_j)=\delta_{ij}$. – Arnaud D. Mar 4 '16 at 22:39
• But we need the same function right? – Puzzled417 Mar 4 '16 at 22:42
• By the way, this can also be done in a non-constructive way if you interpret it as an isomorphism between the space of polynomials of degree at most $2n-1$ and $\mathbb{R}^{2n}$. – Arnaud D. Mar 4 '16 at 22:42
• once you have those polynomials you can just take a linear combination of them to get your $f$ (as in one of the answer to your first question). – Arnaud D. Mar 4 '16 at 22:45
• Any ideas how to construct this $q_i(x_j)$? – Puzzled417 Mar 4 '16 at 22:48

## 1 Answer

For $i\in\{1,..,n\}$ let \begin{gather} u_i(x)=\prod_{\substack{j=1\\j\neq i}}^n\frac{x-x_j}{x_i-x_j}, \end{gather}

then for $j\in\{1,..,n\}$ \begin{gather} u_i(x_j)=\delta_{ij}. \end{gather}

Now let

\begin{gather} p_i(x)=u_i(x)^2*(2u_i'(x_i)(x_i-x)+1) \end{gather} \begin{gather} q_i(x)=u_i(x)^2*(x-x_i) \end{gather}

Then by the product and chain rule we have \begin{gather} p_i'(x)=2u_i'(x)u_i(x)*(2u_i'(x_i)(x_i-x)+1)-u_i(x)^2*2u_i'(x_i) \end{gather} \begin{gather} q_i'(x)=u_i(x)^2+2u_i(x)u_i'(x)(x-x_i) \end{gather}

and we see \begin{gather} p_i(x_j)=\delta_{ij},\ q_i(x_j)=0,\ p_i'(x_j)=0,\ q_i'(x_j)=\delta_{ij} \end{gather}

Now \begin{gather} f(x)=\sum_{i=1}^na_ip_i(x)+b_iq_i(x) \end{gather}

is a polynomial of degree at most $2n-1$ which has the desired properties.

• Excellent proof. I am close to it but can not find the exact function. – Math Wizard Mar 6 '16 at 8:26