Skip to main content
POST
/
quantlib
/
numerical
/
differentiation
/
derivative
Compute Numerical Derivative
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/numerical/differentiation/derivative \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "func_name": "sin",
  "x": 1.5708,
  "h": 1e-7,
  "method": "central"
}
'
{
  "success": true,
  "data": {
    "function": "sin",
    "x": 1.5708,
    "derivative": 0,
    "method": "central"
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key at https://finceptbackend.share.zrok.io/auth/register

Body

application/json
func_name
enum<string>
required

Built-in function name to differentiate

Available options:
exp,
log,
sin,
cos,
sqrt,
tan,
x2,
x3
Example:

"sin"

x
number
required

Point at which to evaluate the derivative

Example:

1.5708

h
number
default:1e-7

Step size for finite difference (smaller = more accurate but less stable)

Example:

1e-7

method
enum<string>
default:central

Finite difference method: central (most accurate), forward, or backward

Available options:
central,
forward,
backward
Example:

"central"

Response

Successful Response

success
boolean
Example:

true

data
object