identify - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


identify

find a closed form for a decimal approximation of a number

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

identify(x,opts)

Parameters

x

-

a real or complex floating-point number or expression

opts

-

equations in the form of option=value, where option is one of all, BasisSizeAlg, BasisPolyConst, BasisProdConst, BasisSumConst, extension, LearnBasis, Rational, Algebraic, FuncRat, FuncAlg, PolyConst, FuncPoly, SumConst, FuncSum, ProdConst, and FuncProd.

Description

• 

If the input is a floating-point constant x, for example, 1.414213562, the identify command searches for an exact expression for the number. In this case, it determines that this is the constant 2.

• 

If the input is a complex floating-point constant, for example, 1.386294361+3.141592654I, the identify command is applied to the real and imaginary parts separately.  In this case, it determines that this is the constant 2ln2+Iπ.

• 

The identify command applies the tests listed in the following section. If the input cannot be identified as an exact constant, then the numerical value x is returned. For the identify command to succeed, enough digits must be provided to approximate the number.

• 

If the input is not a (complex) floating-point constant, then the identify command maps recursively over the input expression applying itself to each floating-point constant in the expression.

Applied Tests

  

The tests made are as follows.

1. 

Test if x rational.

2. 

Test if x is algebraic of degree 6 (default) or less.

3. 

Test if x is a function of a rational number e.g. ln5.

4. 

Test if x is a function of an algebraic number of degree 6 or less.

5. 

Test if x is of the form a1+a2t+a3t+a4t+a5t+...+antk where t is a known transcendental constant e.g. π or ⅇ or ln2.

6. 

(optional) Test if x is a function of the above form.

7. 

Test if x is of the form a1t1+a2t2+antn+...+a0 where ti are known algebraic or transcendental constants.

8. 

(optional) Test if x is a function of the above form.

9. 

Test if x is of the form t1a1t2a2...tnan where ti are certain constants and ai are rational.

10. 

(optional) Test if x is a function of the above form.

• 

The test for rational constants is made by looking at the continued fraction expansion of x.  The test for an algebraic number up to degree 6, that is, a root of a polynomial mz of degree 6 or less, is made by applying Bailey and Ferguson's IntegerRelations[PSLQ] algorithm to [x0,x1,x2,...,x6] to compute the minimal polynomial mz for x and then solving for the roots and selecting the right one. If the solve command is not able to solve for the root in terms of radicals, the answer may be returned in the form of a RootOf.

Options

  

The remaining arguments to the identify command are treated as options.  They are equations of the form option=value. The following options are supported.

  

all

  

The option all=true specifies trying all tests, including the optional ones. The option all=false specifies only the tests that are explicitly asked for, as specified below.

  

BasisSizeAlg

  

The option BasisSizeAlg=n specifies when testing whether x is an algebraic number, to search up to degree n (default is 6).

  

BasisPolyConst

  

The option BasisPolyConst=B1 specifies the use of basis B1, a list of real constants (default is π,ⅇ,ln2, when making test 5, that is, t is chosen from this list.

  

BasisSizePoly

  

The option BasisSizePoly=n specifies the value of n to use in test 5.

  

BasisSumConst

  

The option BasisSumConst=B2 specifies the use of basis B2, a list of real constants (default is 1,2,3,π,ln2,ln3,ζ3,ζ5) when making test 7, that is, ti is chosen from this list.

  

BasisSizeSum

  

The option BasisSizeSum=n specifies the value of n to use in test 7 (default 3).

  

BasisProdConst

  

The option BasisProdConst=B3 specifies the use of basis B3, a list of real constants (default is 2,3,5,7,π,ⅇ,ln2,ln3,ζ3,ζ5) when making test 9, that is, ti is chosen from this list.

  

BasisSizeProd

  

The option BasisSizeProd=n specifies the value of n to use in test 9 (default 3).

  

extension

  

The option extension=B specifies adding the elements of B, a list of real constants, to the bases B1,B2,B3, when making tests 5, 7, and 9.

  

LearnBasis

  

The option LearnBasis=true specifies the use of nonrational constants found in tests 1-4 when making tests 5-10.  The default for this option is false.

  

Rational, Algebraic, FuncRat, FuncAlg, PolyConst, SumConst, and ProdConst

  

The options Rational=false, Algebraic=false, FuncRat=false, FuncAlg=false, PolyConst=false, SumConst=false, and ProdConst=false specify not to perform tests 1, 2, 3, 4, 5, 7, and 9 respectively.

  

FuncPoly, FuncSum, and FuncProd

  

The options FuncPoly=true, FuncSum=true, FuncProd=true specify the performance of tests 6, 8 and 10 respectively.

Examples

identify3.142857143

227

(1)

identify3.146264370

2+3

(2)

identify3.141701399

arcsinh23120

(3)

identify3.141592654

π

(4)

identify2.596684952

3+π2π

(5)

identify0.7692389013,all=false,FuncPoly=true

cosln2

(6)

identify2.7889921029138087050,BasisPolyConst=Catalan

2Catalan+Catalan

(7)

f0.1428571429x2+8.885765876x+9.869604404

f0.1428571429x2+8.885765876x+9.869604404

(8)

identifyf

x27+22πx+π2

(9)

fexpandsqrt2+πy+12

f2y2+2y22π+2y2+y2π2+2yπ+1

(10)

fevalff

f20.75537028y2+9.111612432y+1.

(11)

identifyf

20.75537028y2+22+2πy+1

(12)

identifyf,LearnBasis=true

22+2π2y24+22+2πy+1

(13)

zevalfexpIπ5,20

z0.80901699437494742410+0.58778525229247312917I

(14)

identifyz

54+14+I10254

(15)

See Also

evalf

IntegerRelations[LinearDependency]

IntegerRelations[PSLQ]

solve