Here are links to posts on this forum dealing with bankroll requirements and the risk of ruin formula. The derivation based on the coin flip game is the same as the one in this article.
Bankroll formulas
Derivation of bankroll formulas
Online calculators for bankroll and risk of ruin
Here is a derivation of the risk of ruin formula for coin flip games:
Risk of ruin for coin flip freezeout