# A Gift That Keeps On Giving

We see from “Seek-Lock-Strike!” Again that given the missile’s position $(x, y),$

$\frac{dx}{dy}=\frac{a+v_a t-x}{b-y}$

where $x$ and $y$ are themselves functions of time $t.$

It means

$\frac{dx}{dy} = \frac{\frac{dx}{dt}}{\frac{dy}{dt}}=\frac{a+v_a t-x}{b-y}\implies \frac{dx}{dt} = \frac{a+v_a t-x}{b-y}\cdot\frac{dy}{dt}.$

That is, let $\kappa(x,y,t) = \frac{a+v_a t-x}{b-y},$

$\frac{dx}{dt}=\kappa\cdot \frac{dy}{dt}.\quad\quad\quad(1)$

We also have (see “Seek-Lock-Strike!”)

$v_m = \sqrt{(\frac{dx}{dt})^2+(\frac{dy}{dt})^2}\implies v_m = \sqrt{1+\kappa^2}|\frac{dy}{dt}| .$

Since $\frac{dy}{dt} >0,$

$\frac{dy}{dt} = \frac{v_m}{\sqrt{1+\kappa^2}}.\quad\quad\quad(2)$

Substitute (2) into (1) yields

$\frac{dx}{dt} = \frac{v_m\cdot \kappa}{\sqrt{1+\kappa^2}}.\quad\quad\quad(3)$

It follows that $(x(t), y(t))$, the position of the missile satisfies the initial-value problem

$\begin{cases} \frac{dx}{dt} = \frac{\kappa\cdot v_m}{\sqrt{1+\kappa^2}} \\ \frac{dy}{dt} = \frac{v_m}{\sqrt{1+\kappa^2}} \\x(0)=0, y(0)=0\end{cases}\quad\quad\quad(4)$

To obtain the missile’s trajectory, we solve (4) numerically using the Runge-Kutta algorithm. It integrates (4) from $t=0$ to $t= t_*$ (see “Seek-Lock-Strike!”).

Fig. 1 $a=100\;m, b=3000\;m, v_a=1500\;ms^{-1},v_m=2000\;ms^{-1}$

The missile strike is illustrated in Fig. 1 and 2.

Fig. 2 $a=100\;m, b=3000\;m, v_a=1500\;ms^{-1},v_m=2000\;ms^{-1}$

Fig. 3 $a=-1200\;m, b=3000\;m, v_a=1500\;ms^{-1},v_m=2000\;ms^{-1}$

The trajectories shown are much smoother than those in “Seek-Lock-Strike!” Animated.

# “Seek-Lock-Strike!” Animated

In “Seek-Lock-Strike!” Again, we obtained the missile’s trajectory. Namely,

$x = \frac{1}{2} \left(\frac{(b-y)^{r+1}}{b^r \cdot f \cdot (r+1)}-\frac{b^r \cdot f \cdot (b-y)^{1-r}}{1-r}\right) -k\quad\quad\quad(*)$

where

$f = \frac{a}{b}+\sqrt{1+(\frac{a}{b})^2},$

$k = \frac{b}{2}\left(\frac{1}{f \cdot (r+1)}-\frac{f}{1-r}\right).$

Since the fighter jet maintains its altitude ($y= b$), the missile must strike it at $(x_*, b)$. Setting $y=b$ in $(*)$ gives $x_* = -k.$

Hence, we can plot $(*):$

Fig. 1 $a = 100\;m, b=3000\;m, v_a=1500\;ms^{-1}, v_m=2000\;ms^{-1}$

We can also illustrate “Seek-Lock-Strike” in an animation:

Fig. 2 $a = 100\;m, b=3000\;m, v_a=1500\;ms^{-1}, v_m=2000\;ms^{-1}$

Fig. 3 $a = -2500\;m, b=3000\;m, v_a=1500\;ms^{-1}, v_m=2000\;ms^{-1}$

# “Seek-Lock-Strike!” Again

We can derive a different governing equation for the missile in “Seek-Lock-Strike!“.

Fig. 1

Looking from a different viewpoint (Fig. 1), we see

$\frac{dx}{dy} = \frac{a+v_at-x}{b-y}.\quad\quad\quad(1)$

Solving (1) for $t$,

$t = -\frac{\frac{dx}{dy}y-b\frac{dx}{dy}-x+a}{v_a}.\quad\quad\quad(2)$

We also have

$v_m t = \int\limits_{0}^{y}\sqrt{1+(\frac{dx}{dy})^2} \implies t = \frac{\int\limits_{0}^{y}\sqrt{1+(\frac{dx}{dy})^2}\;dy}{v_m}.\quad\quad\quad(3)$

Equate (1) and (2) gives

$-\frac{\frac{dx}{dy}y-b\frac{dx}{dy}-x+a}{v_a}-\frac{\int\limits_{0}^{y}\sqrt{1+(\frac{dx}{dy})^2}\;dy}{v_m} = 0.\quad\quad\quad(4)$

The governing eqaution emerges after differentiate (4) with respect to $x:$

$-\frac{d^2x}{dy^2}y+b\frac{d^2x}{dy^2}-\frac{v_a\sqrt{1+(\frac{dx}{dy})^2}}{v_m} = 0.\quad\quad\quad(5)$

We let $p = \frac{dx}{dy}$ so $\frac{d^2x}{dy^2} = \frac{d}{dy}\left(\frac{dx}{dy}\right)=\frac{dp}{dy}$ and express (5) as

$\frac{dp}{dy}(b-y) -r\sqrt{1+(\frac{dx}{dy})^2} = 0\quad\quad\quad(*)$

where $r = \frac{v_a}{v_m}.$

Fig. 2

Using Omega CAS Explorer, we compute the missile’s striking time $t_*$ (see Fig. 3). It agrees with the result obtained previously.

Fig. 3

Exercise-1 Obtain the missile’s trajectory from (*).

# “Seek-Lock-Strike!” Simplified

There is an easier way to derive the governing equation ((5), “Seek-Lock-Strike!“) for the missile.

Solving

$\frac{dy}{dx}(a+v_at-x) = b-y$

for $t,$ we have

$t = \frac{(x-a)\frac{dy}{dx}-y+b}{v_a\frac{dy}{dx}}.\quad\quad\quad(1)$

From

$v_m t = \int\limits_{0}^{x}\sqrt{1+(\frac{dy}{dx})^2}\;dx,$

we also have

$t = \frac{\int\limits_{0}^{x}\sqrt{1+(\frac{dy}{dx})^2}\;dx}{v_m}.\quad\quad\quad(2)$

Equate (1) and (2) gives

$\frac{\int\limits_{0}^{x}\sqrt{1+(\frac{dy}{dx})^2}\;dx}{v_m}-\frac{(x-a)\frac{dy}{dx}-y+b}{v_a\frac{dy}{dx}}=0.\quad\quad\quad(3)$

Differentiate (3) with repect to $x,$ we obtain

$(bv_m-v_my)\frac{d^2y}{dx^2} + v_a(\frac{dy}{dx})^2\sqrt{1+(\frac{dy}{dx})^2} = 0.\quad\quad\quad(4)$

(see Fig. 1)

Fig. 1

Let $r=\frac{v_a}{v_m}, p=\frac{dy}{dx} \implies \frac{d^2y}{dx^2} = p\frac{dp}{dy},$ (4) bcomes

$(b-y)p\frac{dp}{dy} + r p^2 \sqrt{1+p^2} = 0.$

Since $p = \frac{dy}{dx} \ne 0$, dividing $p$ through yields

$(b-y)\frac{dp}{dy} + rp\sqrt{1+p^2}=0,$

the governing equation for the missile.

# Newton’s Pi Simplified

We know from “arcsin” :

$\frac{d}{dx} \arcsin(x) = \frac{1}{\sqrt{1-x^2}}.$

Integrate from $0$ to $x\; (0

$\int\limits_{0}^{x}\frac{d}{dx}\arcsin(x)\;dx = \int\limits_{0}^{x}\frac{1}{\sqrt{1-x^2}}\;dx$

gives

$\arcsin(x)\bigg|_{0}^{x} = \int\limits_{0}^{x}\frac{1}{\sqrt{1-x^2}}\;dx.$

i.e.,

$\arcsin(x) = \int\limits_{0}^{x}\frac{1}{\sqrt{1-x^2}}\;dx.\quad\quad\quad(\star)$

Rewrite the integrand $\frac{1}{\sqrt{1-x^2}}$ as

$(1-x^2)^{-\frac{1}{2}}= (1+(-x^2))^{-\frac{1}{2}}$

so that by the extended binomial theorem (see “A Gem from Issac Newton“),

$\frac{1}{\sqrt{1-x^2}}\overset{(A-1)}{=} \sum\limits_{i=0}^{\infty}\binom{-\frac{1}{2}}{i}1^{-\frac{1}{2}-i}(-x^2)^i.$

Hence,

$\frac{1}{\sqrt{1-x^2}} = \sum\limits_{i=0}^{\infty}\binom{-\frac{1}{2}}{i}(-1)^i x^{2i}.$

And,

$\int\limits_{0}^{x}\frac{1}{\sqrt{1-x^2}}\;dx=\int\limits_{0}^{x}\sum\limits_{i=0}^{\infty}\binom{-\frac{1}{2}}{i}(-1)^i x^{2i}\;dx = \sum\limits_{i=0}^{\infty}\int\limits_{0}^{x}\binom{-\frac{1}{2}}{i}(-1)^i x^{2i}\;dx = \sum\limits_{i=0}^{\infty}\binom{-\frac{1}{2}}{i}(-1)^i \frac{x^{2i+1}}{2i+1}.$

It follows that by $(\star)$,

$\arcsin(x) = \sum\limits_{i=0}^{\infty}\binom{-\frac{1}{2}}{i}(-1)^i \frac{x^{2i+1}}{2i+1}.$

Let $x=\frac{1}{2},$ we have

$\frac{\pi}{6} = \sum\limits_{i=0}^{\infty}\binom{-\frac{1}{2}}{i}(-1)^i \frac{(\frac{1}{2})^{2i+1}}{2i+1}.$

And so,

$\pi = 6 \sum\limits_{i=0}^{\infty}\binom{-\frac{1}{2}}{i}(-1)^i \frac{1}{2^{2i+1} 2i+1}.$

Fig. 1

Given $0 < x <1,$ prove:

$|-x^2| < 1.\quad\quad\quad(A-1)$

proof

Since $0

Exercise-1 Compute $\pi$ by applying the extended binomial theorem to $\frac{\pi}{6} = \int\limits_{0}^{\frac{1}{\sqrt{3}}}\frac{1}{1+x^2}\;dx.$

Exercise-2 Can we compute $\pi$ by applying the extended binomial theorem to $\frac{\pi}{4}=\int\limits_{0}^{1}\frac{1}{1+x^2}\;dx?$ Explain.

# Newton’s Pi

Fig. 1

Shown in Fig. 1 is a semicircle centered at C $(\frac{1}{2}, 0)$ with radius = $\frac{1}{2}$. Its equation is

$(x-\frac{1}{2})^2+y^2=(\frac{1}{2})^2, 0 \le x \le 1, y \ge 0.$

Simplifying and solving for $y$ gives

$y = x^{\frac{1}{2}}\cdot(1-x)^{\frac{1}{2}}.\quad\quad\quad(1)$

We see that

Area (sector OAC) = Area (sector OAB) + Area (triangle ABC)$.\quad\quad(*)$

And,

$a = BC = \frac{1}{2}-\frac{1}{4} = \frac{1}{4}, \quad\quad h = AB = \sqrt{AC^2-BC^2} = \sqrt{\frac{1}{2} - \frac{1}{4}}=\frac{\sqrt{3}}{2}.$

It means

Area (triangle ABC) $= \frac{1}{2}ah =\frac{1}{2}\cdot\frac{1}{4}\cdot\frac{\sqrt{3}}{4} = \frac{\sqrt{3}}{32}.\quad\quad\quad(2)$

Moreover,

$\cos(\theta) = \frac{BC}{AC} = \frac{\frac{1}{4}}{\frac{1}{2}} = \frac{1}{2} \implies \theta = \frac{\pi}{3}.$

Since $\theta$ is one-third of the $\pi$ angle forming the semicircle, the sector is likewise a third of the semicircle. Namely,

Area (sector OAC) $= \frac{1}{3}$ Area (semicircle) = $\frac{1}{3} \cdot \frac{1}{2} \pi (\frac{1}{2})^2 = \frac{\pi}{24}.\quad\quad\quad(3)$

Area (sector OAB) is the area under the curve $y=x^{\frac{1}{2}}\cdot(1-x)^{\frac{1}{2}}$ from its starting point $0$ to the point $x=\frac{1}{4}.$ i.e.,

Area (sector OAB)

$= \int\limits_{0}^{\frac{1}{4}}x^{\frac{1}{2}}\cdot(1-x)^{\frac{1}{2}}\;dx$

$= \int\limits_{0}^{\frac{1}{4}}x^{\frac{1}{2}}\cdot((-x)+1)^{\frac{1}{2}}\;dx$

By the extended binomial theorem: $(x+y)^r=\sum\limits_{i=0}^{\infty }x^iy^{r-i}, x, y, r \in R, |x|< |y|$ (see “A Gem from Isaac Newton“)

$= \int\limits_{0}^{\frac{1}{4}}x^{\frac{1}{2}}\sum\limits_{i=0}^{\infty}\binom{\frac{1}{2}}{i}(-x)^i\;dx$

$=\int\limits_{0}^{\frac{1}{4}}x^{\frac{1}{2}}\sum\limits_{i=0}^{\infty}\binom{\frac{1}{2}}{i}(-1)^ix^i\;dx$

$= \int\limits_{0}^{\frac{1}{4}}\sum\limits_{i=0}^{\infty}\binom{\frac{1}{2}}{i}(-1)^ix^{\frac{2i+1}{2}}\;dx$

$= \sum\limits_{i=0}^{\infty}\binom{\frac{1}{2}}{i}(-1)^i\int\limits_{0}^{\frac{1}{4}}x^{\frac{2i+1}{2}}\;dx$

$=\sum\limits_{i=0}^{\infty}\binom{\frac{1}{2}}{i}(-1)^i\frac{2}{2i+3}x^{\frac{2i+3}{2}}\bigg|_{0}^{\frac{1}{4}}$

$x=\frac{1}{4} \implies x^{\frac{2i+3}{2}}$ simplifies beautifully: $\left(\sqrt{\frac{1}{4}}\right)^{2i+3}=\left(\frac{1}{2}\right)^{2i+3}.$

$=\sum\limits_{i=0}^{\infty}\binom{\frac{1}{2}}{i}(-1)^i\frac{2}{2i+3}(\frac{1}{2})^{2i+3}$

$=\sum\limits_{i=0}^{\infty}\binom{\frac{1}{2}}{i}\frac{1}{4(2i+3)}(-\frac{1}{4})^i.\quad\quad\quad(4)$

Expressing (*) by (3), (2) and (4), we have

$\frac{\pi}{24}=\sum\limits_{i=0}^{\infty}\binom{\frac{1}{2}}{i}\frac{(-1)^i}{4^{i+1}(2i+3)}+\frac{\sqrt{3}}{32}.$

Therefore,

$\pi=24\left(\sum\limits_{i=0}^{\infty}\binom{r}{i}\frac{(-1)^i}{4^{i+1}(2i+3)}+\frac{\sqrt{3}}{32}\right).\quad\quad\quad(5)$

Observe first that

$\sqrt{3} = \sqrt{4-1} = \sqrt{4(1-\frac{1}{4})}=2\sqrt{1-\frac{1}{4}}=2\sqrt{\frac{-1}{4}+1}=2(\frac{-1}{4}+1)^{\frac{1}{2}}$

and so we replace $(\frac{-1}{4}+1)^{\frac{1}{2}}$ by its binomial expansion. As a result,

$\sqrt{3} = 2\sum\limits_{i=0}^{\infty}\binom{\frac{1}{2}}{i}(-\frac{1}{4})^i.\quad\quad\quad(6)$

Substituting (6) into (5) then yields

$\pi = \sum\limits_{i=0}^{\infty}\binom{\frac{1}{2}}{i}\left(-\frac{1}{4}\right)^i\left(\frac{1}{4(2i+3)} + \frac{2}{32}\right).$

Fig. 2 shows that with just ten terms (0 to 9) of the binomial expression, we have found $\pi$ correct to seven decmal places.

Fig. 2

# A Gem from Isaac Newton

The Binomial Theorem (see “Double Feature on ChristmasÂ Day“, “Prelude to Taylor’s theorem“) states:

$(x+y)^n = \sum\limits_{i=0}^{n} \binom{n}{i}x^{n-i}y^i, \quad n \in \mathbb{N}.$

Provide $x$ and $y$ are suitably restricted, there is an Extended Binomial Theorem. Namely,

$(x+y)^r = \sum\limits_{i=0}^{\infty} \binom{r}{i}x^{r-i}y^i, \underline{|\frac{x}{y}|<1}, r \in \mathbb{R}$

where $\binom{r}{i} \overset{\Delta}{=} \frac{r(r-1)(r-2)...(r-i+1)}{i!}.$

Although Issac Newton is generally credited with the Extended Binomial Theorem, he only derived the germane formula for any rational exponent (i.e., $r \in \mathbb{Q}$).

We offer a complete proof as follows:

Let

$f(t) = (1+t)^r,\;|t|<1, r \in \mathbb{R}.\quad\quad\quad(1)$

Differentiate (1) with respect to $t$ yields

$f'(t) = r(1+t)^{r-1}.$

We have

$(1+t)f'(t) = (1+t)\cdot r(1+t)^{r-1} = r(1+t)^r.$

That is,

$(1+t)f'(t) = rf(t).$

From

$f(0) = (1+0)^r =1,$

we see that $f(t) = (1+t)^r$ is a solution of initial-value problem

$\begin{cases} (1+t)z'(t)=rz(t) \\ z(0) = 1 \end{cases}\quad\quad\quad(2)$

By $(A-1),$ we also have

$g(t) = \sum\limits_{i=0}^{\infty}\binom{r}{i}\cdot t^{i}, |t|<1, r \in \mathbb{R}.\quad\quad\quad(3)$

Express (3) as

$g(t) = \binom{r}{0}t^0 + \sum\limits_{i=1}^{\infty}\binom{r}{i}t^i=1+ \sum\limits_{i=1}^{\infty}\binom{r}{i}t^i$

and then differentiate it with respect to $t:$

$g'(t) = \sum\limits_{i=0}^{\infty}\binom{r}{i}\cdot i\cdot t^{i-1}\overset{(A-2)}{=} r\sum\limits_{i=1}^{\infty}\binom{r-1}{i-1}t^{i-1}$

gives us

$(1+t)g'(t) = (t+1)\cdot r\sum\limits_{i=1}^{\infty}\binom{r-1}{i-1}t^{i-1}$

$= r\sum\limits_{i=1}^{\infty}\binom{r-1}{i-1}t^i + r\sum\limits_{i=1}^{\infty}\binom{r-1}{i-1}t^{i-1}$

$= r\sum\limits_{i=1}^{\infty}\binom{r-1}{i-1}t^i + r\sum\limits_{k=0}^{\infty}\binom{r-1}{k}t^{k}$

$= r\sum\limits_{i=1}^{\infty}\binom{r-1}{i-1}t^i + r\left(\binom{r-1}{0}t^0+\sum\limits_{k=1}^{\infty}\binom{r-1}{k}t^k\right)$

$= r\sum\limits_{i=1}^{\infty}\binom{r-1}{i-1}t^i + r\left(1+\sum\limits_{i=1}^{\infty}\binom{r-1}{i}t^i\right)$

$= r\sum\limits_{i=1}^{\infty}\binom{r-1}{i-1}t^i + r + r\sum\limits_{i=1}^{\infty}\binom{r-1}{i}t^i$

$= r\sum\limits_{i=1}^{\infty}\binom{r-1}{i-1}t^i + r\sum\limits_{i=1}^{\infty}\binom{r-1}{i}t^i+r$

$= r\sum\limits_{i=1}^{\infty}\left(\binom{r-1}{i-1} + \binom{r-1}{i}\right)t^i+r$

$\overset{(A-3)}{=} r\sum\limits_{i=1}^{\infty}\binom{r}{i}t^i+r$

$= r\sum\limits_{i=1}^{\infty}\binom{r}{i}t^i+r\binom{r}{0}t^0$

$= r\left(\sum\limits_{i=1}^{\infty}\binom{r}{i}t^i+\binom{r}{0}t^0\right)$

$= r\sum\limits_{i=0}^{\infty}\binom{r}{i}t^i$

$\overset{(3)}{=} r\cdot g(t).$

i.e.,

$(1+t)g'(t) = rg(t).$

Since

$g(0) = 1+\sum\limits_{i=1}^{\infty}\binom{r}{i}0^i = 1,$

we see that $g(t)$ is also a solution of initial-value problem (2).

Hence, by the Uniqueness theorem (see Coddington: An Introduction to Ordinary Differential Equations, p. 105),

$f(t) = g(t).$

And so,

$(1+t)^r = \sum\limits_{i=0}^{\infty}\binom{r}{i}t^i.$

Consequently, for $|\frac{x}{y}| <1,$

$(1+\frac{x}{y})^r = \sum\limits_{i=0}^{\infty}\binom{r}{i}(\frac{x}{y})^i.$

Multiply $y^r$ throughout, we obtain

$(x+y)^r = y^r\sum\limits_{i=0}^{\infty}\binom{r}{i}x^iy^{-i}.$

i.e.,

$(x + y)^r = \sum\limits_{i=0}^{\infty}\binom{r}{i}x^iy^{r-i}.$

Prove $(A-1)$ is convergent:

$\sum\limits_{i=1}^{\infty}\binom{r}{i}\cdot t^{i}, |t|<1\quad\quad\quad(A-1)$

Proof

$\frac{\binom{r}{i+1}t^{i+1}}{\binom{r}{i}t^i}$

$= \frac{\frac{r(r-1)(r-2)...(r-i+1)(r-(i+1)+1)}{(i+1)!}}{\frac{r(r-1)(r-2)...(r-i+1)}{i!}}\cdot t$

$=\frac{r(r-1)(r-2)...(r-i+1)(r-(i+1)+1)}{(i+1)!}\cdot \frac{i!}{r(r-1)(r-2)...(r-i+1)}\cdot t$

$= \frac{r-(i+1)+1}{(i+1)i!}i!\cdot t$

$=\frac{r-(i+1)+1}{i+1}\cdot t$

$\lim\limits_{i\rightarrow \infty}\bigg|\frac{\binom{r}{i+1}t^{i+1}}{\binom{r}{i}t^i}\bigg|=\lim\limits_{i\rightarrow \infty}|\frac{r-(i+1)+1}{i+1}\cdot t|=\lim\limits_{i\rightarrow \infty}|\frac{i-r}{i+1}|\cdot |t|=|t|\overset{}{<}1$

Prove

$\sum\limits_{i=1}^{\infty}\binom{r}{i}\cdot i\cdot t^{i-1} = r\sum\limits_{i=1}^{\infty}\binom{r-1}{i-1}\cdot t^{i-1}\quad\quad\quad(A-2)$

Proof

$\binom{r}{i} = \frac{r(r-1)(r-2)...(r-i+1)}{i!}$

$= \frac{r}{i}\cdot\frac{(r-1)(r-1-1)...(r-1+1-i+1)}{(i-1)!}$

$= \frac{r}{i}\cdot\frac{(r-1)(r-1-1)...(r-1-i+1+1)}{(i-1)!}$

$= \frac{r}{i}\cdot\frac{(r-1)(r-1-1)(r-1-2)...(r-1-(i-1)+1)}{(i-1)!}$

$= \frac{r}{i}\binom{r-1}{i-1}$

that is,

$\binom{r}{i} = \frac{r}{i}\binom{r-1}{i-1}.$

Therefore,

$\sum\limits_{i=1}^{\infty}\boxed{\binom{r}{i}}\cdot i\cdot t^{i-1} =\sum\limits_{i=1}^{\infty}\boxed{\frac{r}{i}\binom{r-1}{i-1}}\cdot i\cdot t^{i-1}=r\sum\limits_{k=1}^{\infty}\binom{i-1}{i-1}t^{i-1}.$

Prove

$\binom{r-1}{i-1} + \binom{r-1}{i} = \binom{r}{i}\quad\quad\quad(A-3)$

Proof

$\binom{r-1}{i-1} + \binom{r-1}{i}$

$= \frac{(r-1)((r-1)-1)...((r-1)-(i-1)+1)}{(i-1)!} + \frac{(r-1)((r-1)-1)...((r-1)-i+1)}{i!}$

$= \frac{(r-1)((r-1)-1)((r-1)-2)...(r-(i-1)+1)}{(i-1)!} + \frac{(r-1)((r-1)-1)((r-1)-2)...((r-1)-(i-1)+1)((r-1)-i+1)}{(i)!}$

$= (r-1)((r-1)-1)((r-1)-2)...((r-1)-(i-1)+1)\cdot \left(\frac{1}{(i-1)!} + \frac{(r-1)-i+1}{i!}\right)$

$= \frac{(r-1)(r-1-1)(r-1-2)...(r-1-(i-1)+1)}{(i-1)!}\cdot \left(1+\frac{(r-1)-i+1}{i}\right)$

$= \frac{(r-1)(r-1-1)(r-1-2)...(r-1-(i-1)+1)}{(i-1)!}\cdot \left(\frac{i + (r-1)-i+1}{i}\right)$

$= \frac{(r-1)(r-1-1)(r-1-2)...(r-1-(i-1)+1)}{(i-1)!}\cdot\frac{r}{i}$

$= \frac{r(r-1)(r-2)...(r-1-i+1+1)}{i(i-1)!}$

$= \frac{r(r-1)(r-2)...(r-i+1)}{i!}$

$= \binom{r}{i}.$