0

I'm taking a single-variable calculus course and asked to calculate $$\sum_{k=0}^\infty (-1)^k \frac{\pi^{2k}}{(2k)!}$$ So the $k=0$ term looks like $$(-1)^0 \frac{\pi^{2(0)}}{(2(0)!)}=\frac{1}{0!}$$ but $\frac{1}{0!}$ is not a number, so it appears I've made a mistake in my calculation.

Parcly Taxel
  • 103,344
blue-sky
  • 2,100

2 Answers2

1

By a natural convention, $0!=1$.

This is coherent, as for $n>1$,

$$n!=n\cdot(n-1)!,$$ or

$$(n-1)!=\frac{n!}n,$$

hence we extend to $n=1$ with

$$0!=\frac{1!}1.$$

For the same reason $(-1)!$ and all the negatives are undefined.


It is also customary to define the product of no factor as $1$, just like the sum of no term is defined to be $0$.


You may be interested to know that one can extend the factorial to non-integers, and here is a plot of the standard extension:

enter image description here

0

In addition to YvesDaoust's answer, see the Taylor expansion of cosine around $0$:

$$\cos(x)=\sum_{k=0}^\infty(-1)^k\frac{x^{2k}}{(2k)!}$$

So in essence, you are calculating

$$\cos(\pi)=-1$$