Summing a series

72 Views Asked by At

How would I go about finding the sum of an alternating series that consist of 1 -1/2 + 1/3 -1/4 + 1/5... to the 8th term using a mathematical formula or is there no formula I can use

2

There are 2 best solutions below

2
On

One method would be to use Table.

Total[Table[If[EvenQ[n], -(1/n), 1/n], {n, 1, 8, 1}]]
0
On

Here is a formula for the nth partial sum:

aharmonic[n_] = Sum[-(-1)^k/k, {k, n}]

(-1)^(1 + n) LerchPhi[-1, 1, 1 + n] + Log[2]

The 8th partial sum:

aharmonic[8]

533/840

Table of the first 10 values:

aharmonic[Range[10]]

{1, 1/2, 5/6, 7/12, 47/60, 37/60, 319/420, 533/840, 1879/2520, 1627/2520}