5. Find all functions $f(x): N^{+} \rightarrow N^{+}$, such that for any $x, y \in N^{+}$, we have $f(x+y f(x))=x f(y+1)$.
【Solution (1)】Let $y=1, x=m+(m-1) f(m)$,
then $f(2)(m+(m-1) f(m))=f(m+(m-1) f(m)+f(m+(m-1) f(m)))$
$$
=f(m+(m-1) f(m)+m f(m))=m f(2 m). (3 \text { points })
$$

Since $(m, m-1)=1$, for any positive integer $m$ we have $m \mid f(2) f(m)$. (1) (6 points)
For any positive integer $s$, let $f(s)=t$, and let $x=s, y=1$, then $f(s+t)=s f(2)$.
If we let $a_{1}=2, a_{i}=t a_{i-1}-t+s$, then by repeatedly using (2), we have $f\left(a_{i}\right)=s^{i-1} f(2)$. (3) (9 points)

If there exists $z$ such that $f(z)=1$, then by (3) we have $f(i z-i+2)=z^{i} f(2)$, if $z \neq 1$, we take a sufficiently large $i \equiv 1(\bmod z)$, by $(i z-i+2, z)=1$, substituting into (1) we get $i z-i+2 \mid f^{2}(2)$, a contradiction, hence $z=1$ must hold. (12 points)

Now for any $f(s)=t>1$, it is easy to get $a_{i}=\left(2+\frac{s-t}{t-1}\right) t^{i-1}-\frac{s-t}{t-1}$, and also $a_{i} \leq f(2) f\left(a_{i}\right)=s^{i-1} f^{2}$ (2), therefore $t^{i-1}+1 \leq\left(2+\frac{s-t}{t-1}\right) t^{i-1}-\frac{s-t}{t-1} \leq s^{i-1} f^{2}(2)$ must hold for any positive integer $i$, thus we must have $t \leq s$. (15 points) If $f(1)>1$, then a contradiction arises from the above derivation, hence $f(1)=1$ must hold.

By (1) we have $2 \mid f^{2}(2)$, so $f(2)=2$. (18 points)
Therefore, for any $s$, it can only be that $f(s)=s$ or $f(s)=\frac{s}{2}$, assuming there exists such $f(2 u)=u$, let $x=2 u, y=1$, then $f(3 u)=4 u$, a contradiction. (21 points)

Therefore, the only function satisfying the conditions of the problem is $f(x)=x$.
【Solution (2)】Let $y=t-1, x=m+(m-1) f(m)$,
then $f(t)(m+(m-1) f(m))=f(m+(m-1) f(m)+(t-1) f(m+(m-1) f(m)))$
$$
=f(m+(m-1) f(m)+(t-1) m f(m))=m f(\text { tm }) \text { for } t \geq 2 \text { to hold. }
$$

Exchanging $m$ and $t$, we get $f(t)(m+(m-1) f(m))=m f(\mathrm{tm}), \quad f(m)(t+(t-1) f(t))=t f(\mathrm{tm})$.
Rearranging gives $\frac{1}{f(t)}-\frac{1}{t}=\frac{1}{f(m)}-\frac{1}{m}$ is a constant. Hence we can set $f(x)=\frac{x}{a x+1}$, by the properties of positive integers, we must have $a=0$.
【Solution (3)】
$$
\begin{array}{l}
y(x+1) f(y+1)=y f[x+1+y f(x+1)]=y f\{x+1+f[y+x f(y)]\} \\
=f\{y+x f(y)+f[y+x f(y)] f(y)\}=[y+x f(y)] f[f(y)+1]
\end{array}
$$

Both sides of the above equation are linear functions of $x$, so their coefficients must be equal, giving
$$
\left\{\begin{array}{c}
y f(y+1)=f(y) f[f(y)+1] \\
y f(y+1)=y f[f(y)+1]
\end{array}\right.
$$

This must imply $f(y)=y$.