Derivatives Refresher for constrained dynamics assignment 1) function of one variable: f(x)=x+2 - derivative of f with respect to x: f'(x)=1 - second derivative of f with respect to x: f''(x)==0 2) given a vector V=(x,y,z) - The derivative of a vector must be the "time derivative" denoted V' = (x',y',z') - where each component derivative is also with respect to time 3) function of two variables: f(x,y)=2x+y^3 - partial derivative w.r.t x is f'x=2 - partial derivative w.r.t y is f'y=3y^2 - second partial derivatives: f''x=0 f''y=6y - gradient of f = (f'x,f'y) = (2,3y^2) - second partial vector of f = (f''x,f''y) = (0,6y) - time derivative of f = 2*x' + 3*y^2*y' - second time derivative of f = 2*x'' + 3*(2*y*y'*y' + y^2*y'') - gradient of the gradient is a Hessian matrix: [ D^2f/Dx^2 D^2f/DxDy ] [ D^2f/DyDx D^2f/Dy^2 ] Because a gradient is a vector, and the gradient of a vector whose components are functions of more than one variable is a Hessian matrix: - gradient of f(x,y) is vector (Df/Dx,Df/Dy) - gradient of vector (Df/Dx,Df/Dy) which is still a function of two variables can be thought of as the same function: the gradient takes a function of more than one variable and creates vector whose components consist of the partial derivatives of each variable: gradient of vector (Df/Dx,Df/Dy) = [ Df/Dx(Df/Dx,Df/Dy) ] [ Df/Dy(Df/Dx,Df/Dy) ] which becomes the matrix: [ D^2f/Dx^2 D^2f/DxDy ] [ D^2f/DyDx D^2f/Dy^2 ] I guess because the derivative of a vector is the component- wise derivatives?? 4) vector-valued function of a vector X: f(X)=X*X where "*" is the dot-product - so time derivative of f: f'(X) = X'*X + X*X' = 2*X*X' - second time deriv of f: f''(X) = dfx(X'*X) + dfx(X*X') = X''*X + X'*X' + X'*X' + X*X'' = 2*X*X'' + 2*X'*X' = 2*(X*X'' + X'*X') - this is still a function of only one variable so the partial derivative or gradient operator does not apply.