Lecture 10 Partial derivatives Dan Nichols nichols@math.umass.edu MATH 233, Spring 2018 University of Massachusetts February 27, 2018 Last time: functions of two variables f(x, y) x and y are the independent variables (2) Functions of two variables Domain is a subset of R 2 (2D space). Range is a subset of R (1D number line) Example: f(x, y) = x 2 + 2y 2 Graph of z = f(x, y) is a paraboloid Level curves f(x, y) = k are ellipses (for k > 0) 2 z 1 0 1 0.5 0 x 0.5 1 1 0 y 1
(3) The derivative of a single-variable function We know the derivative of a single-variable function f(x) is defined Why do we care about derivatives? f f(a + h) f(a) (a) = lim. h 0 h The derivative of f lets you zoom in on a specific point and see how f is changing there. f (a) tells you how the function is changing at x = a You can use the derivative to find the tangent line, which is a linear approxmation to f at x = a. The derivative function f (x) tells you the derivative at every value of x. (4) Partial derivatives Let f(x, y) be a function of two variables. We want to be able to zoom in and describe how f is changing at a point (a, b). A single number isn t enough to capture all this information We use two numbers, the partial derivatives of f with respect to x and y. Later, we ll describe how the partial derivatives are actually the components of a vector called the gradient... and we ll use these partial derivatives to construct the tangent plane of f at (a, b), which is a linear approximation.
(5) Partial derivatives Definition Let z = f(x, y). The partial derivative of f with respect to x at the point (a, b), written f x (a, b), is the rate at which z changes near (a, b) when you hold y constant but allow x to vary. More precisely: If we plug in y = b but leave x undetermined, we get a single-variable function g(x) = f(x, b). The partial derivative of f with respect to x at (a, b) is the derivative of g(x) at x = a. The partial derivative of f with respect to y at the point (a, b), written f y (a, b), is the rate at which z changes near (a, b) when you hold x constant but allow y to vary. (6) Partial derivatives The trace of the surface z = f(x, y) in the plane y = b is the curve z = g(x) = f(x, b). The partial derivative f x (a, b) = g (a) is the slope of the tangent to this curve at x = a.
(7) Partial derivatives Definition For a function of two variables f(x, y), the partial derivative of f with respect to x at (a, b) is defined f(a + h, b) f(a, b) f x (a, b) = lim h 0 h ( d = dx x=a f(x, b)) In other words, treat f(x, b) as a single-variable function of x, and take its derivative at x = a. The partial derivative of f with respect to y is f y (a, b) = lim h 0 f(a, b + h) f(a, b) h ( d = dy y=b f(a, y)). (8) Partial derivatives: volume of a cylinder Cylinder volume is a function of radius and height: V (r, h) = πr 2 h. If we set the radius to a fixed number r = r 0, volume becomes a single-variable function of height: V (h) = (πr 2 0)h If we set the height to a fixed number h = h 0, volume becomes a single-variable function of radius: V (r) = (πh 0 )r 2 The partial derivatives of V with respect to r and h are the derivatives of these single-variable functions. wikipedia
(9) Partial derivatives: volume of a cylinder Example 1: The volume of a cylinder is a function of the height and radius given by the formula V (r, h) = πr 2 h. Compute the partial derivatives V r (1, 2) and V h (1, 2) and describe their meaning. To find V r (1, 2), we set h = 2 and view volume as a single-variable function of r: V (r, 2) = 2πr 2 V r (1, 2) is the derivative of V (r, 2) at r = 1: V r (r, 2) = d dr 2πr2 = 4πr V r (1, 2) = 4π Starting with a cylinder of radius 1 and height 2, if you increase the radius by r, the volume will increase by 4π r. (10) Partial derivatives: volume of a cylinder Example 1: (cont.) The volume of a cylinder is a function of the height and radius given by the formula V (r, h) = πr 2 h. Compute the partial derivatives V r (1, 2) and V h (1, 2) and describe what they mean. To find V h (1, 2), we set r = 1 and view volume as a single-variable function of h: V (1, h) = πh V h (1, 2) is the derivative of V (1, h) at h = 2: V h (1, h) = d dh πh = π V h (1, 2) = π Starting with a cylinder of radius 1 and height 2, if you increase the height by h, the volume will increase by π h.
(11) Partial derivatives as multivariable functions Instead of looking at the partial derivatives at a specific point (a, b), we can consider them as multivariable functions of x and y: f x (x, y) = lim h 0 f(x + h, y) f(x, y) h f y (x, y) = lim h 0 f(x, y + h) f(x, y) h To find the partial derivative f x (x, y), just take the derivative of f(x, y) with respect to x as if y were a constant To find the partial derivative f y (x, y), just take the derivative of f(x, y) with respect to y as if x were a constant (12) Partial derivatives: notation f x (x, y) and f y (x, y) refer to the partial derivatives of f with respect to x and y respectively. Let z = f(x, y). The rates of change in z with respect to x and y are written x This is another way to write the partial derivatives. Similar to Leibniz s notation dy dx for the derivative, but use the partial symbol instead of d. The symbol indicates that a quantity depends on multiple variables and we re looking at the partial derivative with respect to just one of those variables.
(13) Partial derivatives: volume of a cylinder Example 2: The volume of a cylinder is V = πr 2 h. Compute the partial derivatives V r and V h as functions of r and h. V r = ( πr 2 h ) r = πh2r = 2πhr V h = ( πr 2 h ) h = πr 2 (14) Partial derivatives: volume of a cylinder V (r, h) = πr 2 h 50 V 0 0 1 r 2 3 0 1 2 h 3
(15) Partial derivatives Example 3: Find both partial derivatives for each of the following two-variable functions. f(x, y) = log x + 3y + 1 f x (x, y) = 1 x f y (x, y) = 3 g(x, y) = ye x+y g x (x, y) = ye x+y g y (x, y) = e x+y + ye x+y h(x, y) = x sin y y cos x h x (x, y) = sin y + y sin x h y (x, y) = x cos y cos x p(x, y) = x y + y 2 p x (x, y) = yx y 1 p y (x, y) = x y ln x + 2y (16) Implicit differentiation Sometimes we have no explicit function z = f(x, y), but we know an implicit relationship F (x, y, z) = 0. We can use implicit differentiation to find the partial derivative of z with respect to x or y. Differentiate everything with respect to x, treating z as a function of x and y as a constant. Make sure to use the chain rule and product rule when appropriate Every time z appears in the expression, you ll get something involving x Then solve for x Just like the process for implicit differentiation with two variables, only now we use x instead of d dx
(17) Implicit differentiation: example Example 4: Find the partial derivatives x and where x, y, and z are related by the equation x 3 + 2yz x + z 2 = 1. Partial with respect to x: 3x 2 + 2y x (when y + z 0) 1 + 2z x = 0 (2y + 2z) x = 1 3x2 x = 1 3x2 2y + 2z Partial with respect to y: 0 + 2y (when y + z 0) + 2z + 0 + 2z = 0 (2y + 2z) = 2z = z y + z (18) Functions of more than two variables If one variable is a function of n other variables then it has n partial derivatives: y = f(x 1, x 2,..., x n ) x 1, x 2,..., x n To find the partial derivative of f with respect to a variable x i, treat all the other variables as constants and take the derivative as if x i were the only variable. Next week we ll learn the multivariable version of the chain rule.
(19) Functions of more than two variables: example Example 5: Find the partial derivatives of y with respect to the four independent variables x 1, x 2, x 3, and x 4. y = x 1 x 2 3 + x 2 x 4 + x 2 x 3 x 4 1 x 1 = x 2 3 x 2 = 1 x 4 + x 3 x 4 x 3 = 2x 1 x 3 + x 2 x 4 x 4 = x 2 x 2 4 + x 2 x 3 (20) Second partial derivatives Recall: The second derivative of f(x) is the derivative of the derivative of f(x). f (x) = d2 dx 2 f(x) = d ( ) d dx dx f(x) For a multivariate function, we can define second partial derivatives, but the situation is a little bit more complicated.
(21) Second partial derivatives The second partial derivatives of z = f(x, y) are the partial derivatives of the partial derivatives of f. f xx = (f x ) x = x f xy = (f x ) y = x = 2 z x 2 x = 2 z x f yx = (f y ) x = x = f yy = (f y ) y = 2 z x = 2 z 2 These are sometimes called the double partials. For instance, f xx is the double partial of z with respect to x. A function of n variables has n partial derivatives and n 2 second partial derivatives (and n 3 third partial derivatives, etc.) (22) Second partial derivatives: example Example 6: Compute the first and second partial derivatives of z. z = x y 2 + 1 + log(x + y) x3 2 z x 2 = 12 x 5 + 1 (x + y) 2 = 2x y 3 + 1 x + y 2 z x = 2 y 3 + 2 z x = 2 y 3 + 1 (x + y) 2 1 (x + y) 2 2 z 2 = 6x y 4 + 1 (x + y) 2
(23) Second partial derivatives: Clairaut s theorem The second partial derivatives of most functions have a useful property. Theorem (Clairaut s Theorem) Suppose f(x, y) is defined in a neighborhood of a point (a, b). If f xy and f yx exist and are continuous in a neighborhood of (a, b), then f yx (a, b) = f xy (a, b) Or: f xy and f yx are always the same, except maybe at points where f is discontinuous or not completely differentiable. (24) Second partial derivatives: example Example 7: Find the second partial derivatives of the function f(x, y) = x log y ye x. f x (x, y) = log y ye x f xx (x, y) = ye x f y (x, y) = x y ex f yy (x, y) = x y 2 f xy (x, y) = f yx (x, y) = 1 y ex Notice that the domain of f is the upper half-plane y > 0. The function f and all of its derivatives are continuous there, so Clairaut s theorem holds in the entire domain.
(25) Partial differential equations A differential equation (or DE) is an equation involving some quantity and its derivatives. Familiar examples: F = m d2 r dt 2 d 2 u dt 2 + u = 0 dx dt = kx A function which satisfies a DE is called a solution to that DE. DEs where all derivatives are taken with respect to the same variable are called ordinary differential equations (ODEs). Often all the derivatives are with respect to t (time), and the DE describes the evolution of a system over time. (26) Partial differential equations Definition A DE involving partial derivatives with respect to different variables is called a partial differential equation (PDE). For example: x + y x + x + y xy z = 1 These can describe a huge variety of systems, laws, and relationships
(27) Partial differential equations Laplace s equation: 2 u x 2 + 2 u 2 = 0 Solutions to this DE are called harmonic functions. They have many nice properties Used to describe thermodynamics, electromagnetism, fluid flow, etc... Example solution: u(x, y) = e x sin y (28) Partial differential equations Wave equation: 2 u t 2 = a2 2 u x 2 x is position, t is time, u(x, t) is the amplitude (height) of the wave a is a constant parameter which sets the behavior of the wave Notice that if a 2 = 1 this is just Laplace s equation Example solution: u(x, t) = cos(x + at) This equation is the basis for the Schrödinger wave equation, which is fundamental in quantum mechanics: i Ψ(r, t) = ĤΨ(r, t) t
(29) Partial differential equations PDEs can be extremely hard (or impossible) to solve There may be no analytical solution Major research area in applied math Nevertheless, knowing how to solve even very simple PDEs like the wave equation is very useful. You don t need to be able to solve PDEs for this class, but you should be able to verify solutions. Example 8: Verify that f(x, y) = e x sin y is harmonic (satisfies Laplace s equation 2 f + 2 f = 0) x 2 2 (30) Hyperbolic functions One of the questions on HW 14.3 mentions the hyperbolic functions, sinh (hyperbolic sine) and cosh (hyperbolic cosine) These are like versions of sine and cosine for the hyperbola x 2 y 2 = 1 instead of the unit circle. sinh t = 1 ( e t e t) 2 cosh t = 1 ( e t + e t) 2 These functions are solutions of the DE u d2 u dt 2 = 0. Check out section 3.11 if you want to learn more. d sinh t = cosh t dt d cosh t = sinh t dt
(31) Partial derivatives: examples Example 9: Compute the first and second partial derivatives of the function z = ln(e x + e y ). Does it satisfy either of the following PDEs? x + = 1 2 z 2 ( z 2 ) 2 x 2 2 z = 0 x x = = ex e x + e y ey e x + e y 2 z x 2 = 2 z 2 = e x+y (e x + e y ) 2 e x+y (e x + e y ) 2 2 z x = ex+y (e x + e y ) 2 (32) Partial derivatives: summary Given z = f(x, y), the partial derivative with respect to x is written f x (x, y) or x. To compute f x (x, y), treat y as a constant and take the derivative of f(x, y) as if it were a function of x only. f x (a, b) is the rate of change in z caused by changes in x at the point (a, b). PDEs are equations involving partial derivatives. Some simple PDEs like Laplace s equation are easy to solve.
(33) Homework Paper homework #10 due Thursday Homeworks 14.1, 14.2 due tomorrow night