% Example 1_2:  Explore how the surface area of a sphere

% changes with an increase in the radius.

% this uses the approximation formula 8*pi*r*deltaR



r= input('Enter radius r in miles: ');

delta= input('Enter delta r in inches: ');

deltaMiles = delta/12/5280;



A= 4*pi*r^2;

newA= 4*pi*(r+deltaMiles)^2; 

incr= newA - A; 

fprintf('Increase in area (mile^2): %f.\n', incr);



incr = 8*pi*r*deltaMiles;

fprintf('Increase in area (mile^2) using approx. formula: %f.\n', incr);



