Skip to content
Prev 314870 / 398506 Next

Integration in R

On 08-01-2013, at 19:51, Naser Jamil <jamilnaser79 at gmail.com> wrote:

            
David implemented the condition by multiplying by x[1]<x[2] which in a numeric context is 0 when x[1]<x[2] en 1 when x[1]>=x[2]. That is what your requirement does.
The condition 0<x1<x2<7 has been split into three separate parts

0<x1<7
0<x2<7
x1<x2

The first two can be converted to arguments of adaptIntegrate.
The last is inserted into the function definition effectively making the function return 0 when x1>x2 which is what your inequality implies.


Berend