Legendre and Chebyshev polynomials are a class of orthogonal polynomials used in
ID: 2258811 • Letter: L
Question
Legendre and Chebyshev polynomials are a class of orthogonal polynomials used in the solution of engineering problems, especially in numerical integration. Consider the Legendre polynomial (693x^6-945x^4+315x^2-15)/48 and the Chebyshev polynomial (32x^6-48x^4+18x^2-1). Find the roots of these polynomials in the range -1.0 x 1.0 to an accuracy of 0.001. Comment on the behaviour of roots.
Stuck on this problem for awhile can you please code it in MATLAB and comment your work
3. Legendre and Chebyshev polynomials are a class of orthogo nal polynomials used in the solution of engineering problems, especially in numerical integration. Consider the Legendre polynomial (693x°-945x*+315x2-15)/48 and the Chebyshev polynomial (32x0-48r4+18x2-1). Find the roots of these polynomials in the range 10 x1.0 to an accuracy of 0.001. Comment on the behaviour of roots. (25 marks)Explanation / Answer
I am using Bisection method for root finding
%%% Matlab code %%%
%%% Legendre polynomial code %%
syms x
f=693*x^6-945*x^4+315*x^2-15;
tol=0.001;
% % % bisection method
disp('Bisection method :');
a=-1;
b=1;
for n=1:100;
l1=subs(f,a);
l2=subs(f,b);
c(n)=(a+b)/2;
l3=subs(f,c(n));
if (n>2)
if (abs( c(n)-c(n-1))< tol)
break;
end
end
if ( l3 < 0 )
a=c(n);
else
b=c(n);
end
end
fprintf('roots of equation is : %f ', c(end) );
OUTPUT:
Bisection method :
roots of equation is : 0.239258
%%% Chebyshev polynomial code %%%
syms x
f=32*x^6-48*x^4+18*x^2-1;
tol=0.001;
% % % bisection method
disp('Bisection method :');
a=-1;
b=1;
for n=1:100;
l1=subs(f,a);
l2=subs(f,b);
c(n)=(a+b)/2;
l3=subs(f,c(n));
if (n>2)
if (abs( c(n)-c(n-1))< tol)
break;
end
end
if ( l3 < 0 )
a=c(n);
else
b=c(n);
end
end
fprintf('roots of eqution is : %f ', c(end) );
OUTPUT:
Bisection method :
roots of eqution is : 0.258789
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.