Skip to main content
POST
Find Root of Scalar Function

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key at https://api.fincept.in/auth/register

Body

application/json
func_name
enum<string>
required

Built-in function or 'custom_poly' for polynomial

Available options:
sin,
cos,
exp_minus_2,
x2_minus_4,
custom_poly
Example:

"x2_minus_4"

a
number
required

Lower bound of search interval

Example:

1

b
number
required

Upper bound of search interval (f(a) and f(b) should have opposite signs)

Example:

3

method
enum<string>
default:brent

Root-finding method

Available options:
bisect,
brent,
ridder,
secant
Example:

"brent"

tol
number
default:1e-12

Convergence tolerance (smaller = more accurate)

Example:

1e-12

poly_coeffs
number[]

Polynomial coefficients [a0, a1, a2, ...] for a0 + a1x + a2x^2 + ... (only for custom_poly)

Example:

Response

Successful Response

success
boolean
Example:

true

data
object