Treatment of Unknown Functions

  1. Functions and their derivatives are declared by user via a keyword
  2. Functions are *.m files or Matlab primitives or the the function is declared by the user but the derivative isn't provided we must call a numerical derivator
    1. these functions have an arbitrary number of arguments
    2. this can only be implemented for first or second order derivatives
    3. it is necessary to know if we are dealing with first or second derivatives to call the right numerical derivator
    4. the numerical derivator (jacobian or hessian) returns an array
    5. each derivative is function of the derivatives of the arguments and the derivatives of the function
      • Example:
            F(y_1,y_2,...,y_k)
            D(F,x_i) = D(F,y_1)*D(y_1,x_i)+D(F,y_2)*D(y_2,x_i)+...D(F,y_k)*D(y_k,x_i)
            D^2(F,x_i,x_j) = D^2(F,y_1,y_1)*D(y_1,x_i)*D(y_1,x_j)+...+D^2(F,y_1,y_k)*D(y_1,x_i)*D(y_k,x_j)+..+D^2(F,y_k,y_k)*D(y_k,x_i)*D(y_k,x_j)
                             +D(F,y_1)*D^2(y_1,x_i,x_j)+...+D(F,y_k)*D^2(y_k,x_i,x_j)
    6. because the number of arguments and derivatives are arbitrary, it is necessary to introduce some sort of array type in the parser