Multivariate Calculus

Similar documents
Section 15.3 Partial Derivatives

Similarly, the point marked in red below is a local minimum for the function, since there are no points nearby that are lower than it:

14.4. Tangent Planes. Tangent Planes. Tangent Planes. Tangent Planes. Partial Derivatives. Tangent Planes and Linear Approximations

Maxima and Minima. Terminology note: Do not confuse the maximum f(a, b) (a number) with the point (a, b) where the maximum occurs.

2.1 Partial Derivatives

Calculus II Fall 2014

CHAPTER 11 PARTIAL DERIVATIVES

Lecture 19 - Partial Derivatives and Extrema of Functions of Two Variables

[f(t)] 2 + [g(t)] 2 + [h(t)] 2 dt. [f(u)] 2 + [g(u)] 2 + [h(u)] 2 du. The Fundamental Theorem of Calculus implies that s(t) is differentiable and

Exam 2 Review Sheet. r(t) = x(t), y(t), z(t)

Math 32, October 22 & 27: Maxima & Minima

18.3. Stationary Points. Introduction. Prerequisites. Learning Outcomes

11.7 Maximum and Minimum Values

SYDE 112, LECTURE 34 & 35: Optimization on Restricted Domains and Lagrange Multipliers

Review Sheet for Math 230, Midterm exam 2. Fall 2006

Math 2411 Calc III Practice Exam 2

Math 5BI: Problem Set 1 Linearizing functions of several variables

Solutions to the problems from Written assignment 2 Math 222 Winter 2015

Practice problems from old exams for math 233

Math 148 Exam III Practice Problems

Math 233. Extrema of Functions of Two Variables Basics

MATH 8 FALL 2010 CLASS 27, 11/19/ Directional derivatives Recall that the definitions of partial derivatives of f(x, y) involved limits

Functions of several variables

Final Exam Review Problems. P 1. Find the critical points of f(x, y) = x 2 y + 2y 2 8xy + 11 and classify them.

Partial Differentiation 1 Introduction

FUNCTIONS OF SEVERAL VARIABLES AND PARTIAL DIFFERENTIATION

Calculus 3 Exam 2 31 October 2017

Name: ID: Section: Math 233 Exam 2. Page 1. This exam has 17 questions:

MATH 12 CLASS 9 NOTES, OCT Contents 1. Tangent planes 1 2. Definition of differentiability 3 3. Differentials 4

LECTURE 19 - LAGRANGE MULTIPLIERS

MATH 261 EXAM II PRACTICE PROBLEMS

Review Problems. Calculus IIIA: page 1 of??

4 to find the dimensions of the rectangle that have the maximum area. 2y A =?? f(x, y) = (2x)(2y) = 4xy

Level Curves in Matlab

MATH 259 FINAL EXAM. Friday, May 8, Alexandra Oleksii Reshma Stephen William Klimova Mostovyi Ramadurai Russel Boney A C D G H B F E

Mock final exam Math fall 2007

Definitions and claims functions of several variables

Chapter 9 Linear equations/graphing. 1) Be able to graph points on coordinate plane 2) Determine the quadrant for a point on coordinate plane

REVIEW SHEET FOR MIDTERM 2: ADVANCED

Review guide for midterm 2 in Math 233 March 30, 2009

ANSWER KEY. (a) For each of the following partials derivatives, use the contour plot to decide whether they are positive, negative, or zero.

ES 111 Mathematical Methods in the Earth Sciences Lecture Outline 6 - Tues 17th Oct 2017 Functions of Several Variables and Partial Derivatives

B) 0 C) 1 D) No limit. x2 + y2 4) A) 2 B) 0 C) 1 D) No limit. A) 1 B) 2 C) 0 D) No limit. 8xy 6) A) 1 B) 0 C) π D) -1

Differentiable functions (Sec. 14.4)

The Chain Rule, Higher Partial Derivatives & Opti- mization

Lecture 4 : Monday April 6th

MATH Review Exam II 03/06/11

266&deployment= &UserPass=b3733cde68af274d036da170749a68f6

The 21 st Century Wireless Classroom Network for AP Calculus

Math for Economics 1 New York University FINAL EXAM, Fall 2013 VERSION A

Section 14.3 Partial Derivatives

Unit 7 Partial Derivatives and Optimization

I II III IV V VI VII VIII IX X Total

Review for Mastery. Identifying Linear Functions

Math 259 Winter Recitation Handout 9: Lagrange Multipliers

Exam 2 Summary. 1. The domain of a function is the set of all possible inputes of the function and the range is the set of all outputs.

EXERCISES CHAPTER 11. z = f(x, y) = A x α 1. x y ; (3) z = x2 + 4x + 2y. Graph the domain of the function and isoquants for z = 1 and z = 2.

11.2 LIMITS AND CONTINUITY

i + u 2 j be the unit vector that has its initial point at (a, b) and points in the desired direction. It determines a line in the xy-plane:

Section 3: Functions of several variables.

Joint Distributions, Independence Class 7, Jeremy Orloff and Jonathan Bloom

Calculus I Handout: Curves and Surfaces in R 3. 1 Curves in R Curves in R 2 1 of 21

Practice problems from old exams for math 233

Test Yourself. 11. The angle in degrees between u and w. 12. A vector parallel to v, but of length 2.

This exam contains 9 problems. CHECK THAT YOU HAVE A COMPLETE EXAM.

We like to depict a vector field by drawing the outputs as vectors with their tails at the input (see below).

Examples: Find the domain and range of the function f(x, y) = 1 x y 2.

Discussion 8 Solution Thursday, February 10th. Consider the function f(x, y) := y 2 x 2.

MATH 105: Midterm #1 Practice Problems

Chapter 16. Partial Derivatives

Sect 4.5 Inequalities Involving Quadratic Function

Math 1205 Trigonometry Review

WESI 205 Workbook. 1 Review. 2 Graphing in 3D

Calculus of Several Variables

MATH 234 THIRD SEMESTER CALCULUS

Math 2321 Review for Test 2 Fall 11

Pre-AP Algebra 2 Unit 8 - Lesson 2 Graphing rational functions by plugging in numbers; feature analysis

11/18/2008 SECOND HOURLY FIRST PRACTICE Math 21a, Fall Name:

Instructions: Good luck! Math 21a Second Midterm Exam Spring, 2009

Georgia Department of Education

MULTI-VARIABLE OPTIMIZATION NOTES. 1. Identifying Critical Points

INTRODUCTION TO MATLAB by. Introduction to Matlab

10 GRAPHING LINEAR EQUATIONS

Exam 1 Study Guide. Math 223 Section 12 Fall Student s Name

Chapter 7, Part 1B Equations & Functions

Partial derivatives and their application.

Determine the intercepts of the line and ellipse below: Definition: An intercept is a point of a graph on an axis. Line: x intercept(s)

Math Labs. Activity 1: Rectangles and Rectangular Prisms Using Coordinates. Procedure

14.1 Functions of Several Variables

SOLUTIONS 2. PRACTICE EXAM 2. HOURLY. Problem 1) TF questions (20 points) Circle the correct letter. No justifications are needed.

Section 1.3. Slope formula: If the coordinates of two points on the line are known then we can use the slope formula to find the slope of the line.

Chapter 2: Functions and Graphs Lesson Index & Summary

Math Final Exam - 6/11/2015

Conic and Quadric Surface Lab page 4. NORTHEASTERN UNIVERSITY Department of Mathematics Fall 03 Conic Sections and Quadratic Surface Lab

CSCD 409 Scientific Programming. Module 6: Plotting (Chpt 5)

Content Area: Mathematics- 3 rd Grade

Lecture 15. Global extrema and Lagrange multipliers. Dan Nichols MATH 233, Spring 2018 University of Massachusetts

11/1/2017 Second Hourly Practice 2 Math 21a, Fall Name:

Unit 8 Trigonometry. Math III Mrs. Valentine

6.1 Slope of a Line Name: Date: Goal: Determine the slope of a line segment and a line.

Transcription:

Multivariate Calculus Partial Derivatives 1 Theory Recall the definition of the partial derivatives of a function of two variables, z = f(x, y): f x = lim f(x + x, y) f(x, y) x 0 x f y f(x, y + y) f(x, y) = lim y 0 y The notion of a limit is required to define the instantaneous rate of change of a function because when we take x = 0 or ( y = 0) the numerator and the denominator of the difference quotient both evaluate to 0. However, for many functions if you fix a point, (x, y ) in the domain, the slopes of the secant lines (defined between x and x + x) get arbitrary close to a unique number, provided you choose x small enough. This is the intuitive definition of the limit existing as x goes to 0 and is how we define the derivative of a function at the point x. Recall that a plane passing through the point (p x, p y, p z ) can be expressed with an equation of the form or equivalently, if c 0, a(x p x ) + b(y p y ) + c(z p z ) = 0, z = p(x, y) = [ a c (x p x) + b ] c (y p y) + p z. If we fix a value of y = p y then this equation becomes z = p(x, p y ) = a c (x p x) + p z, which is an equation for a line with slope a/c. If z = p(x, y) is the plane tangent to a surface given by z = f(x, y), passing through the point (p x, p y, p z ), then the slope a/c is also equal to the partial derivative f (p x x, p y ). Similarly if we hold x = p x fixed we have 1

z = p(p x, y) = b c (y p y) + p z, and the slope of this line ( b/c) is the partial derivative f y (p x, p y ). Finally, the value p z must be equal to f(p x, p y ) since the tangent plane touches the surface exactly at the point of tangency (p x, p y, p z ) = (p x, p y, f(p x, p y )). Putting this all together we derive a formula for the tangent plane to a differentiable function f : R 2 R at the point (p x, p y ) in the domain of f: z = p(x, y) = f x (p x, p y ) (x p x ) + f y (p x, p y )(y p y ) + f(p x, p y ). If a function attains a maximum, or a minimum in the interior of its domain and the derivative is defined there, then the derivative (in any direction) must be 0. But the derivative at a point might be 0 even if the function does not attain a max or a min there. As we have seen, this point could be a saddle point (where along certain directions the point is a maximum, while along others it is a minimum). This lab explores these concepts. 2 Matlab Useful Matlab Functions/Concepts: surf(x,y,z) Matlab has several tools for creating 3-dimensional plots of data in three dimensions. The one we will be utilizing most frequently in this course is the surf(x,y,z) command, which generates a surface from data. This command accepts inputs of several different types but we will primarily choose X and Y to be vectors. If X and Y are vectors, length(x) = n and length(y) = m, where [m,n] = size(z) then the vertices of the surface faces are (X(j),Y(i), Z(i,j)) triples. As with the plot() command, the surf() command only knows how to interpret a list of data points. Thus, to represent the graph of a function, you must create a list of inputs and corresponding outputs. For a surface there are two inputs (X and Y) and one output (Z). In order to compute the height of the surface Z(i,j) for each pair of inputs X(i), Y(j) you can use the meshgrid(x,y) function to create a grid of inputs 2

which can then be used to evaluate the height of the surface over each point in the XY-plane. Example: >> clear >> clc >> X = linspace(-4,1,50); >> Y = linspace(-2,3,70); >> [XX,YY] = meshgrid(x,y); >> Z = 2.*XX.^2-3.*YY.^2; >> surf(x,y,z) find(x) Often you will want to find elements of an array satisfying certain conditions. For example if you are only interested in positive values, only the 5ht, 6th, and 7th values in the list { 4, 3, 2, 0, 1, 2, 9} are of interest to you. The find(x) function takes in an array X and returns a list of the linear indices of the nonzero elements of X. For example if you enter the command >> find([-4,-3,-2,0,1,2,9]), Matlab will return the array [1,2,3,5,6,7], indicating that the numbers in positions 1, 2, 3, 5, 6, and 7 are nonzero. You can use the find function to identify elements which satisfy more complicated conditions than being nonzero when you pair it with logical indexing. Recall that relations like ==, >, < can be used to produce logical arrays of 0s and 1s. Then the find function can be used on the resulting logical array to find all 1s (i.e. all those indices which satisfy the condition which produced the logical array). Example: >> A = [-4,-3,-2,0,1,2,9] >> A > 0 >> find(a > 0) >> A(find(A>0)) The second command should produce the logical array [0,0,0,0,1,1,1] and the third command will produce the list of indices [5,6,7]. You 3

can use a list of indices (the output of the find function) to extract only those elements of A which satisfy the condition greater than 0, as is done with the fourth command which should return the list of the 5th, 6th and 7th elements of A (i.e. [1,2,9]). 3 Experimentation 3.1 Investigation 1 This investigation concerns the function of 2 variables z = f(x, y) = x 2 y 2. Step 1: Create a grid of input values using the meshgrid(x,y) function, for the range of inputs 1 x, y 1 and produce the output array according to the above formula. Step 2: Plot the surface z = f(x, y) using the surf(x,y,z) command. Step 3: The point in space (1,2,-3) is on the surface z = f(x, y). Use the scatter3(x,y,z) function to plot this point on the same figure window as the surface plot, and verify that the point appears to be on the graph of this function. Step 4: Create a list deltax = linspace(0,.1,50) and for each value, x, in the list compute the difference quotient where (x, y ) = (1, 2). f(x + x, y ) f(x, y ) x As x approaches 0, to what does the difference quotient converge? Is this consistent with what you expect f/ x at (1, 2) to be? 3.2 Investigation 2 This investigation concerns the function z = f(x, y) = x 2 y 2 + 3. We hope to compute the plane tangent to the point (p x.p y, p z ) = (1, 1, 1) on the surface. 4

Step 1: In a script define variables px = 1, py = 1 and pz = -px^2-py^2+3. Step 2: Compute by hand the partial derivatives f f and and define variables dfdx and dfdy to be functions of px, py, and pz according to the x y formulas you derive. Step 3: Create two grids of inputs using the meshgrid(x,y) function, one over the range 2 x, y 2 and one over the range px 1/2 x px + 1/2 and py 1/2 y py + 1/2. Compute and plot the surface z1 = f(x,y) over the first meshgrid, and z2 = p(x,y) = dfdx(x-px)+dfdy(y-py)+pz over the second. For px = py = 1 is the plane tangent to the surface? Change px and py and verify that the planes are tangent to the surface at the specified point. 3.3 Investigation 3 This investigation concerns the function z = f(x, y) = x 3 + 6xy 2 2y 3 12x. Step 1: Plot the surface z = f(x, y) over the range 3 x, y 3. Step 2: By hand compute the stationary points (where f/ x = f/ y = 0) of f(x, y) and plot them on the same figure as the surface. By looking at the points on the surface, classify each as either a min, max, or saddle point. Step 3: By hand compute formulas for the second derivatives f xx, f yy, and f xy. Use Matlab to compute f xx, f yy, and f xx f yy f 2 xy at each stationary point. If possible, use these quantities confirm that your classifcation of the stationary points is correct. Step 4: By hand compute f(x, y) at the point (x, y) = ( 2, 2). Then construct the variable deltax = linspace(0,.5,50), and for each x in deltax compute the point (x, y) = (0, 1) + ( f/ f )(δx). For each such point (x, y), scatter plot the points (x, y, 0) and (x, y, f(x, y)) on the same figure as the surface. 5

The points (x, y, 0) in the domain represent points along the gradient direction. The points (x, y, f(x, y)) on the surface are the correspoding function values. How are the function values changing as the inputs move away from the point (0,1)? If you were to change inputs along any other direction, describe how you think the function values will change relative to how the function values change along the gradient direction. 4 Application Create a new Matlab script called lastname partials.m which performs the following steps and use it to answer the questions in this lab. In a study on the Northern Blowfly, the crawling speed of the larvae was found to be a function of larvae body length l and ambient temperature T, v(l, T ) =.65lT e.315l.03t 1.2, measured in cm/min. This function was derived from data gathered from larvae whose lengths ranged from 1 to 10 mm over temperature ranges from 0 to 40 degrees Celsius. This result is very useful in forensic entomology and can be used to estimate the time that elapsed following a larvas departure from a corpse. 4.1 Coding: Step 1: Plot the function v(l, T ) as a function over the range 1 l 10 and 0 T 40. (Choose a mesh with 100 data points over each variable range). Step 2: Compute the partial derivatives of v(l, T ) by hand (see Question 1) and use these equations to plot the partial derivatives as surfaces over the same variable ranges as the original function. Each plot should be in a separate figure window. Step 3: Compute the values of the partial derivatives at the following length and temperature vector: (l, T ) = (5, 16) and store these values in the variables dvdl and dvdt. 6

Step 4: Fix a variable temp = 27 degrees Celsius and plot the graph of velocity as a function of just larvae length from 1 to 10 mm, for this fixed value of temperature. In other words plot the function v(l, 27) over the range 1 l 10. Step 5: Use the find(x) function to identify the range of larvae lengths which move at speeds greater than 3 cm/min, at 27 degrees Celsius. Store all lengths of larvae which can acheive at least 3 cm/sec in a list called fastlarvae. 4.2 Questions: Question 1: What are the partial derivatives of v(l, T )? Question 2: Does there appear to be a value for temperate and length which maximizes the speed of the larvae? Is so what is it approximately? Question 3: Will a longer larvae always be faster than a shorter larvae according to this model? Question 4: A larvae is 5 mm long in an ambient temperate of 16 degrees Celsius. If the ambient temperate rises just a little, will the larvae s speed increase or decrease? Question 5: What is the approximate length and speed of the fastest larvae at 27 degrees Celsius? Question 6: Approximately what is the longest and the shortest larvae which can move at least at 3 cm/min at 27 degrees Celsius? 7