SYNTAX

CONSTANTS
CONSTANT VALUE
e 2.71828182845905
pi 3.14159265358979

FUNCTIONS
Here is the brief description of functions. For detailed description see the Octave User's Guide, function index.

FUNCTION ARGUMENT DESCRIPTION
abs(x) complex absolute value of x, |x|
acos(x) real inverse cosine (cos-1x) in radians
asin(x) real inverse sine (sin-1x) in radians
atan(x) real inverse tangent (tan-1x) in radians
besj0(x) radians J0 Bessel function of x
besj1(x) radians J1 Bessel function of x
besy0(x) radians Y0 Bessel function of x
besy1(x) radians Y1 Bessel function of x
ceil(x) real least whole number larger than x
cos(x) radians cosine of x
cosh(x) radians hyperbolic cosine of x
erf(x) complex error function
erfc(x) complex 1-erf(x)
exp(x) real ex, exponential function of x
floor(x) real largest whole number less than x
gamma(x) complex gamma function of real(x)
ibeta(p,q,x) complex incomplete beta function of real(p,q,x)
igamma(a,x) complex incomplete gamma function of real(a,x)
imag(x) complex imaginary part of x
int(x) real integer part of x truncated towards 0
inverf(x) complex inverse error function of real(x)
invnorm(x) complex inverse normal distribution of the real part of x
lgamma complex natural log of the gamma function of real(x)
log(x) real logex, natural logarithm (base e) of x
log10(x) real log10x, logarithm (base 10) of x
norm(x) complex normal (Gauss) distribution of real(x)
rand(x) complex pseudo-random number generator with seed=real(x)
real(x) complex real part of x
sgn(x) real 1 if x>0, -1 if x<0, 0 if x=0
sin(x) radians sine of x
sinh(x) real hyperbolic sine of x
sqrt(x) real square root of x
tan(x) radians tangent of x
tanh(x) real hyperbolic tangent of x

OPERATORS
OPERATOR EXAMPLE DESCRIPTION
* a*b multiplication
/ a/b division
+ a+b addition
- a-b subtraction
^ a^b power (a 'to' b)
** a**b power (a 'to' b)
! a! a factoriels




EXAMPLES

The follwing input

Interval   a:      b:
Function  f(x):  
No. of series' terms  m :      No. of integration nodes  n: 
gives the following graph:

By increasing the number of terms, the approximation becomes better. The Gibbs' effect at the borders of the interval is also clearly seen:
Interval   a:      b:
Function  f(x):  
No. of series' terms  m :      No. of integration nodes  n: 


When the number of required terms of the series m becomes too large with respect to the number of integration nodes n, the approximation becomes less accurate and the harmonics start to grow:
Interval   a:      b:
Function  f(x):  
No. of series' terms  m :      No. of integration nodes  n: 


Piecewise defined function can be defined in the following way:
Interval   a:      b:
Function  f(x):  
No. of series' terms  m :      No. of integration nodes  n: