Numerical Summation of a Series |
Produce a table of the values of the series
![]() |
(1) |
This problem has no input file.
The output is to be written into a file. The output is to be formatted as two columns with the values of x and y(x) printed as in the C printf or the Pascal writeln.
printf("%6.2f %16.12f\n", x, psix ) writeln(x:6:2, psix:16:2)
As an example, the sample output below shows 4 acceptable lines out of 3001, which might appear in the output file.
The values of x should start at 0.00 and increase by 0.1 until the line with x=300.00 is output.
The problem with summing the sequence in equation 1 is that too many terms may be required to complete the summation in the given time. Additionally, if enough terms were to be summed, roundoff would render any typical double precision computation useless for the desired precision.
To improve the convergence of the summation process note that
![]() |
(2) |
This process of finding a faster converging series may be repeated again on
the second series to produce a third sequence, which converges even more
rapidly than the second.
The following equation is helpful in determining how may items are
required in summing the series above.
![]() |
(3) |
0.00 1.644934066842 0.10 1.534607244899 ... 1.00 1.000000000000 ... 2.00 0.750000000002 ... 300.00 0.020938874759