ΘρϵηΠατπ

directional derivative
Let f:n and let a,vn, then the directional derivative of f at a along v is defined as
vf(a):=limh0f(a+hv)f(a)h
Partial Derivative
Let f:n and let an. The partial derivative with respect to xi is:
xif(a):=eif(a)
Frozen Function
Suppose that f:n and an then we can define a new function fi,a: by fi,a(h):=f(a+hei).

The frozen function get's it's name because it can be thought of by taking the sample point a and then freezing in all directions except for along the i-th component of the input for f

Partial Derivative becomes frozen function derivative
fxi(a)=ddh[fi,a(h)]
TODO
Todo
Consider the function f(x,y,z)=x2+y2+z2, and the point (a1,a2,a3)3 then show that fy,a(h) equals the function g(x)=a12+(x)2+a32
Let's start by looking at the definition of f2,a(h)=f(a+he2) now recall that e2=(0,1,0), so that f(a+he2)=f((a1,a2,a3)+(0,h,0))=f(a1,a2+h,a3)=(a1)2+(a2+h)2+(a3)2
Todo
compute the partial derivative with resepct to y of f(x,y,z)=x2+y2+z2
Leaving x and z as constants, and evaluating the derivative as f(x,y,z)=C+y2+C, using the sum rule and the power rule, the derivative becomes yf(x,y,z)=2y
Gradient
The gradient of a function f:nR at the point p is defined as f(p):=(f(x1)(p),f(x2)(p),,f(xn)(p))
Todo
Suppose we have the fnction f(x,y)=sin(x), and (p1,p2)2 show that f(p)=(cos(p1),0)
By definition f(p)=(fx1(p),fx2(p)). Since we know that fx1=ddh(f1,p(h)), and we know that f1,p(h)=f(p+he1) since he1=(h,0) so p=(p1,p2) so p+he1=(p1+h,p2) so then f(p+he1)=sin(p1+h), evaluating the limit from the directional derivative, it evaluates to cos(p1)

we will show that fx2(p)=0, we know that f2,p(h)=f(p+he2)=cos(p1) and thus it is a constant funtion, this implies tha directional derivative is 0

Therefore we can se that f(p)=(cos(p1),0)

differentaibility
a function f:Am with An is differentiable at the point an if there exists a linear transformation T:nm such that
limxaf(x)(f(a)+T(xa))xa=0
Quadratic Function is Differentiable at a Point
Let f:2 be given by f(x,y)=x2+y2. Show that f is differentiable at a=(1,1).
Define T:2 by T(h,k)=2h2k. This is a linear transformation. For (x,y)2, write (h,k)=(x,y)(1,1)=(x1,y+1). Then f(x,y)(f(1,1)+T(h,k))=x2+y2(2+2(x1)2(y+1))=(x1)2+(y+1)2=(h,k)2. Therefore |f(x,y)(f(1,1)+T((x,y)(1,1)))|(x,y)(1,1)=(x,y)(1,1). As (x,y)(1,1), the right side tends to 0. Hence f is differentiable at (1,1).
Euclidean Norm is Not Differentiable at the Origin
Let f:2 be the Euclidean norm function f(x,y)=(x,y). Show that f is not differentiable at (0,0).
Suppose for contradiction that f is differentiable at (0,0). Then there exists a linear transformation T:2 such that lim(x,y)(0,0)|(x,y)T(x,y)|(x,y)=0. Taking points (t,0) with t>0, we get 0=limt0+|tT(t,0)|t=|1T(1,0)|, so T(1,0)=1. Taking points (t,0) with t<0, we get 0=limt0|tT(t,0)|t=|1+T(1,0)|, so T(1,0)=1. This is impossible. Therefore no such linear transformation T exists, and f is not differentiable at (0,0).
continuous partials implies differentiability
If all the partial derivatives of a function exist in a neighborhood of a point x0 and are continuous at the point x0, then the function is differentiable at that point x0
ToDo
Derivative is Unique
Suppose that f:nm is differentiable at an. Then there is a unique linear transformation T:nm such that limh0|f(a+h)f(a)T(h)||h|=0. This linear transformation is denoted Df(a).
Derivative at a Point
Suppose that f:nm is differentiable at an. The derivative of f at a, denoted Df(a), is the unique linear transformation T:nm from the derivative uniqueness theorem.

Thus Df(a) is not a number in general. It is a linear map that takes a small displacement hn and returns the best linear approximation to the change f(a+h)f(a).

Derivative of the Identity Function
Let idn:nn be the identity function. For every an, Didn(a)=idn. Equivalently, for every vn, Didn(a)(v)=v.
Let T=idn. Then T is a linear transformation. For every h0, idn(a+h)idn(a)T(h)h=(a+h)ahh=0. Therefore T satisfies the defining limit for the derivative of idn at a. By derivative uniqueness, Didn(a)=idn. Applying both sides to v gives Didn(a)(v)=v.
Derivative of Squared Norm
Let S:n,S(x)=xx. Show that S is differentiable at every an, and that for every vn, DS(a)(v)=2av.
Fix an. Define T:n,T(h)=2ah. This is a linear transformation. For hn, S(a+h)S(a)T(h)=(a+h)(a+h)aa2ah. Expanding with the distributivity of the dot product and symmetry of the dot product gives S(a+h)S(a)T(h)=hh. Therefore |S(a+h)S(a)T(h)|h=|hh|h=h0 as h0. Thus T satisfies the defining limit for the derivative of S at a. By the definition of derivative at a point, DS(a)=T. Applying both sides to v gives DS(a)(v)=2av.
Jacobian Matrix
If f:nm is differentiable at a, then Df(a) is a linear transformation nm. Its matrix with respect to the standard bases En and Em is called the Jacobian matrix of f at a, and is denoted [Df(a)]EmEn. The notation f(a) is also used for this matrix, but Df(a) itself denotes the derivative as a linear transformation.
Jacobian Entries are Partial Derivatives
Let f:nm be differentiable at a, and write f=(f1,,fm). Then the i,j-entry of the Jacobian matrix is the j-th partial derivative of the i-th component: ([Df(a)]EmEn)i,j=Djfi(a). Equivalently, [Df(a)]EmEn=[f1x1(a)f1x2(a)f1xn(a)f2x1(a)f2x2(a)f2xn(a)fmx1(a)fmx2(a)fmxn(a)].
Let T=Df(a). By the standard matrix theorem for linear transformations, the j-th column of [T]EmEn is T(ej), where ej is the j-th vector in the standard basis of n. Therefore ([Df(a)]EmEn)i,j=(T(ej))i. Since T is the derivative of f at a, f(a+tej)=f(a)+T(tej)+r(t),r(t)|t|0 as t0. Taking the i-th component and using the linearity of T, fi(a+tej)fi(a)t=(T(ej))i+ri(t)t. The final term tends to 0, so the limit on the left exists and equals (T(ej))i. By the definition of partial derivative, that limit is Djfi(a). Hence Djfi(a)=([Df(a)]EmEn)i,j. Since this holds for every i and every j, the displayed matrix formula follows.
Differentiability Implies Continuity
If f:nm is differentiable at a, then f is continuous at a.
Chain Rule for Total Derivatives
Suppose that f:nm is differentiable at a, and g:mp is differentiable at f(a). Then the composition gf is differentiable at a, and D(gf)(a)=Dg(f(a))Df(a). Equivalently, [D(gf)(a)]EpEn=[Dg(f(a))]EpEm[Df(a)]EmEn.
Basic Derivative Rules in Euclidean Space
The following derivative rules hold:
  • If f:nm is constant, then Df(a)=0.
  • If f:nm is linear, then Df(a)=f.
  • If f:nm, then f is differentiable at a if and only if each component fi is differentiable at a, and Df(a)=(Df1(a),,Dfm(a)).
  • If f,g:n are differentiable at a, then D(f+g)(a)=Df(a)+Dg(a).
  • If f,g:n are differentiable at a, then D(fg)(a)=g(a)Df(a)+f(a)Dg(a).
  • If g(a)0, then D(fg)(a)=g(a)Df(a)f(a)Dg(a)g(a)2.
Mixed Partials Commute Under Continuity
If Di,jf and Dj,if are continuous on an open set containing a, then Di,jf(a)=Dj,if(a).
Higher-Order Partial Derivative
A partial derivative of order k is obtained by applying partial derivative operators k times in sequence. For example, Di,jf=Di(Djf) is a partial derivative of order 2.
C Function
Interior Extremum has Zero Partials
Let An. If f:A has a maximum or minimum at a point a in the interior of A, and Dif(a) exists, then Dif(a)=0.
Matrix Norm
If A is an m×n matrix, its norm is |A|=i=1mj=1nai,j2.
Mean Value Inequality in Euclidean Space
Suppose that An is open, f:Am is differentiable, and the line segment from a to b lies in A. If |Df(x)|M for every point x on that segment, then |f(b)f(a)|M|ba|.
Continuously Differentiable iff Continuous Partials
A function f:nm is continuously differentiable on an open set A if and only if all partial derivatives Djfi exist and are continuous on A. In this case the Jacobian matrix is [Df(x)]EmEn=(Djfi(x)).
In this statement, continuously differentiable means that f is differentiable at every point of A, and that the derivative map xDf(x) is continuous when Df(x) is represented by its Jacobian matrix.

First suppose f is continuously differentiable on A. Then f is differentiable at every xA, so Df(x) exists. The j-th partial derivative of the i-th component function is the i,j-entry of the Jacobian matrix: Djfi(x)=([Df(x)]EmEn)i,j. Since the matrix-valued function x[Df(x)]EmEn is continuous, each entry function xDjfi(x) is continuous. Thus all partial derivatives exist and are continuous on A.

Conversely, suppose all partial derivatives Djfi exist and are continuous on A. Fix aA. Since A is open, choose a small rectangle around a contained in A. Define a linear transformation Ta:nm by Tah=(j=1nDjf1(a)hj,,j=1nDjfm(a)hj). We show that Ta is the derivative of f at a.

Write h=(h1,,hn), and for 0jn, set zj=a+(h1,,hj,0,,0). For each component fi, telescope the change from a to a+h: fi(a+h)fi(a)=j=1n(fi(zj)fi(zj1)). Each summand changes only the j-th coordinate. By the one-variable mean value theorem applied along that coordinate segment, if hj0, there is a point ξj on the segment from zj1 to zj such that fi(zj)fi(zj1)=Djfi(ξj)hj. If hj=0, the same formula holds with any point ξj on the segment.

Therefore fi(a+h)fi(a)j=1nDjfi(a)hj=j=1n(Djfi(ξj)Djfi(a))hj. Since each Djfi is continuous at a, the differences Djfi(ξj)Djfi(a) go to 0 as h0. Hence |f(a+h)f(a)Tah||h|0. By the definition of differentiability, f is differentiable at a, with Df(a)=Ta.

Since aA was arbitrary, f is differentiable on A. The matrix of Ta is exactly (Djfi(a)), so [Df(a)]EmEn=(Djfi(a)). The entries of this matrix are continuous functions of a, so the Jacobian matrix varies continuously on A. Thus f is continuously differentiable on A.

Projection Functions are Continuously Differentiable
Each projection function πi:n is continuously differentiable.
For the i-th projection function, Djπi(x)={1j=i,0ji. These partial derivatives exist and are constant, hence continuous. Therefore πi is continuously differentiable by the continuous partials characterization.
Componentwise Continuously Differentiable Map
Let An be open. If f1,,fm:A are continuously differentiable, then the function f:Am defined by f(x)=(f1(x),,fm(x)) is continuously differentiable.
By the definition of component functions, the component functions of f are f1,,fm. Each fi is continuously differentiable, so all partial derivatives Djfi exist and are continuous on A. Therefore f is continuously differentiable by the continuous partials characterization.
Derivative of the Vector Scalar Division Map
Let Q:m×({0})m,Q(y,t)=yt. If ym, t0, um, and s, then DQ(y,t)(u,s)=utst2y.
Write y=(y1,,ym). The component functions of Q are Qi(y,t)=yit for 1im. For 1jm, Qiyj(y,t)={1t,i=j,0,ij, and Qit(y,t)=yit2. These partial derivatives are continuous wherever t0. Therefore, by the continuous partials characterization, Q is differentiable at (y,t).

By the Jacobian entries are partial derivatives corollary, the Jacobian matrix of Q at (y,t), with input coordinates ordered as y1,,ym,t, is [DQ(y,t)]EmEm+1=[1t00y1t201t0y2t2001tymt2].

Applying this matrix to the displacement (u,s)=(u1,,um,s) gives DQ(y,t)(u,s)=(u1tsy1t2,,umtsymt2)=utst2y.
Inverse Function Theorem
Suppose that f:nn is continuously differentiable in an open set containing a, and that the determinant of the Jacobian matrix is nonzero: det[Df(a)]E0. Then there are open sets U and V with aU, f(a)V, such that f:UV is one-to-one, onto, and has a continuously differentiable inverse. Moreover, [D(f1)(y)]E=([Df(f1(y))]E)1. If f is C, then f1 is C.
Let A=[Df(a)]E. Since detA0, A is an invertible matrix. Composing f with the affine change of variables xA1(f(x)f(a))+a reduces the proof to the case f(a)=a and [Df(a)]E=In. After proving the theorem in this normalized case, composing back with the affine maps gives the original statement.

In the normalized case, continuity of the Jacobian matrix gives a closed rectangle R with a in its interior such that [Df(x)]E stays close to In on R. Applying the mean value inequality to xf(x)x, after shrinking R if needed, gives |(f(x)x)(f(y)y)|12|xy| for all x,yR. Therefore |f(x)f(y)|12|xy|, so f is one-to-one on R.

The boundary of R is compact, and f(a) is not in the image of that boundary. Hence there is an open ball V around f(a) such that every zV is closer to f(a) than to any value f(x) with x on the boundary of R.

Fix zV, and define Φz(x)=|zf(x)|2 on R. Since R is a compact closed rectangle and Φz is continuous, the extreme value theorem gives a point where Φz is minimized. The choice of V prevents this minimum from occurring on the boundary, so the minimum occurs at an interior point x.

By the interior extremum theorem, all partial derivatives of Φz vanish at x. Written in matrix form, this says (zf(x))T[Df(x)]E=0. Since [Df(x)]E is close to In, it is invertible. Therefore zf(x)=0, so z=f(x). This proves that every zV has a preimage in the interior of R. Together with injectivity, this gives a local inverse f1:VU, where U=f1(V)int(R).

The estimate |f(x)f(y)|12|xy| implies |f1(z1)f1(z2)|2|z1z2|, so f1 is continuous.

Let z=f(x)V. Since f is differentiable at x, f(x+h)=f(x)+[Df(x)]Eh+r(h),|r(h)||h|0. Using the continuity estimate for f1, this remainder identity implies [D(f1)(z)]E=([Df(x)]E)1=([Df(f1(z))]E)1. Since the Jacobian matrix of f is continuous and matrix inversion is continuous on invertible matrices, f1 is continuously differentiable. If f is C, repeated differentiation of f(f1(z))=z shows inductively that f1 is C.

Implicit Function Theorem
Suppose that F:n+mm is continuously differentiable near (a,b), F(a,b)=0, and the m×m matrix of partial derivatives of F with respect to the last m variables is invertible at (a,b). Then near (a,b), the equation F(x,y)=0 uniquely determines y as a continuously differentiable function y=g(x). If F is C, then g is C.
Let B=[Fiyj(a,b)]1i,jm. By hypothesis, B is an invertible matrix. Define H:n+mn+m,H(x,y)=(x,F(x,y)). Since F is continuously differentiable near (a,b), there is an open set U containing (a,b) on which F is continuously differentiable. On U, the first n component functions of H are projection functions, and the last m component functions are the component functions of F. Hence H is continuously differentiable on U by the componentwise continuously differentiable map theorem.

The derivative matrix of H at (a,b), written in the x-variables followed by the y-variables, has block form H(a,b)=[In0CB], where C is the matrix of partial derivatives of F with respect to the x-variables. This block matrix is invertible, with inverse [In0B1CB1]. Indeed, by block matrix multiplication, [In0CB][In0B1CB1]=[In0CBB1CBB1]=[In00Im], and the product in the opposite order is also the identity matrix.

By the inverse function theorem, after restricting to open neighborhoods, H has a continuously differentiable inverse. Write this inverse as H1(s,t)=(s,k(s,t)). The first component must be s, because the first component of H(x,y) is x.

Define g(s)=k(s,0). Then H(s,g(s))=(s,0), so F(s,g(s))=0.

Conversely, if F(s,y)=0 for (s,y) in the chosen neighborhood, then H(s,y)=(s,0). Since H is one-to-one on that neighborhood, (s,y)=H1(s,0)=(s,g(s)). Hence y=g(s), proving uniqueness.

Since g is obtained from the continuously differentiable inverse H1, it is continuously differentiable. If F is C, then H is C, so H1 is C by the smooth part of the inverse function theorem. Therefore g is C.

Lagrange Multiplier Condition
If g:Ap has full rank p on g1(0), and f:A has a constrained extremum at ag1(0), then there are scalars λ1,,λp such that df(a)=i=1pλidgi(a).