9. The derivative The derivative of a function represents the best linear approximation of that function. In one variable, we are looking for the equation of a straight line. We know a point on the line so that we only need to determine the slope. Definition 9.1. Let f : R −→ R be a function and let a ∈ R be a real number. f is differentiable at a, with derivative λ ∈ R, if f(x) − f(a)lim = λ. xa x − a→To understand the definition of the derivative of a multi-variable function, it is slightly better to recast (9.1): Definition 9.2. Let f : R −→ R be a function and let a ∈ R be a real number. f is differentiable at a, with derivative λ ∈ R, if f(x) − f(a) − λ(x − a)lim =0. xa→x − a We are now ready to give the definition of the derivative of a function of more than one variable:z Definition 9.3. Let f : Rn −→ Rm be a function and let P ∈ Rn be a point. f is differentiable at P , with derivative the m × n matrix A, if f(Q) − f(P ) − A−→PQ lim =0. Q→P �−→PQ� We will write Df(P )= A. So how do we compute the derivative? We want to find the matrix A. Suppose that �� ab A = cd Then � � � � � � Aˆe1 = A a c b d 1 0 = a c and � � � � � � Aˆe2 = A a c b d 0 1 = b d . In general, given an m × n matrix A, we get the jth column of A, simply by multiplying A by the column vector determined by ˆej . So we want to know what happens if we approach P along the line determined by ˆej . So we take −→= ej , where h goes to zero. InPQ hˆ1 ��������� �other words, we take Q = P + heˆj . Let’s assume that h> 0. Sowe consider the fraction f(Q) − f(P ) − A(heˆj) f(Q) − f(P ) − A(heˆj ) = �−→PQ� h f(Q) − f(P ) − hAeˆj= h = f(Q) − f(P ) − Aeˆj . hTaking the limit we get the jth column of A,Aeˆj = lim f(P + heˆj ) − f(P ) .h0 h→Now f(P + heˆj ) − f(P ) is a column vector, whose entry in the ith row is fi(P +ˆej )−fi(P )= fi(a1,a2,...,aj−1,aj +h,aj+1,...,an)−fi(a1,a2,...,aj−1,aj ,aj+1,...,an). and so for the expression on the right, in the ith row, we have fi(P + heˆj ) − fi(P )lim . h0 h→Definition 9.4. Let g : Rn −→ R be a function and let P ∈ Rn . The partial derivative of f at P =(a1,a2,...,an), with respect to xj is the limit ∂f ∂xj g(a1,a2,...,aj + h,...,an) − g(a1,a2,...,an) = lim . h0 hP →Putting all of this together, we get Proposition 9.5. Let f : Rn −→ Rm be a function. If f is differentiable at P , then Df(P ) is the matrix whose (i,j) entry is the partial derivative ∂fi ∂xj P .Example 9.6. Let f : A −→ R2 be the function f(x,y,z)=(x 3 y + x sin(xz), log xyz). Here A ⊂ R3 is the first octant, the locus where x, y and z are all positive. Supposing that f is differentiable at P , then the derivative is given by the matrix of partial derivatives, 3x2y + sin(xz)+ xz cos(xz) x3 x2 cos(xz)Df(P )=1 11 . x yz 2 ���� ���� ������ ���� ����� � � � � ��Definition 9.7. Let f : Rn −→ R be a differentiable function. Then at P , Df(P ) is a row vector, which is called the ��gradient of f,andisdenoted (f)�the derivative of fP , ∂f∂f∂f().,,...,∂x1 ∂x2 ∂xnP P P The point (x1,x2,...,xn,xn+1) lies on the graph of f : Rn −→ R if and only if xn+1 = f(x1,x2,...,xn). The point (x1,x2,...,xn,xn+1) lies on the tangent hyperplane of f : Rn −→ R at P =(a1,a2,...,an) if and only ifP xn+1 = f(a1,a2,...,an)+(�f) (x1 − a1,x2 − a2,...,xn − an).· In other words, the vector ∂f ���� P ,...,∂f∂xn ∂f(, −1),,∂x1 ∂x2P P is a normal vector to the tangent hyperplane and of course the point (a1,a2,...,an,f(a1,a2,...,an)) is on the tangent hyperplane. Example 9.8. Let D = { (x,y) ∈ R2 | x 2 + y 2