1. 5. 5. ** The domain of the function $f(x)$ is $(0,1)$, and the rule of correspondence is
$$
f(x)=\left\{\begin{array}{ll}
x, & \text { if } x \text { is irrational, } \\
\frac{p+1}{q}, & \text { if } x=\frac{p}{q}, p, q \in \mathbf{N}^{*},(p, q)=1, p<q .
\end{array}\right.
$$

Find the maximum value of $f(x)$ in the interval $\left(\frac{7}{8}, \frac{8}{9}\right)$.
When $x \in\left(\frac{7}{8}, \frac{8}{9}\right)$ and $x$ is an irrational number, $f(x)\frac{8}{9}$. Therefore, the maximum value sought is $\frac{16}{17}$.

解析

When $x \in\left(\frac{7}{8}, \frac{8}{9}\right)$ and $x$ is an irrational number, $f(x)\frac{8}{9}$. Hence the required maximum value is $\frac{16}{17}$.