topic4. partial derivatives - contents.pdf

59
4. Partial Derivatives Advanced Engineering Mathematics [ENG4200] Page 1 of 59 Partial Derivatives Learning Contents Functions of two variables, tangent approximation and optimization Chain Rule, Gradient and Direction Derivatives

Upload: yim

Post on 02-Oct-2015

50 views

Category:

Documents


2 download

DESCRIPTION

Partial Derivatives

TRANSCRIPT

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 1 of 59

    Partial

    Derivatives

    Learning Contents

    Functions of two variables, tangent approximation and optimization

    Chain Rule, Gradient and Direction Derivatives

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 2 of 59

    Partial Derivatives

    FUNCTIONS OF SEVERAL VARIABLES

    In many real world functions and engineering applications, the behaviour of a quantity

    (dependent variable) often depends on several other quantities (independent variables).

    Definition

    A function f of two variables is a relation that assigns to every ordered pair of

    input values ( ) in a set called the domain a unique output value denoted

    by ( ) . The set of output values is called the range.

    Example 1

    The volume V of a cylindrical cone with base radius r and height h,

    Here V is the dependent variable that depends on the two independent

    variables r and h.

    Example 2

    The height h of a mountain above the ground depends on its location on the datum plane, which can be described by a set of Cartesian coordinates ( ) in the plane,

    ( )

    Here h represents the dependent variable and the notation shows that it

    depends on the two independent variables x and y , i.e., h is a function of

    x and y.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 3 of 59

    Example 3

    The speed s of a water particle in a stream depends, in general, on its location

    (which can be described by Cartesian coordinates (x, y, z), and time t,

    ( )

    The dependent variable s is a function of four independent variables x, y, z

    and t.

    Example 3A

    The electric current I in an electric cable depends on its location x (say its

    distance from one end of the cable) and time t,

    ( )

    The current I is a function of the two independent variables x and t.

    Notes

    (1) The designation of independent variables means that these quantities can be

    varied without regard to other independent variables. In example (1), r and h can

    take different values independently whereas V will be determined by these values.

    Similar consideration applies to the other examples.

    (2) The properties of functions of two variables are drastically different from that of

    functions of one variable but are easily generalized to functions of three or more

    variables. Furthermore, we can visualize the graphs of functions of two variables

    easily, so that many of our illustrations and examples will be taken from functions

    of two variables.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 4 of 59

    DOMAIN

    Definition

    The domain of a function is the set of values that can be assumed by the

    independent variables.

    Example 4

    Consider a dartboard with unit radius and the distance of a landing dart from the

    center of the board: , where .

    The domain of this function is the closed disc . The function r is

    defined only within this domain.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 5 of 59

    Note

    Very often, the domain of a function is not explicitly stated and it is understood that the

    domain will be the region in which the function is well-defined. In many applications, the

    variables represent physical quantities and the domain is usually obvious from the

    context. Basically, you have to watch out for the following two situations:

    (1) We never let the independent variables take on values that lead to division by zero;

    (2) We require the independent and dependent variables to be real-valued unless we

    are dealing with complex functions (which are not covered here).

    Example 5

    Consider Example (1) in the previous section. It is clear from the nature of the

    independent variables r and h that the domain is , , i.e. the upper

    right quadrant of the r-h plane.

    Classwork (1)

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 6 of 59

    GRAPHS AND LEVEL CURVES

    GRAPH

    For a function of two variables ( ) , we can draw its graph as a surface in

    space. For each point ( ) on the plane, we can determine the corresponding value

    of z and mark the point ( ) or ( ( )) .

    If this is carried out for all ( ) values in the domain, we obtain a surface as the graph of the function.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 7 of 59

    Example 6

    Consider the function

    ( )

    Since we require z to be real, so

    Here are some points on the graph of the function:

    x y ( )

    0 0 10

    0 4 9.165

    2 4 8.944

    2 8 5.567

    4 6 6.928

    4 8 4.472

    6 8 0

    8 4 4.472

    10 0 0

    The graph is illustrated below.

    Usually, such graphs are plot with the help of Mathematics software as direct

    sketching by hand is very tedious.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 8 of 59

    LEVEL CURVES

    Another way to visualize a function is to draw its level curves in the domain of . On

    each of these level curves, the value of the function is constant. The collection of level curves makes up a contour map.

    Example 7

    Consider our previous function

    ( )

    The following figure shows the level curves for a series of values of the function,

    namely, 6, 8, 9, 10.

    Note that the level curve for z = 10 is a single point and the other level curves form

    concentric circles. To visualize the graph, just imagine that the number on each

    level curve represents the height of the level curve above the xy plane and form a

    three-dimensional picture in your brain. In this example, the level curves give us

    the impression that the surface representing the graph looks somewhat like a

    dome.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 9 of 59

    Remark

    For functions of three or more variables, it is extremely difficult, if not impossible, to

    visualize their graphs. For functions of three variables, we may gain some insight into

    the graphs by using level surfaces analogous to level curves for functions of two

    variables.

    LIMITS AND CONTINUITY

    LIMIT OF A FUNCTION

    The limit of a function ( ) as ( ) ( ) is the number L that the function

    approaches as the point ( ) gets arbitrarily close to (but not equal to) the point

    ( ) , and we write

    ( ) ( )

    ( )

    The limit of a function of three or more variables is defined in a similar manner.

    Notes

    (1) For a function of one variable ( ) , the limit at is the number L that the

    function approaches when x gets arbitrarily close to . Here we have only two

    directions of approach, namely from the left or the right of . If the function approaches the same value from either direction, then the limit exists.

    (2) The situation for functions of two or more variables is more complicated. ( )

    can approach ( ) along any path in the domain of definition. Only if the function approaches the same value whatever the path taken will the limit exist.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 10 of 59

    Example (8)

    Consider the function ( )

    at the origin ( ). If we approach the

    origin along the y-axis, then ( ) ( ) , else if we approach the

    origin along the line , then ( ) and finally, if we approach the

    origin along the x-axis, ( ) ( ) which is undefined. Thus the limit of the function does not exist at the origin.

    (3) In evaluating the limits, we take a pragmatic approach, i.e., we substitute the value

    of ( ) into the function to determine its limit at ( ) (after appropriate simplifications) unless we run into troubles (such as division by zero). For many

    physical problems, this approach produces correct results but pay attention to note

    (2). For polynomial and rational functions, this approach always work provided we

    do not encounter division by zero.

    Example (9)

    ( ) ( )

    ( ) ( ) ( )

    Example (10)

    (2) ( ) ( )

    ( )( ) ( )

    (Note that ( ) ( ) does not exist for all real values of . Why?)

    Classwork (2)

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 11 of 59

    Properties of limits

    If ( ) ( ) ( ) and ( ) ( ) ( ) then

    (1) ( ) ( )[ ( ) ( )] ;

    (2) ( ) ( ) ( ) ( ) ;

    (3) ( ) ( ) ( ) (any constant number k);

    (4) ( ) ( ) ( )

    ( )

    if

    These results will be handy in evaluating some complicated functions.

    Note

    The above results centre on functions of two variables but they are equally applicable to

    functions of three or more variables.

    CONTINUITY

    A function ( ) is continuous at the point ( ) if

    (1) is defined at ( ) , i.e., the function has a unique value at ( ) ;

    (2) ( ) ( ) ( ) exists; and

    (3) ( ) ( ) ( ) ( )

    Briefly, a function is continuous at a point ( ) if the function approaches

    ( ) when ( ) gets arbitrarily close to ( ) along any path. If a

    function is continuous at every point in its domain, it is called a continuous

    function. For continuous functions, the graphs do not have sudden jumps.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 12 of 59

    Example (11)

    The function ( ) is a continuous function.

    Example (12)

    The function ( )

    is continuous at every point except ( ) at

    which it is undefined.

    (What is the domain of definition of this function?)

    Example (13)

    ( )

    is a continuous function of the real variables .

    Properties of continuous functions

    (1) The sums, differences and products of continuous functions are continuous. In

    addition, the quotient of two continuous functions is continuous wherever it is

    defined.

    (2) Polynomial functions are always continuous. Rational functions are continuous

    at all points where the functions are defined.

    (3) If ( ) and ( ) are continuous , then the composite function

    ( ( )) is continuous. In general, the composite of continuous

    functions is continuous.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 13 of 59

    Example (14)

    The functions and are continuous, so the composite function

    is continuous.

    Example (15)

    The functions

    and are continuous, so the function

    is continuous.

    Example (16)

    The functions ( ) and are continuous, so the function

    ( ) is continuous.

    Note

    Many functions that arise from physical problems are continuous. Usually we will

    assume the functions we encounter to be continuous unless we run into troubles. Still

    one should be aware of pitfalls.

    Classwork (3)

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 14 of 59

    PARTIAL DERIVATIVES

    PARTIAL DERIVATIVE

    If ( ) is a point in the domain of a function ( ) , the plane defined by

    cuts the surface of ( ) in the curve ( ) as illustrated.

    The curve ( ) is a one-dimensional curve, i.e., it is a function of one

    variable x (since y is held constant at ). So we can evaluate its derivative with

    respect to x at in the usual manner

    ( )

    ( ) ( )

    .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 15 of 59

    Notes

    (1) Geometrically, this partial derivative gives the slope of the tangent to the curve

    ( ) at which is defined as the straight line passing the point

    ( ( ) ) with this slope in the plane .

    (2) This derivative is called partial since is held constant when the limit is evaluated. The techniques for finding this partial derivative are the same as that

    of finding the derivative of a function of a single variable. You just regard as a constant when you evaluate the partial derivative.

    (3) The usual notations for the partial derivative are:

    (i) (

    )

    or (

    ) ( ) if you wish to state clearly that the derivative is

    to be evaluated at ( ).

    This notation shows clearly that the derivative is evaluated with respect to

    holding the independent variable constant. If it is clear from the context which variable(s) is/are to be held constant, we may simply write

    (

    )

    or (

    ) ( ) .

    (ii) or ( )

    This notation is terse and useful when we are dealing with complicated

    functions.

    (iii) (

    )

    or (

    ) ( ).

    This is the same as (i) since ( ) and it is useful when you are dealing with variables without mentioning the function explicitly.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 16 of 59

    Examples

    (17) Find (

    )

    for the function .

    (

    ) (

    ( ))

    Note that is treated as a constant and we can revert to ordinary derivatives in the second step.

    (18) Find (

    )

    for the function .

    (

    ) (

    )

    ( ) .

    Remember was held constant and so was a constant when we carried out the differentiation.

    (Still remember

    , for constant k.)

    (19) Find (

    )

    for the function .

    (

    ) (

    )

    ( )

    ( )

    Here we used the product rule and the result that

    , for

    constant k.

    Classwork (4)

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 17 of 59

    PARTIAL DERIVATIVE

    In an analogous manner, we consider the plane which cuts the surface

    ( ) in the curve ( ) as illustrated.

    Here, the curve ( ) is one-dimensional, i.e., it is a function of the variable

    (since is held constant at ). We can thus evaluate its derivative with respect to

    at in the usual manner

    ( )

    ( ) ( )

    This limit is called the partial derivative of ( ) with respect to at the point

    ( ) .

    Note: Refer to the notes in the previous section for

    .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 18 of 59

    Examples

    (20) Find (

    )

    for the function .

    (

    ) .

    ( )/

    Note that is treated as a constant.

    (21) Find (

    )

    for the function .

    The function can be rewritten as ( )

    (

    ) (

    )

    (

    ) .

    Remember was held constant when we carried out the differentiation.

    (22) Find (

    )

    for the function .

    (

    ) (

    )

    ( )

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 19 of 59

    Examples

    (23) Find the partial derivatives of the function ( ) ( )

    .

    (

    ) ( )

    (

    )

    ( ) ( )

    ( )

    ( )

    ( ) ( )

    ( )

    (

    ) (

    )

    ( )

    (

    )

    (

    ) ( )

    (

    )

    ( )

    ( )( )

    ( )

    ( )

    ( )

    (note: No Example (24)

    Classwork (5)

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 20 of 59

    HIGHER ORDER DERIVATIVES

    Consider a function of two variables ( ) and provided the first partial derivatives

    (which are again functions of and ) are differentiable, we can form the following second partial derivatives :

    (1)

    (

    ) .

    Note that is held constant throughout the differentiation process. An

    alternative notation is .

    (2)

    (

    ).

    Here is held constant for the first differentiation whereas is held constant

    for the second differentiation. An alternative notation is .

    (3)

    (

    ) .

    Here is held constant for the first differentiation whereas is held constant

    for the second differentiation. It is often denoted by .

    (4)

    (

    ) .

    Note that is held constant throughout the differentiation process. It is often

    denoted by .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 21 of 59

    Example (25)

    Consider a function ( ) , we have

    ;

    ;

    therefore

    ( ) ;

    ( ) ;

    ( ) ;

    ( ) .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 22 of 59

    Example (26)

    The two-dimensional Laplace equation is given by

    .

    Show that the function ( ) (

    ) satisfies the Laplace equation.

    The first order partial derivatives are

    (

    )

    ( ) (

    ) (

    )

    ( ( ) ) (

    )

    .

    (Recall the formula for

    .)

    (

    )

    ( ) (

    ) (

    )

    ( ( ) ) (

    )

    .

    The two required second order partial derivatives are thus given by

    (

    )

    ( ) ( )

    ( )

    ( ) ;

    (

    )

    ( ) ( )

    ( )

    ( ) .

    It is readily seen that

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 23 of 59

    Example (27)

    Show that

    is zero where ( ) .

    Proceeding step by step, we have

    ;

    ;

    ;

    ;

    ( ) .

    Example (28)

    For the function ( ) , verify that

    .

    Evaluating the derivatives, we have

    ;

    ;

    ;

    ;

    ( ) ;

    ( ) ;

    Therefore,

    .

    Classwork (6)

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 24 of 59

    CHAIN RULE

    Recall the case of functions of one variable: if ( ) is a function of and

    ( ) is a function of , it is sometimes possible to express as an explicit

    function of (i.e. ( ) ) and from which

    can be determined. Alternatively, we

    can use the chain rule, which states that

    ( )

    ( )

    ( )

    Note that is taken as a function of on the left hand side whereas is a function

    of when we take

    on the right hand side.

    This chain rule can be visualized with the help of the following diagram:

    Imagine that in going from to , you multiply the derivatives along the path to

    obtain the result

    .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 25 of 59

    Chain Rule for Functions Reducible to Functions of One Variable

    Consider a function of two variables ( ) , and that and are both

    functions of another variable , i.e. ( ) and ( ) . If we substitute

    ( ) and ( ) into ( ) , we can consider it as a function of , i.e. ( ).

    Therefore we can find the derivative

    .

    Alternatively, we can determine without first expressing in terms of . The chain rule states that .

    The following diagram should help you use the chain rule effectively, especially when

    the functions are rather complicated:

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 26 of 59

    Example (29)

    If , and , find

    using the chain rule.

    Solution: we need to find

    ;

    ;

    Therefore,

    ( )( ) ( )( )

    ( ) .

    Example (30)

    Given that , and , find

    .

    Solution: By chain rule:

    ;

    ( )

    ( ) ;

    Therefore,

    ( )( ) (( ) )( )

    ( ) .

    Note: Try to express the answer

    in terms of .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 27 of 59

    Notes

    The above chain rule can be generalized to functions of more than two variables. We

    consider the case of three independent variables (you should then be able to deal with

    even more) and let ( ) ; ( ) ; ( ) ; ( ) , then the chain rule gives

    The corresponding diagram is

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 28 of 59

    Chain Rule for Functions Reducible to Functions of Two Variables

    Considering ( ) and that ( ); ( ) ; ( ) ,

    i.e. , and are functions of and , then can be expressed as a

    function of the two independent variables and , i.e. ( ) . The functional relationship is shown in the following diagram:

    The chain rule assumes the form:

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 29 of 59

    (Note: No Example (31))

    Example (32)

    If ( ) , , and ,

    find

    and

    by the chain rule.

    Solution: By chain rule:

    ( ) ( )

    ( )

    ( ) ;

    ( ) ( )

    ( )

    ( ) ;

    ( ) ( )

    ( )

    ( ) ;

    ;

    ;

    ;

    ;

    ;

    ,

    ( )

    ( ) ;

    ( )

    ( )

    .

    Note: Continue with the problem by expressing

    and

    in terms of .and .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 30 of 59

    Notes

    Similar ideas apply to other similar cases. A particularly simple case is when

    ( ) and ( ). This relationship is shown in the following diagram:

    Following the diagram, we have

    ;

    .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 31 of 59

    Example (33)

    Find

    and

    , if , and .

    Solution: The functional relationship is as follows:

    With the help of the diagram, we have

    ;

    .

    The relevant partial derivatives are

    ;

    ;

    ;

    ;

    ;

    .

    ,

    ;

    Note: Complete the solution by expressing

    and

    in terms of .and .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 32 of 59

    Remark on the chain rule

    In many physical and engineering problems, the quantities or variables are inter-

    dependent and finding partial derivatives can prove to be tricky at times. It is important

    to state clearly which variables are taken as independent. Failing to do so can easily

    lead to mistakes.

    Implicit functions

    If the functions are not given explicitly, then once again, we have to ascertain which of

    the variables are to be considered independent. After that, we can differentiate the

    implicit function to obtain the required partial derivatives.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 33 of 59

    Example (34)

    Consider an implicit function ( ) . Assume that it determines as a

    function of and , and that (

    )

    .

    Solution: We know of and are taken as independent variables and the following diagram gives the functional dependency::

    Note that there is no functional relationship between and since they are independent variables.

    From the diagram, we have

    (

    )

    ;

    Since ( ( )) ,

    (

    ) (

    ) .

    Thus,

    (

    )

    .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 34 of 59

    Example (35)

    Consider an implicit function ( ) ( ) ( )

    Find (

    )

    .

    Solution: Since ( ) ( ) ( ) ,

    We have

    ( )

    ( ) ;

    ( )

    ( ) ;

    , (

    )

    ( )

    ( ) .

    Example (36)

    If ( ) and , ,

    show that . (

    ) (

    ) (

    )

    (

    )

    .

    Solution: depends on and through and ., We have

    ( )

    ( )

    ;

    (

    )

    (

    )

    (

    ) ;

    (

    )

    (

    )

    (

    ) (

    ) * (

    )+

    (

    ) (

    )

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 35 of 59

    Example (37)

    Given: and are functions of and defined through the following relations

    ( ) ;

    ( )

    Find:

    ,

    ,

    . and

    .

    Solution: We partial differentiate the first implicit function with respect to ,

    (

    )

    ( )

    ( )

    .

    (1)

    Similarly, we partial differentiate the second implicit function with respect to ,

    ( )

    ( )

    (2)

    2 (1)

    (3)

    (2)

    ( ) (4)

    (3)+(4), we have

    ( )

    ( )

    2 (1)

    (5)

    (2)

    ( ) (6)

    (5)-(6), we have

    ( )

    ( )

    Note: Finish the problem by finding the remaining partial derivatives.

    Classwork (7)

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 36 of 59

    Tangent Approximation and Optimizations

    When we zoom in toward a point on a surface of a differentiable function of two

    variables ( ) , the surface looks more and more like a plane (i.e. a tangent plane on the surface) and we can approximate the function by a linear function of two

    variables.

    Definition

    Tangent Planes

    A tangent plane is defined to be a plane that is just tangent to a surface (i.e.

    this plane will touch the surface in only one point).

    If ( ) has a continuous partial derivatives, an equation for the

    tangent plane to the surface ( ) at the point ( ) is given as:

    ( )( ) ( )( )

    LINEAR APPROXIMATION AND TOTAL DIFFERENTIAL

    Consider a function ( ) and let ( ) be a fixed point in the domain of the

    function. If ( ) is another point in the domain of the function, then the

    function ( ) changes by an amount in going from ( ) to

    ( ) :

    ( ) ( )

    For a fixed point ( ) , the is a function of and such that

    when .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 37 of 59

    Definition

    Linear Approximation

    Suppose ( ) has continuous partial derivatives in the region under

    consideration, then the change in from a point ( ) to a neighboring

    point ( ) can be approximated linearly by

    where the partial derivatives are evaluated at the fixed point ( )

    The smaller the values of and , the better is the approximation.

    Note

    This approximation result can be generalized for functions of any number of variables.

    For example, if ( ) , then the linear approximation formula is

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 38 of 59

    Example (38)

    The volume of a cylinder, , is determined from measurements of and that are in error by . What is the approximated percentage error

    in ?

    Solution: The uncertainty in caused by uncertainties in and is

    So, the approximated percentage error in is

    ;

    (

    ) (

    ) ,

    where the terms in brackets are the percentage error in and respectively.

    Therefore, we have

    ( )( ) ( )

    The approximated percentage error of measurement in is .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 39 of 59

    Example (39)

    The area of a triangle is given by

    . In surveying a

    particular triangular plot of land, and are measured to be and

    respectively, and is read to be . By how much (approximately)

    is the computed area in error if and are in error by 0.15 m each and

    is in error by ?

    Solution: Using the linear approximation, we have

    Here, all the derivatives are evaluated at , , .

    We also have , and ( ) , so

    ( )( )( )

    ( )( )( )

    ( )( )( ) (

    ) ;

    ,

    The approximated error of measurement in is .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 40 of 59

    Total Differential

    Definition

    Total Differential

    For a function ( ) that has continuous first order partial derivatives,

    the total differential of at the point ( ) is

    .

    So is a linear function of and and is simply the linear

    approximation to the change in when we move from the point ( ) to

    ( ) .

    Note:

    For example, ( ) , ( ) , ( ) , we have the differentials

    ;

    ;

    .

    Substituting , and dividing throughout by , we have

    .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 41 of 59

    Example (40)

    At a certain instant the radius of a closed right circular cylinder is and is

    increasing at the rate , while the altitude is and is decreasing

    at the rate . Find the time rate of change (a) of the volume and (b) of the surface area at that instant.

    Solution:

    Let be the radius of the cylinder, then we know that

    when

    , and

    be the altitude of the cylinder, then we have

    when

    .

    (a) For represents the volume of the cylinder, then

    |

    ( )( )( ) ( )( )

    i.e. the rate of change of volume, , at that instant is .

    (b) For represents the surface area of the cylinder, then

    (

    ) (

    )

    |

    ( )( ) ( )( ) ( )( )

    i.e. the rate of change of surface area, , at that instant is .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 42 of 59

    Example (41)

    Find

    and

    if ; , .

    Solution: The differentials are

    ;

    (

    )

    ( ) ;

    (

    ) ( ) .

    Substituting the differentials , into , we obtain

    ( ( ) ) ( ( )) ;

    ( ( ) ) ; and

    ( ( )) .

    Classwork (8)

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 43 of 59

    Optimizations

    MAXIMA, MINIMA AND SADDLE POINTS OF FUNCTIONS OF TWO VARIABLES

    Maximum and minimum values

    Functions of two variables, like functions of one variable, can have relative (or local) and

    absolute maximum and minimum values.

    Relative maximum occurs when the function value at that point is larger than the

    function values of its surrounding points.

    Relative minimum occurs when the function value at that point is smaller than the

    function values of its surrounding points.

    Absolute maximum point is the point at which the function assumes its maximum

    value over its whole domain.

    Absolute minimum point is the point at which the function assumes its minimum value

    over its whole domain.

    The following are examples of minimum and maximums.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 44 of 59

    Example (42)

    ( ) ( )

    Solution:

    This function has an absolute and local minimum at the point (0,0,0).

    Example (43)

    ( ) ( )( )

    Solution:

    This function has an infinite number of relative maxima and has the minimum

    value zero whenever or is a non-negative integer.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 45 of 59

    Example (44)

    ( )

    Solution:

    This function has an infinite number of relative maxima and relative minima.

    For maximum and minimum points that do not lie on the boundary of the domain, we

    observe that either

    (1) the tangent planes are horizontal so that the derivatives along any direction is

    zero at these points, and in particular, we see that (refer to the

    first and third functions above); or

    (2) the derivatives may not exist as in the second function above, i.e., or , or

    both of them fail to exist at these points.

    Thus a necessary (but not sufficient) condition for the existence of relative

    maximum/minimum is , or one or both of them fails to exist.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 46 of 59

    Saddle Point

    is only a necessary condition for relative maximum/minimum but not

    sufficient. There are points that satisfy this condition but fail to be extreme points.

    Example (45)

    Consider the function ( )

    Solution:

    At the point ( ) , but the function is at maximum along

    certain directions and at minimum along other directions, so it is not an extreme

    point. Since the shape resembles a horse saddle, such points are known as

    saddle points.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 47 of 59

    Test for relative maximum/minimum

    1. Check for critical points, i.e. points at which either , or one or both

    of them do not exists.

    (a) If one or both of and fail to exist, then you have to inspect the

    function around that point to determine whether it is a maximum, a

    minimum or neither one of them. (Luckily we only encounter a few such

    cases.)

    (b) If , and if the first and second order partial derivatives are

    continuous, we may proceed to step 2 and use the second derivative

    test. (Of course, you may inspect the function directly around the point to

    ascertain its nature.)

    2. Second derivative test

    If ( ) ( ) , determine (this is sometimes known as

    the Hessian) at ( ) :

    (a) if (or equivalently, ) and at ( ) , then has a

    relative maximum at ( ) .

    (b) if (or equivalently, ) and at ( ) , then has a

    relative minimum at ( ) .

    (c) if at ( ) , then has a saddle point at ( ) .

    (d) if , the test is inconclusive at ( ) . We have to seek other means to

    determine the behaviour of at ( ) .

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 48 of 59

    Example (46)

    Test the surface for maxima, minima, and saddle points. Find the function values at these points.

    Solution:

    The domain of has no boundary points, and all its derivatives are polynomial functions of ( ) , and so are continuous.

    So maximum/minimum can only occur at the critical points.

    , and

    .

    Solving the two equations simultaneously, the critical points are ( ) and ( ) .

    The discriminant of the function is

    .

    /

    ( )

    ( )

    ( ( )

    )

    ( )( ) ( ) ( )

    At the critical point ( ) , ( ) ( ) , and

    ( ) ( ) , so we conclude that ( ) is a relative minimum point and the function value is ( ) .

    At the critical point ( ) , ( ) ( ) , so we conclude that ( ) is a saddle point and the function value is ( ) .

    The surface is illustrated

    on the left

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 49 of 59

    Example (47)

    Find the absolute maxima and minima of the function

    ( ) which is defined over the closed triangular

    plate in the first quadrant bounded by the lines , , .

    Solution:

    The domain of the function is the triangle in the plane shown below.

    Consider points on the boundary of the triangle and critical points inside the triangle.

    Interior points

    For critical points, we require

    , and

    Solving these equations simultaneously, the solution is ( ) .

    Since this is not an interior but a boundary point, we conclude that there is no

    relative minimum or maximum inside the domain of . We summarize our findings on possible maximum and minimum points in the following table

    So we find that:

    (a) absolute minimum occurs at (0, 0) and its value is 1;

    (b) absolute maximum occurs at (0, 4) and (4, 4) with a value 17.

    ( ) ( ) (0, 0) 1

    (0, 4) 17

    (2, 4) 13

    (4, 4) 17

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 50 of 59

    Example (48) - (The method of least squares)

    An electrical current is fed into an electronic system and the output voltage is

    measured. The experiment is carried out times and a set of data ( ) ,

    ( ), , ( ) is obtained, where are the input currents and

    are the output voltages. Assuming a linear relationship between the input current and the output voltage, we would like to fit the best straight line

    for the set of data..

    Solution:

    Let be the predicted voltage at according to the fitted straight line. Then the error at is ( ) and the method of least squares require that the fitted line should minimize the square of the total sum of errors,

    i.e., minimize . ( )

    .

    Let the equation of the fitted line to be ,

    then . ( )

    Problem: We need to determine and such that is a minimum

    Here, and can take on any real value and so there is no boundary point.

    For interior points, we search for the critical points:

    ( )

    ( ) ( )

    ( )

    (

    ) (

    ) (1)

    ( )

    ( ) ( )

    ( )

    ( )

    (2)

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 51 of 59

    Example (48) - (The method of least squares) contd

    In Statistics, these equations are known as Normal Equations. Solving (1) and

    (2), the critical point is given by

    (

    )(

    )

    (

    )

    ;

    (

    )(

    ) (

    )(

    )

    (

    )

    The second order partial derivatives are

    ( )

    (

    ) ;

    ( )

    (

    ) ;

    ( )

    .

    The discriminant of the function S is

    (

    )

    , ( ) (

    )

    -

    {(

    ) ( )

    } (

    )

    where we exclude the case that all the are equal.

    Since

    (unless all are zero, which we exclude), so our

    second derivative test tells us that the critical point is indeed a minimum

    point.

    Since there is only one minimum point in the whole domain, we conclude that it

    is also the absolute minimum point.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 52 of 59

    Summary on maximum/minimum values of a function

    (1) Relative maximum/minimum values (interior points)

    Step 1

    Determine the critical points:

    (a) , or both of them fail to exist; or

    (b) .

    If (a) then investigate the behaviour of the function near the critical

    points manually (such as sketching some points of the surface.)

    If (b) go to step 2.

    Step 2

    Determine the discriminant (or hessian) of the function, and

    conduct the second derivative test:

    The test is

    inconclusive. Find

    other ways to

    determine the nature

    of the critical point.

    Saddle point (a) or :

    Minimum point.

    (b) or :

    Maximum point.

    (2) Absolute maximum/minimum values

    Determine the maximum/minimum values of the function at its boundary, and

    then find the overall maximum/minimum values among these boundary points

    and the relative maximum/minimum points found in (1).

    Classwork (9)

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 53 of 59

    Gradient

    For a function of a single variable - ( ), the derivative of the function is the slope, the tangent or the gradient.

    For a function of two variables - ( ), the partial derivatives of the function gives a similar property. Graphically, a function of two

    variable will defined by a surface in 3D space.

    The normal to the surface is the direction of

    the gradient. Since direction is involved, the

    gradient for ( ) is a vector. The gradient

    at any point P, ( ) , is the direction in

    which the function ( ) will increase most

    rapidly (at that point ( ) ). The same definition holds for functions with three or

    more variables but it cannot be graphically

    presented.

    Definition

    The gradient of a function

    The gradient of a function ( ) in two dimensions is defined as:

    ( ) ( )

    .

    This definition may be extended for functions with three variables, ( ):

    ( ) ( )

    Note: The gradient of a function is a vector field. This vector field is called a gradient

    vector field or conservative vector field.

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 54 of 59

    Example (49)

    Calculate the gradient for the function ( ) .

    Solution:

    ( ) ( )

    ( ) ( )

    ( )

    ( ) ( )

    Example (50)

    Calculate the gradient for the function ( ) ( ) .

    Solution:

    ( ) ( )

    ( )

    ( ( ))

    ( ( ))

    ( ( ))

    ( )

    ( )

    ( ( ))

    ( )

    (

    ) ( ( ))

    ( )

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 55 of 59

    Directional Derivatives

    We know that

    is the instantaneous rate

    of change of ( ) in the direction of

    the unit vector and that, similarly,

    and

    are the instantaneous rate of change of

    ( ) in the direction of the unit vectors

    and respectively. .

    The gradient of a function can be used to

    find the instantaneous rate of change in

    other directions as follows.

    Definition

    The directional derivative of a function

    Suppose that a function with 2 variables is differentiable at a point P. The

    directional derivative for this function ( ) along an arbitrary unit vector,

    , at point P, denoted by ( ) is defined as:

    ( )

    ( ) ( )

    ( ) ( )

    Note: Scalar (or dot) product: | |

    and

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 56 of 59

    Example (51a): Method 1 by limit

    Find the derivative of the function ( ) in the direction of

    ( ) at the point , ( )

    Solution:

    First, find the unit vector in the direction of

    the unit vector for is given by

    ( )

    The directional derivative is

    ( ) ( )

    (

    ) ( )

    (

    ) (

    ) ( )

    (

    ) (

    ) ( )

    (

    )

    (

    )

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 57 of 59

    Example (51b): Method 1 by partial derivative

    Find the derivative of the function ( ) in the direction of

    ( ) at the point , ( )

    Solution:

    First, find the unit vector in the direction of

    the unit vector for is given by

    ( )

    The directional derivative is

    ( ) ( )

    ( )

    ( )

    ( )

    ( ) ( )

    ( ) ( )

    ( ) ( ) ( ) (

    ( ))

    ( )

    ( )

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 58 of 59

    Example (52):

    Find the tangent line to the curve at the point , ( ) .

    Solution:

    First, let ( )

    ( )

    ( )

    ( )

    ( ) ( )

    ( ) ( )

    Let the vector equation for the tangent line which pass through , ( ) is

    ( ) ( )

    If the two vectors ( ) and are perpendicular to each other,

    then ( ) .

    Therefore, we have ( ) (( ) ( ) )

    ( ) ( )

    The equation for tangent line is:

  • 4. Partial Derivatives

    Advanced Engineering Mathematics [ENG4200] Page 59 of 59

    Example (53):

    Given a function ( ) . (a) Find the direction in which the directional

    derivative is maximal at the point , ( ) . (b) What is the directional derivative in that direction found from (a).

    Solution:

    (a) First, let ( )

    ( )

    ( )

    ( )

    ( ) ( )

    ( ) ( ) ( ) ( )

    The direction for maximal directional derivative is ( )

    and, the unit vector in that direction is

    ( )

    (b) The magnitude of the gradient is

    Hence the direction derivative at the point , ( ) in the direction of

    is .

    Alternative Method for (b):

    Form (a), the unit vector is

    Then, we have ( ) ( ) ( ) (

    )

    (

    )

    --< End of Chapter >--