# Let $f(x)=sin(x)$ on $[0,π]$.Construct a polynomial interpolation from the points $[0,0]$,$[π/2,1]$,$[π,0]$ with Newton and Lagrange method

Let $f(x)=sin(x)$ on $[0,π]$.Construct a polynomial interpolation from the points $[0,0]$,$[π/2,1]$,$[π,0]$ with Newton and Lagrange method.After this find the optimal upper bound for the error of the polynomial approximation.What is the error on $x=π/4$?

I solved the first part of constructing the two polynomials interpolation but how can i find the error for the upper bound and the error on $x=π/4$

Lagrange and Newton gives:$${-4x^2\over π^2}+{4x\over π}$$ as the polynomial interpolation.

• $\displaystyle{\left\vert\,\,\, {3/4 - \sqrt{2}/2 \over \sqrt{2}/2} \,\,\,\right\vert \times 100\ \% \approx 6.07\ \%}$. Aug 22, 2016 at 0:52

Well, $$p(x) = \frac{4}{\pi^2}x(\pi-x)$$ is obviously the only second degree polynomial with roots at $x=0,\,x=\pi$ that equals $1$ at $x=\frac{\pi}{2}$, and while $p\!\left(\frac{\pi}{4}\right)=\frac{3}{4}$, $\sin\left(\frac{\pi}{4}\right)=\frac{1}{\sqrt{2}}$, hence the error of the approximation at $x=\frac{\pi}{4}$ is $$\left|\frac{3}{4}-\frac{1}{\sqrt{2}}\right|=\frac{1}{4(3+\sqrt{8})}\approx\color{red}{\frac{1}{23}}.$$
• @MantolInis: the error upper bound just depends on $\sup_{x\in[0,\pi]}\left| f'''(x)\right|$ with $f(x)=\sin x$, see here: math.stackexchange.com/questions/1151001/… Aug 21, 2016 at 20:21