Lab8A
does not add terms or even
know about the series. It merely invokes a function as if it is built in.
The content of the SLATEC library can be examined by viewing the
file toc
(table of content) which is stored in the
SLATEC\DOC
directory. Open this file using any editor and
examine the A-Z categories. Category-C refers to "special functions"
and Bessel is one of them. Alternatively, you can search for the word
"Bessel" and this will lead you to section C10. Either way, you will find
that dBesj1
is the sought function (the D prefix, and the -D
suffix, indicate double precision, or real*8). Use your browser to open the
documentation of this particular
function. It should be in SLATEC\DOC
under the filename:
dbesj1.f.html
.
Starting with the toc
file of SLATEC, we observe that
category F is solution of non-linear equations. Scrolling down to section F
reveals that F1A deals with polynomials while F1B deals with the general case.
This leads us to dFzero
. Use your browser to open the
documentation of this particular subprogram. It is in SLATEC\DOC
under the filename dfzero.f.html
. The documentation tells us
this a subroutine (i.e. must invoke it using call
) and it lists
all its parameters. The first is the name of the function whose zeros are to
be found. In our case this is dBesj1
and as the documentation
says, it must be declared as external
in our program. This routine
looks for zeros in the interval [b,c] with tolerance specified as a relative or
absolute error. For our purpose, set both to 1.E-8.
Starting with the toc
file of SLATEC, we observe that
category H includes integration. This quickly leads us to the subroutine
dGaus8
. Read its documentation in dgaus8.f.html
.
0.
and 3.831706
.
3.831706
and 7.0155867
.