Question: Given f ( x ) , xin [ 0 , 1 ] , write code IN PYTHON to find a polynomial p n ( x

Given f(x),xin[0,1], write code IN PYTHON to find a polynomial pn(x) such that ||f(x)-
pn(x)||2(the 2-norm for a function in 0,1) is minimized. Test your code with
f1=exp(x),
f2=sin(x).
Test with different n and draw the curve for f(x)-pn(x).
Given f ( x ) , xin [ 0 , 1 ] , write code IN

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!