0% found this document useful (0 votes)
50 views30 pages

21MAT117 11 MIS2 GradientAndItsApplications

This document appears to be a series of lecture slides on multivariable calculus topics taught by Dr. Sarada Jayan. The slides cover concepts such as contour plots, surface plots, partial derivatives, gradients, divergence, curl, and applications of these concepts including finding forces and heat flow. Homework problems are presented involving directional derivatives, Laplacians, Hessians, and determining directions of maximum/minimum change. Examples are shown of how to plot gradients and contour lines using MATLAB.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views30 pages

21MAT117 11 MIS2 GradientAndItsApplications

This document appears to be a series of lecture slides on multivariable calculus topics taught by Dr. Sarada Jayan. The slides cover concepts such as contour plots, surface plots, partial derivatives, gradients, divergence, curl, and applications of these concepts including finding forces and heat flow. Homework problems are presented involving directional derivatives, Laplacians, Hessians, and determining directions of maximum/minimum change. Examples are shown of how to plot gradients and contour lines using MATLAB.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

21MAT117

MATHEMATICS FOR
INTELLIGENT SYSTEMS-2

Dr. Sarada Jayan


9448455760
6364333760

5/12/2022 Sarada Jayan 1


CALCULUS

5/12/2022 Sarada Jayan 2


Multivariable functions

5/12/2022 Sarada Jayan 3


Understanding two-variable functions using contours/level sets

5/12/2022 Sarada Jayan 4


Contour Plots/Level curves for two variable functions

5/12/2022 Sarada Jayan 5


Relations between Contour Plots/Level curves and surfaces

5/12/2022 Sarada Jayan 6


Surface plots, Contour plots
Surface plot: Contour plot:
x = -50:50; y=x; x = -50:50; y=x;
[x1,x2] = meshgrid(x,y); [x1,x2] = meshgrid(x,y);
Z = (x1-3).^2 + (x2-5).^2; Z = (x1-3).^2 + (x2-5).^2;
surf(x,y,Z); contour(x,y,Z);
xlabel('x'); ylabel('y'); xlabel('x'); ylabel('y');
zlabel('z'); zlabel('z');

Both surface plot and contour plot in one figure:


x = -50:50; y=x;
[x1,x2] = meshgrid(x,y);
Z = (x1-3).^2 + (x2-5).^2;
surfc(x,y,Z);%shading interp
xlabel('x'); ylabel('y'); zlabel('z');

5/12/2022 Sarada Jayan 7


Contour plot of f(x,y)=exp(-x^2-y^2)
x = -2:0.2:2;
y = -2:0.2:3;
[X,Y] = meshgrid(x,y);
Z = X.*exp(-X.^2-Y.^2);
contour(X,Y,Z,'ShowText','on')

5/12/2022 Sarada Jayan 8


Vector Differential operator, Partial Derivatives

5/12/2022 Sarada Jayan 9


Partial Derivatives

5/12/2022 Sarada Jayan 10


Gradient of a scalar function

5/12/2022 Sarada Jayan 11


Gradient of a scalar function

5/12/2022 Sarada Jayan 12


Divergence and Curl of vector functions

5/12/2022 Sarada Jayan 13


Homework

5/12/2022 Sarada Jayan 14


Homework

5/12/2022 Sarada Jayan 15


How to plot gradient vectors in MATLAB using ‘quiver’
% plot of surface, contour and gradient vectors of a scalar
function z
[x,y] = meshgrid(-2:.2:2,-2:.2:2);
z = x.^2 + y.^2;
figure
surf(x,y,z);
figure
[px,py] = gradient(z);
contour(x,y,z,'ShowText','on'), hold on
quiver(x,y,px,py), hold off, axis image

5/12/2022 Sarada Jayan 16


How to plot gradient vectors in MATLAB using ‘quiver’
% plot of surface, contour and gradient vectors of a scalar
function z
[x,y] = meshgrid(-2:.2:2,-2:.2:2);
z = x .* exp(-x.^2 - y.^2);
figure
surf(x,y,z);
figure
[px,py] = gradient(z);
contour(x,y,z,'ShowText','on'), hold on
quiver(x,y,px,py), hold off, axis image

5/12/2022 Sarada Jayan 17


Applications of Gradient of a scalar function

5/12/2022 Sarada Jayan 18


Applications of Gradient of a scalar function

5/12/2022 Sarada Jayan 19


Applications of Gradient of a scalar function

5/12/2022 Sarada Jayan 20


Applications of Gradient of a scalar function

5/12/2022 Sarada Jayan 21


Home Work
1. Find the force in the following electrostatic fields f at the given
point P.
a.
b.
c.
d.
e.

2. Find the direction of heat flow in the following temperature


fields from the given points, P.

a.
b.

5/12/2022 Sarada Jayan 22


Directional derivative of a function using gradient

5/12/2022 Sarada Jayan 23


Applications of Gradient of a scalar function

5/12/2022 Sarada Jayan 24


Applications of Gradient of a scalar function to find normal to a surface

5/12/2022 Sarada Jayan 25


Applications of Gradient of a scalar function to find normal to a surface

5/12/2022 Sarada Jayan 26


Laplacian of a function

5/12/2022 Sarada Jayan 27


Hessian matrix

5/12/2022 Sarada Jayan 28


Home work:
1. Find the directional derivative of the given function at the given point in the indicated
direction.
a. f(x, y) = tan−1 y/x ; 2, −2) ; b = iҭ − 3j.Ƹ
b. f x, y = x 2 tan y ; 1/2, π/3) ; in the direction of the negative X axis.
c. f x, y = x 2 y + 2y 2 z; −2,2,1) ; in the direction of the negative Z axis.
d. f(x, y) = (xy + 2)2 ; 3,2 ; in the direction of the vector [5,3].

2. Find the directional derivative of 𝑓(𝑥, 𝑦, 𝑧) = 𝑥 2 𝑦 2 𝑧 2 at the point(1,1, −1) in the direction
of the tangent to the curve,𝑟Ԧ 𝑡 = 𝑒 𝑡 𝑖Ƹ + 1 + 2 𝑠𝑖𝑛 𝑡 𝑗Ƹ + 𝑡 − 𝑐𝑜𝑠 𝑡 𝑘෠ 𝑤ℎ𝑒𝑟𝑒 − 1 ≤ 𝑡 ≤ 1.

3. Find the directional derivative of 𝛻 ⋅ 𝛻𝜑 at the point(1, −2,1) in the direction of the
outward normal to the surface 𝑥𝑦 2 𝑧 = 3𝑥 + 𝑧 2 , where 𝜑 = 2𝑥 3 𝑦 2 𝑧 4 .

4. Is there a direction 𝑢ො in which the rate of change of 𝑓(𝑥, 𝑦) = 𝑥 2 − 3𝑥𝑦 + 4𝑦 2 at 𝑃(1,2)


equal to 14 ?

5. In what direction from (3,1, −2) is the directional derivative of 𝑓(𝑥, 𝑦, 𝑧) = 𝑥 2 𝑦 2 𝑧 4


maximum?

5/12/2022 Sarada Jayan 29


(f1,(1x), y )

Home work:

ො of the cone of revolution, 𝑧 2 = 4 𝑥 2 + 𝑦 2 at 𝑃(1,0,2).


6. Find the unit normal vector 𝑢,

7. Find the the unit normal vector for the following surfaces at the points indicated:
(i) x 3 + y 3 + z 3 − 3xyz = 0 at 1,1,1
(ii) x 2 + y 2 + z 2 = 9 at 2,1,2

𝑥2 𝑦2
8. Find the directions in which 𝑓 𝑥, 𝑦 = + 2 2
(i) increases most rapidly from 1,1
(ii) decreases most rapidly from 1,1
(iii) has a zero change in𝑓 𝑥, 𝑦 from 1,1

5/12/2022 Sarada Jayan 30

You might also like