Login     Register

        Contact Us     Search

XLeratorDB/math Documentation

SQL Server HESSIAN function

Updated: 15 April 2018

Use the scalar function HESSIAN to numerically compute the Hessian matrix. HESSIAN assumes that the function has continuous partial derivatives. HESSIAN produces a square matrix of second order partial derivatives of a scalar function.

   <@Func, nvarchar(max),>
  ,<@VarNames, nvarchar(4000),>
  ,<@X, nvarchar(4000),>
  ,<@H, float,>)
Input NameDescription
@FuncThe function to be evaluated, as a string. The function must be in the form of a SELECT statement.
@VarNameThe name of the variable
@XThe point where the Hessian is calculated
@HStep size
Return Type
  • If @Func returns a NULL then NULL Is returned.
  • If @Func is not a valid SELECT statement then NULL is returned.
  • If no solution is found then NULL is returned.
  • If @X is NULL then @X = ''.
  • If @H is NULL then @H = 0.
  • If @H <= 0 then @H = 2^(-13)
  • Available in XLeratorDB / math 2008 only
Example #1

Calculate the Hessian for the function

At the point (1,2)

Since the result is returned as a string, we will use the MATRIX function to unpack the results into a matrix format.

FROM wctMath.wct.MATRIX(
            'SELECT POWER(@x,3) - 2*@x*@y - POWER(@y,6)'

This produces the following result.

See Also

Copyright 2008-2023 Westclintech LLC         Privacy Policy        Terms of Service