Integrate {lazy.mat}R Documentation

Integrate a Univariate Function f from lower to Vector-Valued x.

Description

Integrate a Univariate Function f from lower to Vector-Valued x.

Usage

Integrate(
  f,
  x,
  lower,
  subdivisions = 100L,
  rel.tol = .Machine$double.eps^0.25,
  abs.tol = rel.tol,
  stop.on.error = TRUE
)

Arguments

f

A function to be integrated

x

The value at which the integral of f is evaluated

lower

The lower limit of the integration

subdivisions

: See the help of native integrate function.

rel.tol

: See the help of native integrate function.

abs.tol

: See the help of native integrate function.

stop.on.error

: See the help of native integrate function.

Details

This function calculates, for i=1,2,...,length(x),
integrate( f, lower, x[i] )$value

In essence, it returns
unlist( lapply( x, function(x){ integrate( f, lower, x )$value } ) ).

Value

A vector containing the results.

Examples

func=function(x) x
x=0:10
lower=-10
res=Integrate( func, x, lower )
Print( x, res )


[Package lazy.mat version 0.1.4 Index]