|
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:
|