Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

INTEGR returns the integrated value of a function in a two-dimensional space

Syntax

  1. INTEGR(Pno%, 2, "ColLab$_1", "ColLab$_2", Mode%=0,1 or 2, X_from, X_to)
  2. INTEGR(0, Npoints%, x_1, y_1, x_2, y_2,…, x_n, y_n, , Mode%=0,1 or 2, X_from, X_to)
  3. INTEGR(@ObjFn(..), 2, @ObjColPar_1, @ObjColPar_2, Mode%=0,1 or 2, X_from, X_to)
  4. INTEGR(Telitab$, 2, "ColLab$_1", "ColLab$_2", Mode%=0,1 or 2, X_from, X_to)

Arguments

  • Pno% is  is the number that refers to the TeLiTab sets in the Data slot. Pno% should be an integer value or a parameter which is assigned an integer value and is the number of the TeLiTab set in the expressions' data slot.
  • Npoints% is  is the number of points (x,y) that are given in direct definition.
  • @ObjFn() refers  refers to the Object from which data will be used.
  • TeLiTab$ TeLiTab$ refers to the string parameter that contains the TeLiTab.
  • "ColLab$_1" and @ObjColPar_1 refer  refer to the column that will be used as the parameter X in the integration.
  • "ColLab$_2" and @ObjColPar_2 refer  refer to the column that will be used as the parameter Y in the integration.
  • Mode% is the mode of integration:
    • Mode% =0 Riemann
    • Mode% = 1 Trapezium
    • Mode% =2 Simpson.
  • X_from and  and X_to are  are the parameters between wich will be integrated.

...

  1. See also Telitab access for a generic description on the use of TeLiTab data
  2. Similar to other Data analysis functions, the DISINT is a convenient way to evaluate data. Please also look at these functions for syntax examples
  3. INTEGR computes the integral from x=x_from to x=x_to using either:
  • Mode%=0 -> Riemann (bar-wise) integration
  • Mode%=1 -> Trapezium rule
  • Mode%=2 -> Simpson rule
  1. x_from and x_to should be within the limits of the Telitab data provided
  2. Integration can only be performed in 2D space. Multi-dimensional integration is not (yet) implemented (Ndim% = 2). Multi-dimensional integration can be performed by nested INGER() functions.
  3. Please realise the dataset provided to INTEGR should be a function. Every x-value should have one y-value.

...


In this example, syntax 1 is used.
Let y be defined by

y= INTEGR(1, 2, "XC", "YC", 0, x_1, x_2)

This is the command for a Riemann integral between x_1 and x_2, using the points of the curve in the Dataslot.
The following Telitab set is placed in the Data slot:
   

|INTEGR1INTEGR1|
    0
    2 "XC" "YC"
    "1" 1 1
    "2" 2 4
    "3" 3 9
    "4" 4 16
    "5" 5 25
    "6" 6 36
    "7" 7 49
    "8" 8 64
    "9" 9 81
    "10" 10 100|


For x_1 = 2.5 and x_2=5, this relation returns 

y=28.25.

Remark

In case you apply the symbolic addressing of the columns for the description of the point on the curve or surface to compute the differential for, e.g. "Par_x" and "Par_y", please make sure that your Telitab set contains these names. If not, an error message is generated and the calculation is stopped.

...


This example will illustrate syntax 2.
In direct definition, the points of the curve are stated in the Relation itself:

INTEGR( Pno%, Npoints%, x_1, y_1, x_2, y_2,…, x_n, y_n, Mode%=0,1 or 2, X_from, X_to)


If Pno%=0 then all x_i and y_i values should be numeric expressions. The minimum number of x,y data points Npoints% in the list is 2 in which case the interpolation (and differentiation) is performed linear.
Let y be defined by

y = INTEGR(0, 4, 1, 1, 2, 4, 3, 9, 4, 16, 1, x_1, x_2)

For x_1=2.5 and x_2=5, this relation returns

y=28.25

Example 3: TeLiTab in object or string


Syntax 3 and 4 are similar to syntax 1, but now existing telitabs are used instead of the dataslot.


 

Quick links: Function  Functions overview | Attribute  Attribute overview | Constants  Constants overview | Dimensions  Dimensions overview