Question: Code up a method in Python language that computes the Bernstein polynomial (where ) for any and any callable function (can use lambda x: ).
Code up a method in Python language that computes the Bernstein polynomial
(where
) for any
and any callable function
(can use lambda x: ). Use your code to reproduce the plots in Figure 9.2 below:

Bnf f n=4 n=10 0.6 0.4- 0.2 0.0 A ALA ^^ n=50 n=200 0.00 0.25 0.50 0.75 1.00 Figure 9.2. Bernstein polynomial approximations (plotted in black) of the function f(x) = x2 sin(27x + ) (plotted in red), for n = 4, 10, 50, and 200, respectively. This is not a very good approximation unless n is large
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
