Department of Mathematics

 MTH243 (Calculus for Functions of Several Variables) SAGE. Chapter 12: Functions of Several Variables Vladimir A. Dobrushkin,Lippitt Hall 202C, 874-5095,dobrush@uri.edu In this course we will use Sage computer algebra system (CAS), which is a free software. The Sage projects are created to help you learn new concepts. Sage is very useful in visualizing graphs and surfaces in three dimensions. Matlab (commercial software) is also available at engineeering labs. Its free version is called Octave. The university has a license for computer algebra system Mathematica, so it is free to use for its students. A student can also use free CASs: SymPy (based on Python), or Maxima.

## Section 12.6. Limits and Continuity

Example 1. A particular case of ellipsoid is a ball:
ContourPlot3D[ 1 == x^2 + y^2 + z^2, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]
or
clc
clear
figure
fi0=0;
fi1=360;
R=1;
R0=0;
R1=1;
M=30;
dfi=(fi1-fi0)/M;
dR=(R1-R0)/M;
fi=[fi0:dfi:fi1];
aa=pi/180;
theta0=0;
theta1=360;
dtheta=(theta1-theta0)/M;
theta=[theta0:dtheta:theta1];
t=0;
tt=-1;
for j=1:M/2+1
tt=tt+1;
t=tt;
for i=1:M+1
t=t+1;
b(t)=t;
x(i)=R*sin(aa*fi(i))*cos(aa*theta(j));
y(i)=R*sin(aa*fi(i))*sin(aa*theta(j));
z(i)=R*cos(aa*fi(i));
%pause
v(1:6,b(t))=[ x(i) y(i) z(i) fi(i) theta(j) b(t)];
end
plot3(x,y,z)
axis equal
grid on
hold on

end
title('BONUS 12.69')
t=0;
tt=-1;
for j=1:M/2+1
tt=tt+1;
t=tt;
end
for i=1:M+1
t=t+1;
bb(t)=t;
xx(i)=R*sin(aa*fi(j))*cos(aa*theta(i));
yy(i)=R*sin(aa*fi(j))*sin(aa*theta(i));
zz(i)=R*cos(aa*fi(j));
%pause
ang=45;
RR = rotx(ang);
vv = [xx(i);yy(i);zz(i)];
%pause
yyy = RR*vv;
vvv(1:6,bb(t))=[ yyy(1) yyy(2) yyy(3) fi(j) theta(i) bb(t)];
plot3(xx,yy,zz)
plot3(vvv(1,bb(t)),vvv(2,bb(t)),vvv(3,bb(t)),'r*')
axis equal
grid on
hold on

end