Answer:
a = 1:5
b = 1:50
c = 1:5000
Explanation: the file script will be.
format long
% Part (a) n=1:5;
an=1./n.^2;
Sa=sum(an)
pi_sq_ov6=pi^2/6
% Part (b) n=1:50;
an=1./n.^2;
Sb=sum(an)
pi_sq_ov6=pi^2/6
% Part (c)
n=1:5000;
an=1./n.^2;
Sc=sum(an)
pi_sq_ov6=pi^2/6
Finding each values in the above, the command window will have the following values.
Command Window:
Sa = 1.463611111111111
pi_sq_ov6 = 1.644934066848226
Sb = 1.625132733621529
pi_sq_ov6 =1.644934066848226
Sc = 1.644734086846901
pi_sq_ov6 = 1.644934066848226