For a linear recurrence relation with two distinct characteristic equation of a linear recurrence roots , the solution is . If , boundedness for forces , and fixes . This selects the decaying discrete mode in a finite difference method for a boundary problem on an unbounded interval. Roots on the unit circle require separate treatment; a repeated root there can contribute an unbounded factor .
Collecting the shifted terms gives a second-order difference equation with coefficients , and . Substitute to obtain its characteristic equation of a linear recurrence:
For real , the roots and general solution are
In the small-step regime, indeed for , the polynomial is positive at , negative at and positive for sufficiently large positive . Thus . The bounded solution of a second-order constant-coefficient recurrence discards the growing root, and fixes its remaining coefficient:
The Taylor series establishes the displayed approximation to the root. Raising that approximation to the th power is a leading approximation, rather than a uniform relative approximation for arbitrarily large : its relative error is controlled when is small. For completeness, the degenerate values give when , and when .
Let be the probability that the simple random walk started at hits before zero. The first-step analysis recurrence and boundary conditions are
If , the characteristic equation of a linear recurrence has roots and , so the boundary conditions give
If , the repeated root gives the limiting formula . This is the gambler's ruin probability.
For a fixed integer stake , the fact that divides lets us measure Patricia's wealth in units of £. She starts at and succeeds upon reaching . The formula above factors as
For , , so this probability increases as decreases. She should therefore choose the largest stake, . For , , so the probability increases as increases; she should choose the smallest stake, .
The characteristic equation of a linear recurrence is
Its repeated root gives
Since , this can be written , exactly the discrete form of the continuous solution of .