# Cubic polynomial interpolation

Let $f(x) = x^2\cdot (x-1)^2 \cdot (x-2)^2 \cdot (x-3)^2$. What is the piecewise cubic Hermite interpolant of $f$ on the grid $x_0 = 0$, $x_1 = 1$, $x_2 = 2$, $x_3 = 3$. Let $g(x) = ax^3 + bx^2 + cx +d$ for some parameters $a, b, c, d$ write down the piecewise cubic Hermite interpolation of g on the same grid.

I realize that $f$ and $f'$ are 0 at each node, so essentially the cubic polynomial that interpolates $f$ is just $g$. But I'm not sure of how to actually split $g$ into a piecewise cubic since it's already a cubic function.

• Please, check the formulation of the very first formula. Is it something like $f(x)=x^2\cdot (x-1)^2\cdot (x-2)^2 \cdot (x-3)^2$? – Karel Macek Nov 4 '14 at 13:21
• Oh yes sorry about that – Meggany Nov 4 '14 at 14:27

We look for a polynomial for the first interval $[x_0,x_1]$ in this form $$p(x)=a+b(x-x_0)+c(x-x_0)^2+d(x-x_0)^2(x-x_1)$$ with its first derivative being $$p^\prime(x)=b+2c(x-x_0)+2d(x-x_0)(x-x_1)+d(x-x_0)^2$$
Zero value and zero derivative at $x=x_0$ means $a=b=0$. Same conditions at $x=x_1$ lead to $c=d=0$.