5. As shown in Figure $1, P$ is a point on the chord $AB$ of $\odot O$, $AP$ $=m, PB=n$, and $m>n$.
When $AB$ moves around $\odot O$ once,
the trajectory of point $P$ is curve
C. If the area between
$\odot O$ and curve $C$ is
$\left(m^{2}-n^{2}\right) \pi$, then the value of $\frac{m}{n}$ is
5. $\frac{1+\sqrt{5}}{2}$.

As shown in Figure 5, let the midpoint of $A B$ be $M$, connect $O M$, $O P$, and $O B$, and let the radius of $\odot O$ be $R$.
$$
\begin{array}{l}
\text { By } O M \perp A B, M B=\frac{1}{2}(m+n), \\
M P=\frac{1}{2}(m+n)-n=\frac{1}{2}(m-n),
\end{array}
$$

we get $\quad R^{2}=O B^{2}=O M^{2}+\frac{1}{4}(m+n)^{2}$,
$$
O P^{2}=O M^{2}+\frac{1}{4}(m-n)^{2} \text {. }
$$

From equation (1), we know that $O M^{2}$ is a constant. Then from equation (2), we know that $O P$ is a constant. Therefore, curve $C$ is a circle with $O$ as the center and $O P$ as the radius.
From the problem, we get
$$
\begin{array}{l}
\left(R^{2}-O P^{2}\right) \pi=\left(m^{2}-n^{2}\right) \pi \\
\Rightarrow \frac{1}{4}\left((m+n)^{2}-(m-n)^{2}\right)=m^{2}-n^{2} \\
\Rightarrow m^{2}-n^{2}=m n \\
\Rightarrow \frac{m}{n}=\frac{1+\sqrt{5}}{2} \text { (negative root discarded). }
\end{array}
$$