You are on page 1of 5

NAME: Ananyaa Gupta

20BCT0177
SLOT: L3+L4
MAT1011
DATE: 28-12-20

TITLE
EXPERIMENT-4A
Maxima and Minima of functions of two variables

Aim:
1. Find maxima and minima for the function f(x; y) = 𝑥 + 𝑦 − 𝑥 − 𝑦 + 1

Mathematical Background:

Definition. A point (a, b) in the domain of f(x, y) is called a critical point of f if fx(a, b) = 0 and fy(a, b) = 0,
or if one or both partial derivatives do not exist at (a, b).

Theorem. If f has a relative extremum at (a, b), and if the first-order derivatives of f exist at this point, then
fx(a, b) = 0 and fy(a, b) = 0

The second partials test Theorem. Let f(x, y) have continuous second-order partial derivatives in some disc
centred at a critical point (a, b), and let D = fxx(a, b)fyy(a, b) − fxy(a, b) 2
1. If D > 0 and fxx(a, b) > 0, then f has a relative minimum at (a, b).
2. If D > 0 and fxx(a, b) < 0, then f has a relative maximum at (a, b).
3. If D < 0, then f has a saddle point at(a, b).
4. If D = 0, then no conclusion can be drawn
MATLAB CODE:
clc
close all
clear
syms x y;
f=input("enter function in x and y");
fx=diff(f,x);
fy=diff(f,y);
fxx=diff(fx,x);
fxy=diff(fx,y);
fyy=diff(fy,y);
eqns=[fx==0,fy==0];
[a,b]=solve(eqns,[x y]);
ezsurf(f);
hold on
for i=1:numel(a)
funval=subs(f,[x y],[a(i) b(i)]);
fxx1=subs(fxx,[x y],[a(i) b(i)]);
fxy1=subs(fxy,[x y],[a(i) b(i)]);
fyy1=subs(fyy,[x y],[a(i) b(i)]);
if fxx1*fyy1-fxy1*fxy1>0 && fxx1<0
hold on
out="["+string(a(i))+","+string(b(i))+"]"+" is point of maximum";
plot3(a(i),b(i),funval,'*c','MarkerSize',10);
disp(out)
elseif fxx1*fyy1-fxy1*fxy1>0 && fxx1>0
hold on
out="["+string(a(i))+","+string(b(i))+"]"+" is point of minimum";
plot3(a(i),b(i),funval,'+c','MarkerSize',10);
disp(out)
elseif fxx1*fyy1-fxy1*fxy1<0
hold on
out="["+string(a(i))+","+string(b(i))+"]"+" is a saddle point";
plot3(a(i),b(i),funval,'oc','MarkerSize',10);
disp(out)
elseif fxx1*fyy1-fxy1*fxy1==0
hold on
out="["+string(a(i))+","+string(b(i))+"]"+"Further investigation
required";
plot3(a(i),b(i),funval,'xc','MarkerSize',10);
disp(out)
end
end
hold off
OUTPUT:

CONCLUSION:
The following outputs were noted.
[0,0] is point of maximum
[-2^(1/2)/2,-2^(1/2)/2] is point of minimum
[2^(1/2)/2,-2^(1/2)/2] is point of minimum
[-2^(1/2)/2,2^(1/2)/2] is point of minimum
[2^(1/2)/2,2^(1/2)/2] is point of minimum
[-2^(1/2)/2,0] is a saddle point
[2^(1/2)/2,0] is a saddle point
[0,-2^(1/2)/2] is a saddle point
[0,2^(1/2)/2] is a saddle point
EXPERIMENT 4B:
DOUBLE INTEGRATION AND CHANGE OF ORDER OF INTEGRATION
AIM:
1. Find the volume of the solid S that is bounded by the elliptic paraboloid x2 + 2y2 + z = 16the
planes x = 2 and y = 2 , and the three coordinate planes.

MATHEMATICAL BACKGROUND:
MATLAB:
%Double Integration Evaluation dxdy
clc
clear all
close all
syms x y z;
f=input("Enter function in x and y");
xl=input("Enter limits of x");
yl=input("Enter limits of y");
I=int(int(f,x,xl(1),xl(2)),y,yl(1),yl(2));
disp(I);
viewSolid(z,0+0*x+0*y,f,y,0*x+yl(1),0*x+yl(2),x,xl(1),xl(2));

OUTPUT:

Conclusion:
The volume of elliptic paraboloid is observed to be 48 cubic unit.

You might also like