
Exercise 30. Consider the cone z = x
2
+ y
2
p
. The level curves o f this fu nction is similar to the paraboloid
z = x
2
+ y
2
, however, these are two different surfaces. What is the curve on the s urface for y = 0? Draw the curve s
for y = ¡1; 0; 1.
Exercise 31. We aim to draw the project ion of the circle x
2
+ y
2
= 1 on the upper s urface of the cylinder
x
2
+ z
2
= 1. As we know, the given circle can be parametrized as C(t) = (cos(t); sin(t)) f or t 2[0; 2π]. To project
on the cylinder, we need the z-compone nt (height) of this parametric curve. Since z = 2 ¡x
2
p
on the upper
surface, the height of the curve i s z = 2 ¡cos
2
(t)
p
. The followi ng code in Matlab generates this figu re:
[t,s]=meshgrid(-pi:pi/40:pi);
x=sqrt(2)*cos(t); z=sqrt(2)*sin (t); y=s;
surf(x,y,z,FaceAlpha=1), shadin g interp, axis equal
camlight
t=0:0.01:2*pi;
xt=cos(t);yt=sin(t);zt=sqrt(2-xt.^2);
hold on
plot3(xt,yt,zt,LineWidth=2,Color='r')
xlabel('$x$', 'Interpreter','latex',FontSize=14)
ylabel('$y$', 'Interpreter','latex',FontSize=14)
title('$x^2+y^2=2$', 'Interpreter','latex',FontSize=14)
Exercise 32. Find the projectio n of the lines x = 0 and y = 0 on the surface of the function z = x
2
¡ y
2
. Write
a code i n Matlab that depicts this projection.
Exercise 33. Here we review some simple commads to generate surfaes in R
2
and connect them with th e
associated images in R
2
. Consider the function ρ(x; y) = 1 + sin (πx) sin(πy). Run the following code in Matlab
that gene rate the surface of the function
x=-1:0.01:1;
y=x';
z=1+sin(pi*x).*sin(pi*y);
surf(x,y,z), shading interp
xlabel('$x$','interpreter','latex','fontsize',10)
ylabel('$y$','interpreter','latex','fontsize',10)
zlabel('$z$','interpreter','latex','fontsize',10)
It generate the figure shown be low
a) M odify the code to represent the surface in the domain [¡2; 2] ×[¡2; 2].
b) change the surf to surfc and run the command. It gene rate the surf ace and the level curves
26