Determine the nodes of the first degree interpolating polynomial which approximate $f(x) = cos(x)$ the best on $[-\pi,\pi]$ in the uniform norm. What is the interpolation error?
I think I need a polynomial such that $$p(-\pi)=-1, p(0)=1 $$ Further I get $$p[-\pi,0]=(1+1)/\pi=2/\pi$$ and $$p(x) = -1 +(x+\pi)2/\pi$$ So my nodes are $-\pi$ and $0$. Is that correct or am I wrong ? The interpolation error is $$sin(z)(x+\pi)(x-\pi)x/6 \le (x^2-\pi^3)x/6 \le \pi^2/16 $$ with $x\in[-\pi,0]$ (where i chose $x=-\pi/2$).