How does:
$$ f(x_2)= f(x_0)+\frac{f(x_1)-f(x_0)}{x_1-x_0}(x_2-x_0)+a_2(x_2-x_0)(x_2-x_1)\tag1 $$
rearrange to:
$$ a_2 = \frac{\frac{f(x_2)-f(x_1)}{x_2-x_1}-\frac{f(x_1)-f(x_0)}{x_1-x_0}}{x_2-x_0} \tag 2$$
as shown on page 5 of this pdf
Thanks.
How does:
$$ f(x_2)= f(x_0)+\frac{f(x_1)-f(x_0)}{x_1-x_0}(x_2-x_0)+a_2(x_2-x_0)(x_2-x_1)\tag1 $$
rearrange to:
$$ a_2 = \frac{\frac{f(x_2)-f(x_1)}{x_2-x_1}-\frac{f(x_1)-f(x_0)}{x_1-x_0}}{x_2-x_0} \tag 2$$
as shown on page 5 of this pdf
Thanks.
I think the pdf may be wrong since, rearranging first we get:
$(f(x_2)-f(x_0))-\frac{f(x_1)-f(x_0)}{x_1-x_0}(x_2-x_0)=a_2(x_2-x_0)(x_2-x_1)$
$\large\Rightarrow a_2=\frac{f(x_2)-f(x_0)}{(x_2-x_0)(x_2-x_1)}-\frac{f(x_1)-f(x_0)}{(x_1-x_0)(x_2-x_1)}=\frac{\frac{f(x_2)-f(x_0)}{x_2-x_0}-\frac{f(x_1)-f(x_0)}{x_1-x_0}}{x_2-x_1} $
BUT
If we subtract $f(x_1)$ from both sides we get:
$f(x_2)-f(x_1)=(f(x_0)-f(x_1))+\frac{f(x_1)-f(x_0)}{x_1-x_0}(x_2-x_0)+a_2(x_2-x_0)(x_2-x_1)$
then:
$\frac{f(x_2)-f(x_1)}{x_2-x_1}=\frac{f(x_0)-f(x_1)}{x_2-x_1}+\frac{f(x_1)-f(x_0)}{(x_1-x_0)(x_2-x_1)}(x_2-x_0)+a_2(x_2-x_0)$
$=\frac{(f(x_1)-f(x_0))(x_2-x_0+x_0-x_1)}{(x_1-x_0)(x_2-x_1)}+a_2(x_2-x_0)$
$=\frac{(f(x_1)-f(x_0))(x_2-x_1)}{(x_1-x_0)(x_2-x_1)}+a_2(x_2-x_0)$
$=\frac{f(x_1)-f(x_0)}{(x_1-x_0)}+a_2(x_2-x_0)$
so:
$\frac{f(x_2)-f(x_1)}{x_2-x_1}-\frac{f(x_1)-f(x_0)}{(x_1-x_0)}=a_2(x_2-x_0)$
Thus $\Large a_2=\frac{\frac{f(x_2)-f(x_1)}{x_2-x_1}-\frac{f(x_1)-f(x_0)}{(x_1-x_0)}}{x_2-x_0}$.