How to precisely calculate $\sum_{k = 0}^\infty \frac{(-1)^k}{2^k}$ ? And which algorithm can be used for the related problems?
Precise calculation of infinite sum
87 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
On
There is a faster way.
Call your sum as $S$:
$$S = 1 - \frac{1}{2} + \frac{1}{4} - \frac{1}{8} + \frac{1}{16} - \ldots$$
Collecting the second term:
$$S = 1 - \frac{1}{2}\left(1 - \frac{1}{2} + \frac{1}{4} - \frac{1}{8} + \ldots \right)$$
What you have inside the bracket is nothing but $S$:
$$S = 1 - \frac{1}{2}S$$ hence
$$S + \frac{1}{2}S = 1$$
$$\frac{3}{2}S = 1$$
And finally
$$\boxed{{S} = \frac{2}{3}}$$
On
For related problems, where the series does not have a closed form, one can take into account that the series is alternating (its terms alternate the sign from $+$ to $-$) in order to produce an approximate result.
For a general alternating series $$ \sum_{k=0}^{\infty}(-1)^{k}a_{k}% $$ where $a_{k}>0$ for all $k$ and the sequence $(a_{k})_{k\geq0}$ is decreasing, denote by $S_{n}$ the sum of the first $n+1$ terms ($n\geq0$) and by $S$ the sum of the series $$ S_{n}=\sum_{k=0}^{n}(-1)^{k}a_{k} $$ $$ S=\sum_{k=0}^{\infty}(-1)^{k}a_{k}. $$ It is easy to check that $$ S_{0}>S_{2}>S_{4}>\ldots>S_{2n}>\ldots>S>\ldots>S_{2n+1}>\ldots>S_{5} >S_{3}>S_{1}. $$
This means that $S$ can be approximated with desired precision by increasing $n$ accordingly.
This is a geometric series.
Use the formula:
$$\sum_{k=0}^{\infty} r^k =\frac{1}{1-r}$$
where $|r|<1$.