Question: Find the polynomial of degree $1$ that has the highest possible order of contact with $f(x)=\text{erf}(x-1)$ at $x=1$. Plot the spline knotted at $(1,0)$ with $f(x)$ on the right and your polynomial on the left for $0 \leq x \leq 2$.
I think $$f(x)=\frac{2}{\sqrt{\pi}}\left(\left(\int_{0}^{x} e^{-t^2} dt\right) - \left(\int_{0}^{1} e^{-t^2} dt\right)\right).$$ When I go to calculate $g(x)$, I get $$\frac{2}{\sqrt{\pi}}\int_{0}^{1} e^{-t^2} dt\cdot x.$$ However, when I graph this spline it doesn't look correct. Are there any tips on how to find $g(x)$? I used $g(x) = a_0x^0 + a_1x^1$ with $a_0=0$ and $$a_1= \frac{2}{\sqrt{\pi}}\int_{0}^{1} e^{-t^2} dt.$$