by using the identity $(1-x^2)^n=(1+x)^n(1-x)^n$, show that for each $m \in \Bbb N$ with $m < n$, summation of
$$\sum_{i=0}^n(-1)^i\binom{n}i^2=\begin{cases} 0,&\text{if }n\text{ is odd}\\ (-1)^{n/2}\binom{n}{n/2},&\text{if }n\text{ is even}\;. \end{cases}$$ that is summation of (−1)^i (n taken i )(n taken 2m−i) i=0 to 2m is (−1)^m (n taken m) if n is even and Summation of (−1)^i (n taken i )(n taken 2m+1−i) i from 0 to 2m+1 is 0 if n is odd.
please explain and how to prove the two cases.
Consider $(1+x)^n (1-x)^n \equiv (1-x^2)^n$, and compare coefficient of $x^n$ term.
$$\begin{align} \text{Left hand side} =& \sum_{i=0}^{n} \binom{n}{n-i} \left[\binom{n}{i} \left( -1 \right)^{i} \right] &\text{(From the expanded terms)}\\ =& \sum_{i=0}^{n} \binom{n}{i}^2 \left( -1 \right)^{i}\\ \end{align}$$
For right hand side, you can easily find the coefficient of $x^n$ from the binomial expansion
$$\left( 1-x^2 \right)^n = \sum_{i=0}^n \binom{n}{i} \left( -x^2 \right)^i$$