4. Solve the following congruences
(1) $8 x \equiv 7(\bmod 43)$,
(2) $x^{8} \equiv 17(\bmod 43)$,
(3) $8^{x} \equiv 4(\bmod 43)$
4. Solution: From the 13th table attached at the end of this chapter, we know that $g=3$ is a primitive root of $p=43$.
(1) From the table, we know ind $8=39$, ind $7=35$, and let ind $x=y$. Then, from the given congruence, we derive
$$39+y \equiv 35(\bmod \varphi(43))$$

Since ind $x=y=-4 \equiv 38(\bmod 42)$, hence ind $x=38$. Checking the 13th table again, we get $x \equiv 17(\bmod 43)$.
(2) Checking the table, we find ind $17=38$. Let ind $x=y$, then we have $8 y \equiv 38(\bmod 42)$,
which simplifies to
$$4 y \equiv 19 \equiv 40(\bmod 21)$$

Solving this, we get
$$y \equiv 10(\bmod 21)$$

Thus,
$$y_{1}=10, y_{2}=31$$

Checking the table, we get the two solutions $x_{1} \equiv 10, x_{2} \equiv 33(\bmod 43)$.
(3) Checking the table, we find ind $8=39$, ind $4=12$, hence we get
$$39 x \equiv 12(\bmod 42)$$

Thus,
$$13 x \equiv 4(\bmod 14)$$

Since $2|4,2| 14$, it must be that $2 \mid 13 x$, i.e., $x=2 y$, so
$$13 y \equiv 2(\bmod 7)$$

Hence,
$$y \equiv-2(\bmod 7)$$

Thus,
$$x=2 y \equiv-4 \equiv 3(\bmod 7)$$

To ensure $2 \mid x$, we get $x \equiv 10,24,38(\bmod 42)$.