You are on page 1of 8

GRAPHS OF DOUBLE

INTEGRALS.
Problem 2
Problem 1.

Result of the integral:

𝐼 = 22.6667

graph in MATLAB

Code in Matlab:
syms x y
f=(3*x)+(2*y);
g1=ezsurf(f,[-0.5,1.5,-0.5,2.5]);
set(g1,'Edgecolor','red')
grid on
xlabel('Eje X')
ylabel('Eje Y')
title('Integral 1')
zlabel('Eje Z')
zlim([-0.5 10])
xlim([-0.5 1.5])
ylim([-0.5 2.5])
hold on
[u,v]=meshgrid(linspace(0,1,100),linspace(0,2,100));
v(v<0)=NaN;
v(v>1+u)=NaN;
g2=surf(u,v,zeros(100,100));
set(g2,'Edgecolor','green');
hold off
integrando=@(x,y) 3*x+2*y;
ymax=@(x) 1+x;
ymin= 0;
I=quad2d(integrando,0,2,ymin,ymax)
Result of the integral:

𝐼 = 5.8667

graph in MATLAB

Code in Matlab:
Problem 4

Result of the integral:

graph in MATLAB

Code in Matlab:
clc clear
all syms
x y
f=4*x;
g1=ezsurf(f,[-0.5,3.5,-0.5,4.5]);
set(g1,'Edgecolor','red') grid on
xlabel('Eje X') ylabel('Eje Y')
title('Ejercicio 2') zlabel('Eje
Z') zlim([-0.5 10]) xlim([-0.5
3.5]) ylim([-0.5 4.5]) hold on
[u,v]=meshgrid(linspace(0,1,100),linspace(0,4,100));
v(v<0)=NaN; v(v>sqrt(9-u.^2))=NaN;
g2=surf(u,v,zeros(100,100));
set(g2,'Edgecolor','blue'); hold off

Result of the integral:

𝐼 =5.4
Problem 5
graph in MATLAB

Code in Matlab:
clc clear all syms x y f=(x-y);
g1=ezsurf(f,[-0.5,2.0,-0.5,3.5]);
set(g1,'Edgecolor','red') grid on
xlabel('Eje X') ylabel('Eje Y')
title('Ejercicio 2') zlabel('Eje
Z') zlim([-0.5 10]) xlim([-0.5
2.0]) ylim([-0.5 3.5]) hold on
[u,v]=meshgrid(linspace(0,2,100),linspace(0,4,100));
v(v<u.^2/4)=NaN; v(v>(4+u)/2)=NaN;
g2=surf(u,v,zeros(100,100));
set(g2,'Edgecolor','blue'); hold off

Result of the integral:


Problem 6
graph in MATLAB

Code in Matlab:
clc clear all syms x y
f=sqrt(x.^2+y.^2); g1=ezsurf(f,[-
0.5,2.5,-0.5,3.5]);
set(g1,'Edgecolor','red') grid on
xlabel('Eje X') ylabel('Eje Y')
title('Ejercicio 5') zlabel('Eje
Z') zlim([-0.5 10]) xlim([-0.5
2.5]) ylim([-0.5 3.5]) hold on
[u,v]=meshgrid(linspace(0,2,100),linspace(0,4,100));
v(v<0)=NaN; v(v>u)=NaN; g2=surf(u,v,zeros(100,100));
set(g2,'Edgecolor','blue'); hold off

Result of the integral:

𝐼 = 100.53096
Problem 7
graph in MATLAB

Code in Matlab:
clc clear all
syms x y
f=(x.^2+y.^2);
g1=ezsurf(f,[-0.5,2.5,-0.5,4.5]);
set(g1,'Edgecolor','red') grid on
xlabel('Eje X') ylabel('Eje Y')
title('Ejercicio 6') zlabel('Eje
Z') zlim([-0.5 10]) xlim([-0.5
2.5]) ylim([-0.5 4.5]) hold on
[u,v]=meshgrid(linspace(0,2,100),linspace(0,4,100));
v(v<0)=NaN; v(v>sqrt(16-u.^2))=NaN;
g2=surf(u,v,zeros(100,100));
set(g2,'Edgecolor','blue'); hold off

You might also like