<s>[INST] Solving the infinite series $1-\frac{2^3}{1!}+\frac{3^3}{2!}-\frac{4^3}{3!}+\cdots$ I have the following question:

Evaluate the infinite series:
   $$S=1-\frac{2^3}{1!}+\frac{3^3}{2!}-\frac{4^3}{3!}+\cdots$$
  (a) $\displaystyle\frac1e$   (b) $\displaystyle\frac{-1}e$ (c) $\displaystyle\frac{2}e$ (d) $\displaystyle\frac{-2}e$

Now in the book they have given a strange explanation using $$(n+1)^3=[n(n-1)(n-2)+6n(n-1)+7n+1].$$ I don't understand how did they get this. So I have two doubts:


*

*How did they get this "trick"?

*If you would have got this question in a competitive exam, how would you have solved it (in the minimum amount of time), either directly or with numerical methods?

 [/INST] Looking at the given identity:
\begin{align}
(n+1)^3 &= [n(n-1)(n-2)+6n(n-1)+7n+1] \\
&= n(n^2 - 3n + 2) + 6 n^2 + n + 1 \\
&= n^3 + 3 n^2 + 3 n + 1 = (n+1)^3
\end{align}
Now, consider differentiation of the exponential series:
\begin{align}
D \, e^{t} &= \sum_{n=0}^{\infty} \frac{1}{n!} \, \frac{d}{dt} \, t^{n} = 
\sum_{n=0}^{\infty} \frac{n \, t^{n-1}}{n!}
\end{align}
Further differentiation can be applied.
Now, consider the series in question:
\begin{align}
S &= 1 - \frac{2^{3}}{1!} + \frac{3^{3}}{2!} - \cdots \\
&= \sum_{n=0}^{\infty} \frac{(-1)^{n} \, (n+1)^{3}}{n!} \\
&= \left. \sum_{n=0}^{\infty} \frac{(-1)^{n} \, (n+1)^{3} \, t^{n}}{n!} \, \right|_{t=1} \\
&= \left. t^{3} \, \sum_{n=0}^{\infty} \frac{(-1)^{n} \, n(n-1)(n-2) \, t^{n-3}}{n!} + 6 t^{2} \, \sum_{n=0}^{\infty} \frac{(-1)^{n} \, n(n-1) \, t^{n-2}}{n!} + 7 t \, \sum_{n=0}^{\infty} \frac{(-1)^{n} \, n \, t^{n-1}}{n!} + e^{-t} \, \right|_{t=1} \\
&= \left. t^3 \, D^{3} e^{-t} + 6 \, t^{2} \, D^{2} e^{-t} + 7 \, t \, D e^{-t} + e^{-t} \right|_{t=1} \\
&= \left. (-t^3 + 6 \, t^2 - 7 \, t + 1) \, e^{-t} \right|_{t=1} \\
&= - \frac{1}{e} 
\end{align}
</s>