Suppose that $f$ is a function on the interval $[1,3]$ such that $-1\le f(x)\le 1$ for all $x$ and $\displaystyle \int_1^3f(x)\,dx=0.$ How large can $\displaystyle\int_1^3\frac{f(x)}x\,dx$ be?
1. **Given Conditions and Objective**:
   - We are given a function \( f \) on the interval \([1, 3]\) such that \(-1 \le f(x) \le 1\) for all \( x \).
   - We are also given that \(\int_1^3 f(x) \, dx = 0\).
   - We need to determine how large \(\int_1^3 \frac{f(x)}{x} \, dx\) can be.

2. **Constructing a Candidate Function**:
   - Consider the function \( g(x) \) defined as:
     \[
     g(x) = \begin{cases}
     -1 & \text{if } 1 \le x < 2, \\
     1 & \text{if } 2 < x \le 3, \\
     c & \text{if } x = 2,
     \end{cases}
     \]
     where \( c \in [-1, 1] \) is any constant.

3. **Verifying the Integral of \( g(x) \)**:
   - We need to check that \(\int_1^3 g(x) \, dx = 0\):
     \[
     \int_1^3 g(x) \, dx = \int_1^2 (-1) \, dx + \int_2^3 (1) \, dx + \int_{\{2\}} c \, dx.
     \]
     Since the integral over a single point is zero, we have:
     \[
     \int_1^2 (-1) \, dx + \int_2^3 (1) \, dx = -1 \cdot (2 - 1) + 1 \cdot (3 - 2) = -1 + 1 = 0.
     \]
     Thus, \(\int_1^3 g(x) \, dx = 0\).

4. **Calculating \(\int_1^3 \frac{g(x)}{x} \, dx\)**:
   - We split the integral as follows:
     \[
     \int_1^3 \frac{g(x)}{x} \, dx = \int_1^2 \frac{-1}{x} \, dx + \int_2^3 \frac{1}{x} \, dx.
     \]
   - Evaluating these integrals:
     \[
     \int_1^2 \frac{-1}{x} \, dx = -\ln(x) \Big|_1^2 = -\ln(2) + \ln(1) = -\ln(2),
     \]
     \[
     \int_2^3 \frac{1}{x} \, dx = \ln(x) \Big|_2^3 = \ln(3) - \ln(2).
     \]
   - Combining these results:
     \[
     \int_1^3 \frac{g(x)}{x} \, dx = -\ln(2) + (\ln(3) - \ln(2)) = \ln(3) - 2\ln(2) = \ln\left(\frac{3}{4}\right).
     \]

5. **Proving the Bound**:
   - We need to show that \(\int_1^3 \frac{f(x)}{x} \, dx \le \ln\left(\frac{4}{3}\right)\).
   - Consider the difference:
     \[
     \int_1^3 \frac{g(x) - f(x)}{x} \, dx.
     \]
   - We split this integral into two parts:
     \[
     \int_1^2 \frac{g(x) - f(x)}{x} \, dx + \int_2^3 \frac{g(x) - f(x)}{x} \, dx.
     \]
   - For \(1 \le x < 2\), \(g(x) = -1\), so:
     \[
     \int_1^2 \frac{-1 - f(x)}{x} \, dx.
     \]
   - For \(2 < x \le 3\), \(g(x) = 1\), so:
     \[
     \int_2^3 \frac{1 - f(x)}{x} \, dx.
     \]
   - Since \(-1 \le f(x) \le 1\), both integrals are non-negative:
     \[
     \int_1^2 \frac{-1 - f(x)}{x} \, dx \ge 0 \quad \text{and} \quad \int_2^3 \frac{1 - f(x)}{x} \, dx \ge 0.
     \]
   - Therefore:
     \[
     \int_1^3 \frac{g(x) - f(x)}{x} \, dx \ge 0 \implies \int_1^3 \frac{f(x)}{x} \, dx \le \int_1^3 \frac{g(x)}{x} \, dx = \ln\left(\frac{4}{3}\right).
     \]

The final answer is \(\boxed{\ln\left(\frac{4}{3}\right)}\).