Two dimensional quadrature using Gauss-Kronrods quadrature

Please specify the integrand:

x ∈ [0,1] , f(x,y) = 1.d0 ψ(x) = 0 ,
φ(x) = (1.0 - x2)1/2 I = π/4 = .78539816339744830961
x ∈ [0,1] , f(x,y) = x y2 ,
ψ(x) = 0 , φ(x) = 1 - x2
I = 0.04166666666666666
x ∈ [10-10,1] ,f(x,y) = log(x)log(y) ,
ψ(x) = 10-10 , φ(x) = x2
I = 0.25925925925925925
x ∈ [-1,1] ,f(x,y) = xy,
ψ(x) = -1-x2 , φ(x) = 1+ x2
I = 0
x ∈ [0,1] , f(x,y) = xy , psi;(x) = 0 , φ(x) = 1-x
I = 0.0416666666666666
A function of your own
In what follows you see three textareas for f, ψ and φ which seemingly all refer to the same data resp. variables. This is not the case: these variables are all local and have no interaction .
The integrand:
Please type the evaluation program of your function here using FORTRAN rules. Your final statement must be
      fu=
You may use the constants pi, e(=exp(1)), sqrt2(=1.414...), the integer variables i,j,k, the logicals bool1,bool2,bool3 and the double precision variables sum,h1,h2,h3,h4,u(100),v(100),a(100,100) which are all intialized with zero resp. .false. . The routine has the parameters x, y (double, input) and must return fu (double out). never change x or y!. first is a local integer and set 0 before calling the function the first time. You may use this in order to initialize some local data and set it 1 afterwards to avoid multiple such initialization. Your settings of the local variables are preserved during program execution.


The lower bound function ψ(x) :
Its declaration is
                subroutine  psiusr(x,val)
                double precision x,val 
                
followed by a series of declaration of local quantities you may use. Your final statement must be
      val  = some expression you computed before or just here depending on x
You may use the constants pi, e(=exp(1)), sqrt2(=1.414...), the integer variables i,j,k, the logicals bool1,bool2,bool3 and the double precision variables sum,h1,h2,h3,h4,y(100),z(100),a(100,100) which are all intialized with zero resp. .false. . never change x! first is a local integer and set 0 before calling the function the first time. You may use this in order to initialize some local data and set first= 1 afterwards to avoid multiple such initialization. Your settings of the local variables are preserved during program execution.

The upper bound function φ(x):
It has the same declaration form as ψ and has local parameters with the same names as there, but of course these have nothing in common functionally. Your final statement must be
      val = some expression you computed before or just here depending on x


And specify the x-interval here:
a = b =


I don't know the exact integral value
The true integral value is

Please specify the desired relative and absolute precision.
They are used for the ''inner'' as well as the ''outer'' quadrature.
epsrel = Important : 1e-12 <= epsrel <= 1e-2 !
epsabs = Important : 1e-16 <= epsabs <= 1e-6 !

Please specify n:
n=7 n=10
n=15 n=20
n=25 n=30

Should the integrand be plotted over B?:
yes no

Click on "evaluate", in order to submit your input.

back to the theory page

 Back to the top!

21.03.2019