# Homework 2 - Norbert Shao Math 104a Homework 2 2(a%Lebesgue...

• Homework Help
• 16
• 100% (4) 4 out of 4 people found this document helpful

This preview shows page 1 - 6 out of 16 pages.

Norbert Shao 2/1/17 Math 104a Homework 2 2(a) %Lebesgue function function LF=Lebesgue_function(x,z) %x are interpolating nodes and z are evaluating points n=length(x); L=ones(1,n); for i = 1:n for j = 1:nh7 if j~=i L(i) = L(i)*((z - x(j))/(x(j)-x(i))); end end end LF=sumabs(L); end (b) clear; clc; n=4; x=zeros(1,n+1); for j=1:n+1 x(j)=-1+(j-1)*(2/n); end m=1000; LF=zeros(1,m+1); z=zeros(1,m+1); for k=1:m+1 z(k)=-1+(k-1)*(2/m); LF(k)=Lebesgue_function(x,z(k)); end plot(z,LF); xlabel ( 'points' ); ylabel ( 'Lebesgue function' ); title( 'n=4' ) LC=norm(LF,Inf); disp( 'Lebesgue constant is' ); disp(LC)

Subscribe to view the full document.

Norbert Shao 2/1/17 Math 104a -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 1 1.5 2 2.5 points Lebesgue function n=4 Lebesgue constant is 2.2078 for n=4 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 0 5 10 15 20 25 30 points Lebesgue function n=10 Lebesgue constant is 29.8981 for n=10
Norbert Shao 2/1/17 Math 104a -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 0 2000 4000 6000 8000 10000 12000 points Lebesgue function n=20 Lebesgue constant is 10979 for n=20 (C) Substitute function for j=1:n+1 x(j)=-1+(j-1)*(2/n); end to x(j)=cos((j-1)*pi/n)

Subscribe to view the full document.

Norbert Shao 2/1/17 Math 104a -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 points Lebesgue f unction n=4 Lebesgue constant is1.7988 for n=4 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 1 1.5 2 2.5 points Lebesgue f unction n=10 Lebesgue constant is 2.4210 for n=10
Norbert Shao 2/1/17 Math 104a -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3 points Lebesgue f unction n=20 Lebesgue constant is 2.8678 for n=20 The behavior of Lebesgue constant of equidistributed points increase much faster than that of chebyshev points as n increases.

Subscribe to view the full document.

• Fall '08
• Staff
• Math, Norbert Shao, Henri Lebesgue, Lebesgue constant

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern