% 此函数的简短摘要。
% 此函数的详细说明。

function h = cubic_Hermite(x1,x2,y1,y2,d1,d2)
syms x
p=(((x-x2)/(x1-x2))^2)*(1+2*(x-x1)/(x2-x1))*y1+(((x-x1)/(x2-x1))^2)*(1+2*(x-x2)/(x1-x2))*y2+(((x-x2)/(x1-x2))^2)*(x-x1)*d1+(((x-x1)/(x2-x1))^2)*(x-x2)*d2;
simplify(p);
p=collect(p);
h=sym2poly(p);
end