Question

1. Let f(x)=\left\{\begin{array}{ll} x & 0 \leq x \leq \frac{1}{2} \\ 1-x & \frac{1}{2} \leq x \leq 1 \end{array}\right. Write a code to construct the corresponding Bernstein polynomials and use

it to estimate the rate of convergence of B,(f) to ƒ.

Fig: 1

Fig: 2

Fig: 3