Help with recursive function

27 Views Asked by At

I need some help understanting how the following conclusion was made:

We have the recursive function: $ε_n=-n \cdot ε_{n-1}$

How do we come to the conclusion that $ε_n=(-1)^{n-1}\cdot n!\cdot ε_1$

2

There are 2 best solutions below

0
On

Recall that $n!=n\cdot(n-1)\cdots 2\cdot 1=n(n-1)!,$ so $$\epsilon _n=(-1)\epsilon_{n-1}=(-n)(-(n-1))\epsilon _{n-2}=(-1)^2n(n-1)\epsilon _{n-2}=\underbrace{\cdots}_{\text{Do it $n-1$ times}}=(-1)^{n-1}n(n-1)\cdots 2\cdot \epsilon _1.$$

0
On

You could prove it by mathematical induction.

Base case: $n=1$: $ε_1=(-1)^{1-1} \cdot ε_1= ε_1$.

Inductive step: if $ε_{n-1}=(-1)^{n-2}\cdot (n-1)!\cdot ε_1$, then $ε_n=-nε_{n-1}=(-1)^{n-1}\cdot n!\cdot ε_1$.