Online Polynomial/Function Curve Plotting Tool

This is a polynomial/function curve plotting tool based on the echarts plugin, which can plot the coordinate system curve (or line) corresponding to the given mathematical function F(x) in the Cartesian coordinate system. It is provided for free to friends who need it.


  1. The function here needs to be manually written according to the mathematical function represented by the JavaScript syntax (for details, you can refer to the JavaScript Math function appendix below), and then configure the drawing range of x to draw the function curve chart.
  2. If you need to perform polynomial fitting calculations, it is recommended to use the Online Polynomial Fitting Tool
Function F(x):
x value range:
~

Instructions for Writing Mathematical Function F(x)

The F(x) function expression in the tool is written in JavaScript syntax, which is different from the expression in algebra or geometry. Therefore, before using this tool, you need to translate the function expression. Here are some simple common expressions for illustration:
  1. Addition, subtraction, multiplication, division, modulo: +, -, *, /, %.
  2. Power: Math.pow(x, 10) is equivalent to x to the tenth power; Math.pow(x, .5) is equivalent to the square root of x.
  3. Sine, cosine, tangent: Math.sin(x), Math.cos(x), Math.tan(x).
  4. Arcsine, arccosine, arctangent: Math.asin(x), Math.acos(x), Math.atan(x).
  5. Exponential of e, natural logarithm: Math.exp(x), Math.log(x) [with base e].
  6. Random to 1: Math.random()
  7. Maximum of two, minimum of two: Math.max(x, y), Math.min(x, y). [This function is not supported by this feature]
For detailed information on Math functions, please refer to the JavaScript Math function appendix below.

Explanation of Polynomial Mathematical Functions

  1. An algebraic expression composed of the sum of several monomials is called a polynomial (in subtraction: subtracting a number is equivalent to adding its opposite number). Each monomial in the polynomial is called a term of the polynomial, and the highest degree among these monomials is the degree of the polynomial.
  2. In mathematics, a polynomial is an expression obtained by variables, coefficients, and their addition, subtraction, multiplication, and power operations (positive integer exponents).
  3. Polynomials are simple continuous functions. They are smooth, and their derivatives must also be polynomials. The spirit of Taylor polynomials is to approximate a smooth function with a polynomial. In addition, continuous functions on a closed interval can be uniformly approximated by polynomials.
  4. This tool can use a computer to plot polynomials or functions into a curve graph for easy observation and learning.

Appendix: Commonly Used JavaScript Math Functions and Their Usage

Function Description Example
abs(x) Returns the absolute value of a number. Math.abs(-10) //Returns 10
acos(x) Returns the arccosine of a number. Math.acos(1) //Returns 0
asin(x) Returns the arcsine of a number. Math.asin(1) //Returns 1.5707963267948965
atan(x) Returns the arctangent of a number, which is between -PI/2 and PI/2 radians. Math.atan(0.50) //Returns 0.4636476090008061
atan2(y, x) Returns the angle in radians between the X axis and the point (x, y), which is between -PI/2 and PI/2 radians. Math.atan2(5, 5) //Outputs 0.7853981633974483
ceil(x) Rounds a number up to the nearest integer.

Math.ceil(0.60)
Math.ceil(-5.1) 

//Returns 1
//Returns -5
cos(x) Returns the cosine of a number. Math.cos(0) //Returns 1
exp(x) Returns e to the power of a number. Math.exp(5) //Returns 148.4131591025766
floor(x) Rounds a number down to the nearest integer. Math.floor(0.60)
Math.floor(-5.1)
//Returns 0
//Returns -6
log(x) Returns the natural logarithm of a number (base e). Math.log(1) //Returns 0
max(x,y) Returns the maximum value between x and y. Math.max(5,7) //Returns 7
min(x,y) Returns the minimum value between x and y. Math.min(5,7) //Returns 5
pow(x,y) Returns the value of x raised to the power of y. Math.pow(2,4) //Returns 16
random() Returns a random number between and 1. Math.random() //Returns a random number such as 0.6654807284142312
round(x) Rounds a number to the nearest integer. Math.round(0.60)
Math.round(-4.4)
//Returns 1
//Returns -4
sin(x) Returns the sine of a number. Math.sin(0) //Returns 0
sqrt(x) Returns the square root of a number. Math.sqrt(0.64) //Returns 0.8
tan(x) Returns the tangent of an angle. Math.tan(10) //Returns 0.648360827459866