Skip to main content
POST
/
quantlib
/
numerical
/
integration
/
quadrature
Numerical Integration (Quadrature)
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/numerical/integration/quadrature \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "func_name": "exp",
  "a": 0,
  "b": 1,
  "method": "simpson",
  "n": 100
}
'
{
  "success": true,
  "data": {
    "function": "exp",
    "a": 0,
    "b": 1,
    "method": "simpson",
    "integral": 1.7182818
  }
}

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 to integrate

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

"exp"

a
number
required

Lower integration bound

Example:

0

b
number
required

Upper integration bound

Example:

1

method
enum<string>
default:simpson

Integration method to use

Available options:
trapezoid,
simpson,
gauss_legendre,
romberg,
adaptive
Example:

"simpson"

n
integer
default:100

Number of intervals/points (for trapezoid, simpson, gauss_legendre methods)

Example:

100

Response

Successful Response

success
boolean
Example:

true

data
object