Vous êtes sur la page 1sur 6

in this part, you should

explain which formula is


more accurate and why

%Todd Moreno
%HW 1: Problem 1.9
%Part a
p1 = vpa(pi,4);
A1 = 4*p1*vpa(6370^2,4)
%Part b
A2 = 4*p1*vpa(6371^2,4)
%Part c
da = 8*p1*vpa(6370,4)*1
%Part d
p2 = vpa(pi,6);
A3 = 4*p2*vpa(6370^2,6)
A4 = 4*p2*vpa(6371^2,6)
results?

%HW
a =
b =
c =

1: Problem 1.22
1.22;
3.34;
2.28;

%Part a
Disc1 = vpa(b^2,3) - vpa(4*a*c,3)
%Part b
Disc2 = b^2 - 4*a*c
%Part c
RelErr = (Disc1 - Disc2)/Disc2

Vous aimerez peut-être aussi