Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
1 views

Lecture 08 and 09 - Function of Multivariables and Multivariable Calculus

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Lecture 08 and 09 - Function of Multivariables and Multivariable Calculus

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

APSC248 – Engineering Analysis III

Lecture 08&09
Function of Multivariable and Multivariable Calculus

Overall Picture

ü Multivariable functions

ü Level curves

ü Partial derivatives

ü Composite functions and chain differentiation

Part (1): Functions of Several Variables

Many functions depend on more than one independent variable. The function 𝑉 = 𝜋𝑟 ! ℎ

calculates the volume of a right circular cylinder from its radius and height. The function 𝑇 =

𝑓(𝑥, 𝑦, 𝑧) may be used to calculate the temperature distribution on the fins of a motorcycle

engine. In this lecture, we will look at functions of more than one independent variable.

Definition:
Suppose 𝐷 is a set of 𝑛-tuples of real numbers (𝑥" , 𝑥! , … , 𝑥# ). A multivariable function is

given as

𝑤 = 𝑓(𝑥" , 𝑥! , … , 𝑥# )

The set 𝐷 is the function’s domain. The symbol 𝑤 is the dependent variable of ƒ, and ƒ is said

to be a function of the 𝑛 independent variables 𝑥" to 𝑥# .

If we think of function 𝑓 as a representation of certain system, then 𝑥" to 𝑥# are the inputs

to the system, the output of the system is 𝑤.

@Dr. Yang Cao Page 1


APSC248 – Engineering Analysis III

• Function, Equation and System

Definition: A function is a mathematical relationship in which the values of a single

dependent variable are determined by the values of one or more independent variables.

Function means the dependent variable is determined by the independent variable(s). Example

of functions,

𝑦 = 𝑓(𝑥), 𝑧 = 𝑥 ! + 𝑦 ! , 𝑦 = 𝑘𝑥 + 𝑏

So for a function, the single dependent variable is on one side of the equal sign, and the

other side of the equal sign is an expression consisting independent variable(s).

An equation is a mathematical way of looking at the relationship between dependent

variable and the independent variable (s). Equation may contain only one variable, but it must

consist of the expressions that have to be equal on opposite sides of an equal sign.

ü Linear equation: 𝐴𝑥 + 𝐵𝑦 + 𝐶𝑧 = 𝐷 or simple one 𝐴𝑥 + 𝐵𝑦 + 𝐶 = 0

$!% $%
ü Differential equation: 𝑚 $&
+ 𝑏 $& + 𝑘𝑥 = 𝑦

$!' (
ü Nonlinear equation: $& !
+ ) sin 𝜃 = 0 (pendulum motion when there is no force

input except the gravity force)

A system can be described using an equation to illustrate the relationship between input

and output. The objective is to solve the equation for a given input. For example, if the system

is a mass-spring-damper system, we can use a 2nd-order differential equation as a mathematical

$!% $%
description of the system (𝑚 $&
+ 𝑏 $& + 𝑘𝑥 = 𝑦). One may want to know the system response

(𝑥(𝑡)) for a certain input (e.g. 𝑦 = 0, 𝑦 = 𝑢(𝑡) unit step function, or 𝑦 = 𝛿(𝑡) impulse input

etc.).

@Dr. Yang Cao Page 2


APSC248 – Engineering Analysis III

Example:

Ø One can rewrite an equation into a function form. Say you have linear equation
*
5𝑥 + 6𝑦 = 12. Then in function form, 𝑦 = 2 − + 𝑥.

Ø Given a multivariable function, 𝑧 = 𝑓(𝑥, 𝑦). In equation format, it is

𝑧 − 𝑓(𝑥, 𝑦) = 0

Ø Cubic function: 𝑦 = 𝑓(𝑥) = 𝑎𝑥 , + 𝑏𝑥 ! + 𝑐𝑥 + 𝑑

Cubic equation: 𝑎𝑥 , + 𝑏𝑥 ! + 𝑐𝑥 + 𝑑 = 0

Graphical Examples of Function of Two Variables (Surfaces)

Example 1:

𝑧 = 𝑓(𝑥, 𝑦) = −𝑦

This is a plane!

Maple command:
with(plots)
plot3d(-y, x = -2..2, y =-2..2, axes =
boxed)

Matlab:
ezmesh(@(x,y)-y);
view(130, 25);

@Dr. Yang Cao Page 3


APSC248 – Engineering Analysis III

Example 2
Surface: an elliptic paraboloid

𝑧 = 𝑓(𝑥, 𝑦) = 1 − 𝑥 ! − 𝑦 !

Maple command:
with(plots)
plot3d(1-x^2-y^2, x = -2..2, y =-2..2,
axes = framed)

Matlab:
ezmesh(@(x,y)1-x^2-y^2); hold on
view(130, 25);
%ezcontour('1-x^2-y^2');
ezcontourf('1-x^2-y^2');

For the above function, 𝑧 = 𝑓(𝑥, 𝑦) = 1 − 𝑥 ! − 𝑦 !

Ø In 𝑥𝑦-plane, 𝑧 = 0, we have 𝑥 ! + 𝑦 ! = 1; In 𝑥𝑧-plane, 𝑦 = 0, we have 𝑧 = 1 − 𝑥 ! ;

In 𝑦𝑧-plane, 𝑥 = 0, we have 𝑧 = 1 − 𝑦 !

Example 3: Saddle Surface (a hyperbolic paraboloid)

𝑧 = 𝑓(𝑥, 𝑦) = 𝑥 ! − 𝑦 !

A saddle surface is a smooth


surface containing one or more
saddle points.

A saddle point is a point in the


domain of a function that is a
stationary point but not a local
extremum.

@Dr. Yang Cao Page 4


APSC248 – Engineering Analysis III

Example 4: Heart Surface


,
9 9
K𝑥 ! + 𝑦 ! + 𝑧 ! − 1N − 𝑥 ! 𝑧 , − 𝑦 ! 𝑧 , = 0
4 80

Matlab method 1:
[x,y,z]=meshgrid(-1.5:0.1:1.5);
val=(x.^2+(9/4)*y.^2+z.^2-1).^3-
x.^2.*z.^3-(9/80)*y.^2.*z.^3;
[f,v]=isosurface(x,y,z,val,0);
p=patch('Faces',f,'Vertices',v,'CData',v(:,3),
'FaceColor','w','EdgeColor','flat');
isonormals(x,y,z,val,p);
view([45 95 45])
grid on
axis equal

Matlab method 2:
syms x y z
range = [-2,2,-2,2,-2, 2];
ezimplot3('(x^2+4/9*y^2+z^2-1)^3-
x^2*z^3-9/80*y^2*z^3');
Contour Plot for function of two variables

It will be difficult to visualize 3D plot without a computer software. Contour plot is

another way of visualizing a surface.

Given a function of two variables, 𝑧 = 𝑓(𝑥, 𝑦), contour plot is basically a cluster of plot of

“level curves” of 𝑓(𝑥, 𝑦), i.e.,

𝑓(𝑥, 𝑦) = 𝐶, 𝐶 is a constant

It shows all the points where 𝑓(𝑥, 𝑦) = 𝐶 and 𝐶 is chosen at a regular interval (e.g., 𝐶 =

1,2,3,4, … or 𝐶 = 2,4,6,8 … etc.).

Equivalently, we can say that contour plot is generated by slicing the 3D-surface (the 3D

surface is 𝑧 = 𝑓(𝑥, 𝑦)) with horizontal plane 𝑧 = 𝐶 at different values of 𝐶.

@Dr. Yang Cao Page 5


APSC248 – Engineering Analysis III

Contour example 1:
𝑧 = 𝑓 (𝑥, 𝑦) = −𝑦

𝑓 = −1

𝑓 = 1.5

This is an evenly spaced contour. The contour plot shows that the surface has constant slope as

long as one is walking in one direction.

contourplot(-y, x = -2 .. 2, y = -2 .. 2, coloring = [red, blue])

Contour example 2:

𝑧 = 𝑓 (𝑥, 𝑦) = 1 − (𝑥 ! + 𝑦 ! )

Maple command:
contourplot(1-x^2-y^2, x = -8 .. 8, y = -8 .. 8, coloring = [red, blue], thickness = 2)

@Dr. Yang Cao Page 6


APSC248 – Engineering Analysis III

Contour example 3:
! ./ !
𝑧 = 𝑥𝑒 -%

0.5

0.2
0.4 0.3
0 -0.2 0.1
-0.4
-0.3 0
-0.1

-0.5
2
2
0 1
0
-1
-2 -2

Matlab Code:

v = -2:0.1:2;
[x,y] = meshgrid(v);
z = x .* exp(-x.^2 - y.^2);
mesh(x,y,z);
hidden off; %to make it transparent
hold on;
C = contour(x,y,z,'linewidth',2, 'color','b');
%C = contour3(x,y,z);
clabel(C); %label the contour

@Dr. Yang Cao Page 7


APSC248 – Engineering Analysis III

Contour example 4: 𝑧 = 𝑥 ! − 𝑦 !

2
-4 -3 -2 -1 0 1 2 3
4
0

4
-2 3 2 1 0 -1 -2 -3 -4

-4
2
2
0 1
0
-1
-2 -2

Contour example 5:

@Dr. Yang Cao Page 8


APSC248 – Engineering Analysis III

Comments:

• Given 𝑧 = 𝑓(𝑥, 𝑦).

ü A plot of 𝑧 = 𝑓(𝑥, 𝑦) gives a surface graph which is basically a set of

points with coordinates W𝑥, 𝑦, 𝑓(𝑥, 𝑦)X.

ü A plot of 𝑓(𝑥, 𝑦) = 𝐶 gives “level curves”.

• How contours space out will tell us how steep things are (see contour example 3).

The contour interval of a contour map is the difference in elevation between

successive contour curves.

• Contour plot can also tell us whether 𝑓(𝑥, 𝑦) increases or decreases when changing

𝑥 or 𝑦. However, you need to label the values of 𝐶 for each contour. Maple does

not label “𝑓(𝑥, 𝑦) = 𝐶” on its contour plot automatically.

ü From contour example 1, we can see that the change of 𝑥 does not affect

𝑓(𝑥, 𝑦). The increase of 𝑦 causes a decrease of 𝑓(𝑥, 𝑦).

• Contour plot gives only qualitative analysis. If we need to know how fast 𝑓(𝑥, 𝑦)

changes with respect to change of 𝑥 or 𝑦, then we need to use “partial derivative”

to find the rate of change.

Function of three variables

Given a function of three variables, 𝑤 = 𝑓(𝑥, 𝑦, 𝑧). It is not possible to graph this function.

However a graph of 𝑓(𝑥, 𝑦, 𝑧) = 𝐶 is possible. And 𝑓(𝑥, 𝑦, 𝑧) = 𝐶 is called “level surface” of 𝑓.

For example, level surfaces of function 𝑓(𝑥, 𝑦, 𝑧) = Y𝑥 ! + 𝑦 ! + 𝑧 ! gives are concentric

spheres.

@Dr. Yang Cao Page 9


APSC248 – Engineering Analysis III

Part (2): Multi-variable Calculus

(1) Partial Derivatives

Recall that for functions of one variable, 𝑓(𝑥). The derivative of 𝑓(𝑥) is defined as

𝑑𝑓 𝑓(𝑥 + Δ𝑥) − 𝑓(𝑥)


𝑓 0 (𝑥) = = lim
𝑑𝑥 1%→3 Δ𝑥

This can also be said as “rate of change with respect to change of 𝑥”.

Approximation formula at 𝑥3 :

𝑓(𝑥) ≈ 𝑓(𝑥3 ) + 𝑓 0 (𝑥3 )(𝑥 − 𝑥3 )

Given a multi-variable function, say 𝑓(𝑥, 𝑦, 𝑧), the rate of change of 𝑓(𝑥, 𝑦, 𝑧) with respect to 𝑥-

direction is given by “partial derivative” with respect to 𝒙. The definition is

𝜕𝑓 𝑓(𝑥 + Δ𝑥, 𝑦, 𝑧) − 𝑓(𝑥, 𝑦, 𝑧)


= lim
𝜕𝑥 1%→3 Δ𝑥

ü “𝜕”: partial (a curly 𝑑, not straight 𝑑)

45
ü No changes in 𝑦, 𝑧 directions. 𝑦 and 𝑧 are treated as constant when computing 4%.

45
ü A short-hand notation for partial derivative is 𝑓% = 4%.

45
ü 4%
is a function of 𝑥, 𝑦, and 𝑧.

ü The calculus of several variables is basically single-variable calculus applied to several

variables one at a time. When we hold all but one of the independent variables of a

function constant and differentiate with respect to that one variable, we get a “partial”

derivative.

Similarly,

𝜕𝑓 𝑓(𝑥, 𝑦 + Δ𝑦, 𝑧) − 𝑓(𝑥, 𝑦, 𝑧)


= lim
𝜕𝑦 1%→3 Δ𝑦

@Dr. Yang Cao Page 10


APSC248 – Engineering Analysis III

𝜕𝑓 𝑓(𝑥, 𝑦, 𝑧 + Δ𝑧) − 𝑓(𝑥, 𝑦, 𝑧)


= lim
𝜕𝑧 1%→3 Δ𝑧

Higher-order partial derivatives can be calculated using

𝜕!𝑓 𝜕 𝜕𝑓
!
= K N = 𝑓%% = (𝑓% )%
𝜕𝑥 𝜕𝑥 𝜕𝑥

𝜕!𝑓 𝜕 𝜕𝑓
= K N = 𝑓%/ = (𝑓% )/
𝜕𝑦𝜕𝑥 𝜕𝑦 𝜕𝑥

𝜕 𝜕 𝜕𝑓
𝑓%/6 = W𝑓%/ X6 = W(𝑓% )/ X6 = ` K Na
𝜕𝑧 𝜕𝑦 𝜕𝑥

Example 1: 𝑓(𝑥, 𝑦, 𝑧) = 𝑥 ! (𝑦 + 2𝑧)

𝜕 ! 𝜕
𝑓% = (𝑥 (𝑦 + 2𝑧)) = (𝑦 + 2𝑧) (𝑥 ! ) = 2𝑥(𝑦 + 2𝑧)
𝜕𝑥 𝜕𝑥

𝑓/ = 𝑥 ! (1 + 0) = 𝑥 !

𝑓6 = 𝑥 ! (0 + 2) = 2𝑥 !

"#
Example 2: 𝑓(𝑥, 𝑦) = 𝑦 sin(𝑥𝑦), find "$.

𝑓(𝑥, 𝑦) = 𝑢(𝑥, 𝑦)𝑣(𝑥, 𝑦)

We’ll use the product rule.

𝜕𝑓 𝜕𝑣 𝜕𝑢
=𝑢 + 𝑣
𝜕𝑦 𝜕𝑦 𝜕𝑦

Then

𝜕𝑓 𝜕
= (𝑦 sin(𝑥𝑦))
𝜕𝑦 𝜕𝑦

@Dr. Yang Cao Page 11


APSC248 – Engineering Analysis III

𝜕 𝜕
=𝑦 (sin(𝑥𝑦)) + sin(𝑥𝑦) (𝑦)
𝜕𝑦 𝜕𝑦

𝜕
= 𝑦 cos(𝑥𝑦) (𝑥𝑦) + sin(𝑥𝑦)
𝜕𝑦

= 𝑥𝑦 cos 𝑥𝑦 + sin 𝑥𝑦

45 45
• Geometric meaning of 4%c or 4/c for a surface 𝑧 = 𝑓(𝑥, 𝑦)
(%" ,/" ) (%" ,/" )

Definition:

𝜕𝑓 𝑑 𝑓(𝑥3 + Δ𝑥, 𝑦3 ) − 𝑓(𝑥3 , 𝑦3 )


d = 𝑓(𝑥, 𝑦3 )d = lim
𝜕𝑥 (%" ,/") 𝑑𝑥 (%" ,/" ) 1%→3 Δ𝑥

𝑓(𝑥3 + ℎ, 𝑦3 ) − 𝑓(𝑥3 , 𝑦3 )
= lim
:→3 ℎ

ℎ = Δ𝑥

@Dr. Yang Cao Page 12


APSC248 – Engineering Analysis III

If (𝑥3 , 𝑦3 ) is in the domain of function 𝑓(𝑥, 𝑦), then the coordinate of the point 𝑃 on the

surface 𝑧 = 𝑓(𝑥, 𝑦) is 𝑃 W𝑥3 , 𝑦3 , 𝑓(𝑥3 , 𝑦3 )X. There are infinite number of tangent lines to the

surface at this point 𝑃.

Suppose that there is someone walking back and forth along the line 𝑦 = 𝑦3 in the 𝑥𝑦-

plane (keeping 𝑦 constant and changing 𝑥). The corresponding movement of point 𝑃 on the

surface will be a curve 𝑧 = 𝑓(𝑥, 𝑦3 ), which is essentially the intersection of the plane 𝑦 = 𝑦3 and

surface 𝑧 = 𝑓(𝑥, 𝑦).

45
c
4% (%" ,/" )
= 𝑓% (𝑥3 , 𝑦3 ) is the slope of the tangent line to the curve intersected by the

plane 𝑦 = 𝑦3 and surface 𝑧 = 𝑓(𝑥, 𝑦) , and at 𝑥 = 𝑥3 . Similar geometric meaning can be

45
obtained for 4/c . The following figure shows the two tangent lines to the surface at point
(%" ,/" )

𝑃 W𝑥3 , 𝑦3 , 𝑓(𝑥3 , 𝑦3 )X. Note that a plane can be determined by these two tangent lines which is

the tangent plane to the surface at point 𝑃 W𝑥3 , 𝑦3 , 𝑓(𝑥3 , 𝑦3 )X.

@Dr. Yang Cao Page 13


APSC248 – Engineering Analysis III

𝜕 𝜕𝑓 𝜕!𝑓
K N = ! = 𝑓%%
𝜕𝑓 𝜕𝑥 𝜕𝑥 𝜕𝑥
𝜕𝑥 𝜕 𝜕𝑓 𝜕!𝑓
K N= = 𝑓%/
𝜕𝑦 𝜕𝑥 𝜕𝑦𝜕𝑥 Mixed
𝑓 (𝑥, 𝑦) partial
𝜕 𝜕𝑓 𝜕!𝑓 derivatives
K N= = 𝑓/%
𝜕𝑓 𝜕𝑥 𝜕𝑦 𝜕𝑥𝜕𝑦
𝜕𝑦
𝜕 𝜕𝑓 𝜕!𝑓
K N = ! = 𝑓//
𝜕𝑦 𝜕𝑦 𝜕𝑦

Question: 𝑓%/ = 𝑓/% ?

Theorem: The mixed Derivative Theorem

If 𝑓% , 𝑓/ , 𝑓%/ , and 𝑓/% are continuous in some neighborhood (aka “nice” function) of (𝑥3 , 𝑦3 ),

then 𝑓%/ = 𝑓/% at (𝑥3 , 𝑦3 ).

If the mixed partial derivatives exist and are continuous at a point (𝑥3 , 𝑦3 ), then they are equal at

(𝑥3 , 𝑦3 ) regardless of the order in which they are taken.

In this class, it is assumed that we will be dealing with “nice” functions only.

Example 3: 𝑓(𝑥, 𝑦) = 𝑥 % 𝑦 & .

𝑓% = 3𝑥 ! 𝑦 ; , 𝑓%/ = 12𝑥 ! 𝑦 ,

𝑓/ = 4𝑥 , 𝑦 , , 𝑓/% = 12𝑥 ! 𝑦 ,

Here 𝑓%/ and 𝑓/% are “nice” functions or they are continuous at every point. Hence 𝑓%/ = 𝑓/% .

@Dr. Yang Cao Page 14


APSC248 – Engineering Analysis III

' ! ($ !
Example 4: let 𝑓(𝑥, 𝑦) = 𝑥𝑦 '! )$! if (𝑥, 𝑦) ≠ (0,0) and 𝑓(0,0) = 0.

First let’s see its partial derivative with respect to 𝑦 at 𝑥 = ℎ, 𝑦 = 0.

𝑓(ℎ, 𝑘) − 𝑓(ℎ, 0) ℎ! − 𝑘 !
𝑓/ (ℎ, 0) = lim = lim ℎ ! =ℎ
<→3 𝑘 <→3 ℎ + 𝑘!

And

𝑓/ (ℎ, 0) − 𝑓/ (0,0)
𝑓/% (0,0) = lim =1
:→3 ℎ

Similarly, 𝑓%/ (0,0) = −1

$ "! # "! #
Example 5: show that 𝑓 (𝑥, 𝑦) = tan(* 3 4 satisfies + = 0.
' "' ! "$ !

Solution:
/
Let 𝑢 = % .

𝜕𝑓 𝑑𝑓 𝜕𝑢 1 𝑦 𝑦
= = g− h = −
𝜕𝑥 𝑑𝑢 𝜕𝑥 1 + 𝑢! 𝑥! 𝑥! + 𝑦!

𝜕!𝑓 −𝑦(−2𝑥) 2𝑥𝑦


= ! = !
𝜕𝑥 ! (𝑥 + 𝑦 )
! ! (𝑥 + 𝑦 ! )!

𝜕𝑓 𝑑𝑓 𝜕𝑢 1 1 𝑥
= = K N =
𝜕𝑦 𝑑𝑢 𝜕𝑦 1 + 𝑢! 𝑥 𝑥! + 𝑦!

𝜕!𝑓 −𝑥(2𝑦) −2𝑥𝑦


= ! = !
𝜕𝑦 ! (𝑥 + 𝑦 )
! ! (𝑥 + 𝑦 ! )!

Hence

𝜕!𝑓 𝜕!𝑓
+ =0
𝜕𝑥 ! 𝜕𝑦 !

@Dr. Yang Cao Page 15


APSC248 – Engineering Analysis III

This is also called “Laplace Equation”.

More generally, the Laplace equation has the following form

𝜕!𝑓 𝜕!𝑓 𝜕!𝑓


+ + =0
𝜕𝑥 ! 𝜕𝑦 ! 𝜕𝑧 !

If 𝑓(𝑥, 𝑦, 𝑧) satisfies the Laplace equation, 𝑓 is said to be a harmonic function.

Define Laplace operator

𝜕! 𝜕! 𝜕!
∇! = + +
𝜕𝑥 ! 𝜕𝑦 ! 𝜕𝑧 !

As we’ll learn later in this course, the Laplace operator or Laplacian is a differential operator

given by the divergence (∇ ∙) of the gradient (∇𝑓) of a function. It is usually denoted by symbols

∆, ∇ ∙ ∇, or ∇! .

It occurs in the differential equations that describe many physical phenomena, such as electric

and gravitational potentials, the diffusion equation for heat and fluid flow, wave propagation, and

quantum mechanics. The Laplacian represents the flux density of the gradient flow of a function.

For instance, the net rate at which a chemical dissolved in a fluid moves towards or away from

some point is proportional to the Laplacian of the chemical concentration at that point; expressed

symbolically, the resulting equation is the diffusion equation. For these reasons, it is extensively

used in the sciences for modeling all kinds of physical phenomena.

@Dr. Yang Cao Page 16


APSC248 – Engineering Analysis III

46
Example 6: Find 4% given equation
𝑦𝑧 − ln 𝑧 = 𝑥 + 𝑦
in which 𝑧 is a function of the two independent variables 𝑥 and 𝑦. Assume the partial
derivative exists.

Differentiate both sides of the equation with respect to 𝑥, this gives

𝜕 𝜕
(𝑦𝑧 − ln 𝑧) = (𝑥 + 𝑦)
𝜕𝑥 𝜕𝑥

𝜕 𝜕 𝜕𝑥 𝜕𝑦
(𝑦𝑧) − (ln 𝑧) = +
𝜕𝑥 𝜕𝑥 𝜕𝑥 𝜕𝑥

𝜕𝑧 1 𝜕𝑧
𝑦 − =1+0
𝜕𝑥 𝑧 𝜕𝑥

1 𝜕𝑧
K𝑦 − N =1
𝑧 𝜕𝑥

𝜕𝑧 𝑧
=
𝜕𝑥 𝑦𝑧 − 1

@Dr. Yang Cao Page 17


APSC248 – Engineering Analysis III

(2) Chain Rule

Recall that given 𝑓(𝑢) where 𝑢 = 𝑢(𝑥), then

𝑑𝑓 𝑑𝑓 𝑑𝑢
=
𝑑𝑥 𝑑𝑢 𝑑𝑥

• Chain rule – Case 1

𝑓(𝑥, 𝑦): 𝑥 = 𝑥(𝑡), 𝑦 = 𝑦(𝑡) or

𝑓(𝑥, 𝑦, 𝑧): 𝑥 = 𝑥(𝑡), 𝑦 = 𝑦(𝑡), 𝑧 = 𝑧(𝑡)

𝑑𝑓 𝜕𝑓 𝑑𝑥 𝜕𝑓 𝑑𝑦
= +
𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡

𝑑𝑥 𝑑𝑦
= 𝑓% + 𝑓/
𝑑𝑡 𝑑𝑡

or

𝑑𝑓 𝜕𝑓 𝑑𝑥 𝜕𝑓 𝑑𝑦 𝜕𝑓 𝑑𝑧
= + +
𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡 𝜕𝑧 𝑑𝑡

𝑑𝑥 𝑑𝑦 𝑑𝑧
= 𝑓% + 𝑓/ + 𝑓6
𝑑𝑡 𝑑𝑡 𝑑𝑡

• Chain rule – Case 2 (function with 2 independent variables)

𝑧 = 𝑓(𝑥, 𝑦)

𝑥 = 𝑥(𝑢, 𝑣), 𝑦 = 𝑦(𝑢, 𝑣)

𝜕𝑧 𝜕𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑦
= +
𝜕𝑢 𝜕𝑥 𝜕𝑢 𝜕𝑦 𝜕𝑢

𝜕𝑧 𝜕𝑧 𝜕𝑥 𝜕𝑧 𝜕𝑦
= +
𝜕𝑣 𝜕𝑥 𝜕𝑣 𝜕𝑦 𝜕𝑣

46 45
Note: 4=
or 4= means “how does 𝑓 change if 𝑢 is changed a little bit”. 𝑓 changes when 𝑢

changes because 𝑓 depends on 𝑥 and 𝑦, which depend on 𝑢.

@Dr. Yang Cao Page 18


APSC248 – Engineering Analysis III

• Chain rule – Case 3 (function with 3 independent variables)

𝑔 = 𝑓(𝑢, 𝑣, 𝑤)

𝑢 = 𝑢(𝑥, 𝑦, 𝑧), 𝑣 = 𝑣(𝑥, 𝑦, 𝑧), 𝑤 = (𝑥, 𝑦, 𝑧)

𝜕𝑓 𝜕𝑓 𝜕𝑢 𝜕𝑓 𝜕𝑣 𝜕𝑓 𝜕𝑤
= + +
𝜕𝑥 𝜕𝑢 𝜕𝑥 𝜕𝑣 𝜕𝑥 𝜕𝑤 𝜕𝑥

𝜕𝑓 𝜕𝑓 𝜕𝑢 𝜕𝑓 𝜕𝑣 𝜕𝑓 𝜕𝑤
= + +
𝜕𝑦 𝜕𝑢 𝜕𝑦 𝜕𝑣 𝜕𝑦 𝜕𝑤 𝜕𝑦

𝜕𝑓 𝜕𝑓 𝜕𝑢 𝜕𝑓 𝜕𝑣 𝜕𝑓 𝜕𝑤
= + +
𝜕𝑧 𝜕𝑢 𝜕𝑧 𝜕𝑣 𝜕𝑧 𝜕𝑤 𝜕𝑧

Remarks:

46 46 4% 46 4/
• In the chain rule case 2, 4= = 4% 4= + 4/ 4=. It is tempting to cancel 𝜕𝑥 or 𝜕𝑦 in this

equation. Apparently, it won’ work. The reason is that they are partial derivatives,

not total derivatives.

• 𝜕𝑓 (pronounced as “curly d 𝑓”) does not exist by itself.

45
ü 4%
exists. It means the rate of change of 𝑓 with respect to 𝑥.

ü “𝑑𝑓” which is differential for single variable function, and total differential for

multivariable function, do exist.

ü “𝑑𝑓” as we’ll later, is the total variation of 𝑓. It accounts for all the partial

derivatives and combined effect.

@Dr. Yang Cao Page 19


APSC248 – Engineering Analysis III

"#
Example 7: polar coordinates, 𝑥 = 𝑟 cos 𝜃, 𝑦 = 𝑟 sin 𝜃. Given 𝑓(𝑥, 𝑦), find "+
"#
and "'

Using Chain rule, we have

𝜕𝑓 𝜕𝑓 𝜕𝑥 𝜕𝑓 𝜕𝑦
= + = cos 𝜃 𝑓% + sin 𝜃 𝑓/
𝜕𝑟 𝜕𝑥 𝜕𝑟 𝜕𝑦 𝜕𝑟

45
To find 4%, we use following chain rule.

𝜕𝑓 𝜕𝑓 𝜕𝑟 𝜕𝑓 𝜕𝜃
= +
𝜕𝑥 𝜕𝑟 𝜕𝑥 𝜕𝜃 𝜕𝑥

Since 𝑟 = Y𝑥 ! + 𝑦 ! , we have

𝜕𝑟 1 ! " 𝑥 𝑟 cos 𝜃
= (𝑥 + 𝑦 ! )-! (2𝑥) = = = cos 𝜃
𝜕𝑥 2 Y𝑥 ! + 𝑦 ! 𝑟

/
Since 𝜃 = arctan g% h, we have

𝜕𝜃 1 −𝑦 𝑦 −𝑟 sin 𝜃 1
= = − = = − sin 𝜃
𝜕𝑥 𝑦! 𝑥! 𝑥! + 𝑦! 𝑟! 𝑟
1+ !
𝑥

Thus

𝜕𝑓 𝜕𝑓 1 𝜕𝑓
= cos 𝜃 − sin 𝜃
𝜕𝑥 𝜕𝑟 𝑟 𝜕𝜃

Similarly, we can get

𝜕𝑓 𝜕𝑓 1 𝜕𝑓
= sin 𝜃 + cos 𝜃
𝜕𝑦 𝜕𝑟 𝑟 𝜕𝜃

These results are useful when doing coordinate transformation.

@Dr. Yang Cao Page 20


APSC248 – Engineering Analysis III

", ",
Example 8: 𝑇 (𝑥, 𝑦) = 𝑥 % − 𝑥𝑦 + 𝑦 % , 𝑥 = 𝑟 cos 𝜃, 𝑦 = 𝑟 sin 𝜃. Find "+ and "-

Solution:

𝜕𝑇 𝜕𝑇 𝜕𝑥 𝜕𝑇 𝜕𝑦
= +
𝜕𝑟 𝜕𝑥 𝜕𝑟 𝜕𝑦 𝜕𝑟

= (3𝑥 ! − 𝑦) cos 𝜃 + (−𝑥 + 3𝑦 ! ) sin 𝜃

= 3𝑟 ! (cos , 𝜃 + sin, 𝜃) − 2𝑟 sin 𝜃 cos 𝜃

𝜕𝑇 𝜕𝑇 𝜕𝑥 𝜕𝑇 𝜕𝑦
= +
𝜕𝜃 𝜕𝑥 𝜕𝜃 𝜕𝑦 𝜕𝜃

= 3𝑟 , (sin 𝜃 − cos 𝜃) cos 𝜃 sin 𝜃 + 𝑟 ! (sin! 𝜃 − cos ! 𝜃)

* ./
Example 9: 𝐻 (𝑥, 𝑦) = sin(3𝑥 − 𝑦), 𝑥 = 2𝑡 ! − 3, 𝑦 = 𝑡 ! − 5𝑡 + 1. Find .
! .0

Solution:

𝑑𝐻 𝜕𝐻 𝑑𝑥 𝜕𝐻 𝑑𝑦
= +
𝑑𝑡 𝜕𝑥 𝑑𝑡 𝜕𝑦 𝑑𝑡

= [cos(3𝑥 − 𝑦) (3)](4𝑡) + [cos(3𝑥 − 𝑦)(−1)](𝑡 − 5)

11 !
= (11𝑡 + 5) cos K 𝑡 + 5𝑡 − 10N
2

@Dr. Yang Cao Page 21


APSC248 – Engineering Analysis III

Example 10: Application of chain rule in proving product /quotient rule

• Product rule, 𝑓 = 𝑢𝑣, 𝑢 = 𝑢(𝑡), 𝑣 = 𝑣(𝑡)

𝑑𝑓 𝑑(𝑢𝑣) 𝑑𝑢 𝑑𝑣 𝑑𝑢 𝑑𝑣
= = 𝑓= + 𝑓> =𝑣 +𝑢
𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡

Or 𝑓 0 = 𝑣𝑢0 + 𝑢𝑣′
=
• Quotient rule, 𝑓 = > , 𝑢 = 𝑢(𝑡), 𝑣 = 𝑣(𝑡)

𝑑𝑓 𝑑𝑢 𝑑𝑣
= 𝑓= + 𝑓>
𝑑𝑡 𝑑𝑡 𝑑𝑡

1 𝑑𝑢 𝑢 𝑑𝑣
= + g− ! h
𝑣 𝑑𝑡 𝑣 𝑑𝑡
>=# -=> #
Or 𝑓 0 = >!

@Dr. Yang Cao Page 22


APSC248 – Engineering Analysis III

(3) Linearization and Total Differential

For function of single variable, 𝑦 = 𝑓(𝑥), we define the change in 𝒇 as 𝑥 changes from 𝑥 to 𝑥 +

Δ𝑥 by

Δ𝑦 = Δ𝑓 = 𝑓(𝑥 + Δ𝑥) − 𝑓(𝑥)

The differential of 𝒇 as

differential 𝑑𝑦 = 𝑓 0 (𝑥)𝑑𝑥 or 𝑑𝑓 = 𝑓 0 (𝑥)𝑑𝑥

If 𝑥 = 𝑎 as shown in the above figure, then

The true change: Δ𝑓 = 𝑓(𝑎 + Δ𝑥) − 𝑓(𝑎)

The differential estimate (i.e., estimated change): d𝑓 ≈ 𝑓 0 (𝑎)Δ𝑥

The differential: 𝑑𝑓 = 𝑓 0 (𝑎)𝑑𝑥, when Δ𝑥 → 𝑑𝑥

Error in differential approximation: 𝑒 = Δ𝑓 − 𝑑𝑓 = 𝜖 Δ𝑥 (see P.169 of Textbook)

Δ𝑦 = 𝑓 0 (𝑎)Δ𝑥 + 𝜖 Δ𝑥, 𝜖 → 0 as Δ𝑥 → 0

The geometric meaning of “differential” 𝑑𝑓 for single variable function is the change Δ𝐿 in the

linearization of 𝑓 when 𝑥 = 𝑎 changes by an amount Δ𝑥 = 𝑑𝑥. The linearization of 𝑓(𝑥) at 𝑥 =

𝑎 is

𝐿(𝑥) = 𝑓(𝑎) + 𝑓 0 (𝑎)(𝑥 − 𝑎)

@Dr. Yang Cao Page 23


APSC248 – Engineering Analysis III

Now consider the differential of a function of two variables, 𝑧 = 𝑓( 𝑥, 𝑦) . We have the

following Increment Theorem (P771 of Thomas textbook, Proof is in Appendix 9 of textbook)).

The change in 𝑧 from point (𝑥3 , 𝑦3 ) to near by point (𝑥 , 𝑦) is

Δ𝑧 = 𝑓(𝑥, 𝑦) − 𝑓(𝑥3 , 𝑦3 )

= 𝑓% (𝑥3 , 𝑦3 )Δ𝑥 + 𝑓/ (𝑥3 , 𝑦3 )Δ𝑦 + 𝜖" Δ𝑥 + + 𝜖! Δ𝑦

where Δ𝑥 = 𝑥 − 𝑥3 , Δ𝑦 = 𝑦 − 𝑦3 and 𝜖" , 𝜖! → 0 as Δ𝑥, Δ𝑦 → 0.

For small increments Δ𝑥 and Δ𝑦, we have the approximation

𝑓(𝑥3 , 𝑦3 ) + 𝑓% (𝑥3 , 𝑦3 )(𝑥 − 𝑥3 ) + 𝑓/ (𝑥3 , 𝑦3 )(𝑦 − 𝑦3 )


𝑓(𝑥, 𝑦) ≈ yzzzzzzzzzzzzzzz{zzzzzzzzzzzzzzz|
?(%,/)

Definition:

The linearization of function 𝑧 = 𝑓(𝑥, 𝑦) at a point (𝑥3 , 𝑦3 ) is

𝐿(𝑥, 𝑦) = 𝑓(𝑥3 , 𝑦3 ) + 𝑓% (𝑥3 , 𝑦3 )(𝑥 − 𝑥3 ) + 𝑓/ (𝑥3 , 𝑦3 )(𝑦 − 𝑦3 )

This is essentially a plane equation.

A change in 𝐿 from point (𝑥3 , 𝑦3 ) to nearby point (𝑥, 𝑦) = (𝑥3 + Δ𝑥, 𝑦3 + Δ𝑦) is

Δ𝐿 = 𝐿(𝑥3 + Δ𝑥, 𝑦3 + Δ𝑦) − 𝐿(𝑥3 , 𝑦3 ) = 𝑓% (𝑥3 , 𝑦3 )Δx + 𝑓/ (𝑥3 , 𝑦3 )Δy

Let 𝑑𝑥 = Δ𝑥 = 𝑥 − 𝑥3 , 𝑑𝑦 = Δ𝑦 = 𝑦 − 𝑦3 . We have the following definition of total

differential of 𝑓.

Definition:

If moving from point (𝑥3 , 𝑦3 ) to nearby point (𝑥3 + 𝑑𝑥, 𝑦3 + 𝑑𝑦), the resulting change in

the linearization of 𝑓 is

d𝑓 = 𝑓% (𝑥3 , 𝑦3 )dx + 𝑓/ (𝑥3 , 𝑦3 )dy

𝑑𝑓 is called the total differential of 𝒇.

@Dr. Yang Cao Page 24


APSC248 – Engineering Analysis III

Now if given a multivariable function, 𝑤 = 𝑓(𝑥, 𝑦, 𝑧), then

𝜕𝑓 𝜕𝑓 𝜕𝑓
𝑑𝑓 = 𝑑𝑥 + 𝑑𝑦 + 𝑑𝑧
𝜕𝑥 𝜕𝑦 𝜕𝑧

Remarks:

• 𝑑𝑓 = 𝑓% 𝑑𝑥 + 𝑓/ 𝑑𝑦 + 𝑓6 𝑑𝑧 encodes how variation of 𝑓 is related to variations of 𝑥, 𝑦

and 𝑧.

• It can also be used as an approximation formula

Δ𝑓 ≈ 𝑓% Δ𝑥 + 𝑓/ Δ𝑦 + 𝑓6 Δ𝑧

When Δ𝑥, Δ𝑦, and Δ𝑧 are very very small, we got 𝑑𝑓 = 𝑓% 𝑑𝑥 + 𝑓/ 𝑑𝑦 + 𝑓6 𝑑𝑧.

• Divide both sides of 𝑑𝑓 = 𝑓% 𝑑𝑥 + 𝑓/ 𝑑𝑦 + 𝑓6 𝑑𝑧 by 𝑑𝑡, we get the chain rule.

Example 11: If the radius of a cone is changed from 10cm to 10.1 cm, and
the height is changed from1m to 0.99m, use total differential to
approximate Δ𝑉.

Solution:

1
𝑉 = 𝜋𝑟 ! ℎ
3

Δ𝑟 = 𝑑𝑟 = 0.1 cm, 𝑟 = 10cm

Δℎ = 𝑑𝑟 = −1 cm, ℎ = 100cm

𝜕𝑉 𝜕𝑉 2 1
𝑑𝑉 = 𝑑𝑟 + 𝑑ℎ = K 𝜋𝑟ℎN 𝑑𝑟 + K 𝜋𝑟 ! N 𝑑ℎ
𝜕𝑟 𝜕ℎ 3 3

2 1 100𝜋
Δ𝑉 ≈ 𝑑𝑉 = • 𝜋(10)(100)€ 0.1 + K 𝜋(10)! N (−1) = cm,
3 3 3

@Dr. Yang Cao Page 25


APSC248 – Engineering Analysis III

'
Example 12: 𝑓 (𝑥, 𝑦) = , find the total differential 𝑑𝑓 =?
1' ! )$ !

𝜕𝑓 𝜕 𝑥
= • €
𝜕𝑥 𝜕𝑥 Y𝑥 ! + 𝑦 !

1 𝜕 𝜕 1
= (𝑥) + 𝑥 • €
Y𝑥 ! + 𝑦 ! 𝜕𝑥 𝜕𝑥 Y𝑥 ! + 𝑦 !

1 1 1 𝜕
= + 𝑥 •− , ‚ (𝑥 ! )
Y𝑥 ! + 𝑦 ! 2 (𝑥 ! 𝜕𝑥
+ 𝑦 ! )!

𝑥! + 𝑦! − 𝑥! 𝑦!
= , = ,
(𝑥 ! + 𝑦 ! )! (𝑥 ! + 𝑦 ! )!

Similarly, we can get

𝜕𝑓 𝜕 𝑥 𝑥𝑦
= • €=− ,
𝜕𝑦 𝜕𝑦 Y𝑥 ! + 𝑦 ! (𝑥 ! + 𝑦 ! )!

Hence the total differential is

𝜕𝑓 𝜕𝑓 𝑦! 𝑥𝑦
𝑑𝑓 = 𝑑𝑥 + 𝑑𝑦 = , 𝑑𝑥 − , 𝑑𝑦
𝜕𝑥 𝜕𝑦 (𝑥 ! + 𝑦 ! )! (𝑥 ! + 𝑦 ! )!

@Dr. Yang Cao Page 26

You might also like