Find the quadratic polynomial $p(x)$ for given data points $$p(x_0)=y_0, p'(x_1)=y_1', p(x_2)=y_2 \text{ with } x_0 \neq x_2.$$
My approach
I tried the problem taking $p(x)=a+bx+c x^2$ but I am not sure about.
Any help is appreciated.
Find the quadratic polynomial $p(x)$ for given data points $$p(x_0)=y_0, p'(x_1)=y_1', p(x_2)=y_2 \text{ with } x_0 \neq x_2.$$
My approach
I tried the problem taking $p(x)=a+bx+c x^2$ but I am not sure about.
Any help is appreciated.
The most general quadratic that goes through $(x_0,y_0)$ and $(x_2,y_2)$ is $$p(x)=y_0+\frac{(y_2-y_0)}{(x_2-x_0)}(x-x_0)+C(x-x_0)(x_2-x)$$ Then we require $$p^{\prime}(x_1)=y_1^{\prime}=\frac{(y_2-y_0)}{(x_2-x_0)}+C(x_0+x_2-2x_1)$$ If $x_0+x_2-2x_1=0$ there may be no solution. Otherwise solve for $C$ and your solution is as given.
Starting with a generic quadratic polynomial, you could create three linear equations. $$p(x)=a+bx+cx^2$$ $$p'(x)=b+2cx$$ Then $$\begin{cases}y_0=a+bx_0+cx_0^2\\y_1'=b+2cx_1\\y_2=a+bx_2+cx_2^2\end{cases}$$ Finally, solve for $a$, $b$ and $c$.