## Velocity Ratio and Number of Teeth: the Continued-Fraction Method

### The discretization problem

As we have seen, the velocity ratio in gears is given by the equation:

$i = \frac{\omega_2}{\omega_1} = \frac{Z_1}{Z_2}$

Since the numbers of teeth are **integers**, we cannot obtain just any velocity ratio, but only a **discrete number** of them. Moreover, this ratio between integers cannot be arbitrary, because there is usually a **limit on the maximum and minimum number of teeth** we can use (for example, $Z_{\min} = 20$ to avoid undercutting without correction, and $Z_{\max} = 100$ due to space or cost limitations).

### Approximation using continued fractions

To approximate a given velocity ratio (which may be irrational or have many decimal digits) we can use the **continued-fraction method**, which provides the best successive rational approximations.

#### Practical example: approximating $\pi/10$

Suppose we want to approximate a velocity ratio of $i = \pi/10 = 0.31415926...$

**Step 1:** We express the number as a continued fraction through successive divisions:

$0.31415926 = \frac{314.15926}{1000} = \frac{1}{\frac{1000}{314.15926}}$

We keep expanding:

$= \frac{1}{3 + \frac{57.5224}{314.15926}} = \frac{1}{3 + \frac{1}{\frac{314.15926}{57.5224}}}$

$= \frac{1}{3 + \frac{1}{5 + \frac{26.5472}{57.5224}}} = \frac{1}{3 + \frac{1}{5 + \frac{1}{\frac{57.5224}{26.5472}}}}$

$= \frac{1}{3 + \frac{1}{5 + \frac{1}{2 + \frac{4.428}{26.5472}}}} = \frac{1}{3 + \frac{1}{5 + \frac{1}{2 + \frac{1}{5.99...}}}}$

**Step 2:** The successive approximations (convergents) are:

| Continued fraction | Simple fraction | Decimal value | Relative error |
|-------------------|-----------------|---------------|----------------|
| $\frac{1}{3}$ | $\frac{1}{3}$ | $0.3333$ | $6.10\%$ |
| $\frac{1}{3+\frac{1}{5}}$ | $\frac{5}{16}$ | $0.3125$ | $0.528\%$ |
| $\frac{1}{3+\frac{1}{5+\frac{1}{2}}}$ | $\frac{11}{35}$ | $0.3143$ | $0.040\%$ |
| $\frac{1}{3+\frac{1}{5+\frac{1}{2+\frac{1}{5}}}}$ | $\frac{60}{191}$ | $0.314136$ | $0.007\%$ |

### Practical solutions with tooth-count constraints

The possible solutions to our problem, **if we cannot go below 20 teeth** (to avoid undercutting), will be multiples of the fractions obtained:

**Fraction $\frac{1}{3}$:**
- $\frac{20}{60}$, $\frac{21}{63}$, $\frac{22}{66}$, $\frac{23}{69}$, ...

**Fraction $\frac{5}{16}$:**
- $\frac{20}{64}$, $\frac{25}{80}$, $\frac{30}{96}$, ...

**Fraction $\frac{11}{35}$:**
- $\frac{22}{70}$, $\frac{33}{105}$, $\frac{44}{140}$, ...

**Fraction $\frac{60}{191}$:**
- $\frac{60}{191}$, $\frac{120}{382}$, ...

**Final decision:** If, for example, we could not exceed **100 teeth** (due to space limitations), the **optimal solution** would be:

$Z_1 = 22, \quad Z_2 = 70 \quad \Rightarrow \quad i = \frac{70}{22} = \frac{35}{11} = 0.31429$

with a relative error of only **0.040%**, which is excellent for industrial applications.

### Advantages of the method

- It provides the **best rational approximations** at each step (convergents).
- It allows choosing the optimal solution according to **design constraints** ($Z_{\min}$, $Z_{\max}$).
- It is especially useful when **irrational** transmission ratios are required (such as $\pi$, $\sqrt{2}$, the golden ratio, etc.) in special applications (astronomical instruments, precision instrumentation).
