Japanese Home


Math Tools

>Web API<

How to use

F(x)-x graph


Function(x) - Web API

This API calculates a provided function(x) with a given range of x, and returns calculated numerical values.

  » Check also the feature of this API: go to Functional Calculator - f(x) page (math tool).

To use this API, access to the URLs listed below.
Each Web API returns XML / JSON (JSONP) / CSV data.


  » See also How to use Web API page.

Parameters:  (*required)
fx * string a function(x) (e.g. x^2+x+2)
- valid characters (x is a variable, a, b, and c are constants): 1234567890+-*/()^,pi,e,sqrt,log,abs,sin,cos,tan,a,b,c,x
xfrom string a start value of x (e.g. -10)
xto string an end value of x (e.g. 10)
xspan string a span of x values (e.g. 1)
a string a value of a
b string a value of b
c string a value of c
callback string a callback function name (e.g. setResult)
- valid only JSONP

Return values:
function string a recognized function of x (might have a different form from the submited function).
e.g. x^2+x+2, ax+b
avalue string a value of a (empty if value of a is not set)
bvalue string a value of b (empty if value of b is not set)
cvalue string a value of c (empty if value of c is not set)
status integer 0:OK(calculated), 1 - 999:error
message string an error message etc.
count integer the number of the result value sets
valuelist/value - result value sets (empty if status is not 0)
xvalue string a value of x
e.g. 3.0, 1.1*10^12
functionvalue string a calculated value
e.g. 14.0, 2.893726238034*10^(-13)

      *      *      *

Return data samples:

<?xml version="1.0" encoding="UTF-8"?>

<result function="functionx">



Copyright (C) 2011-2020 rurihabachi. All rights reserved.