3. Determine all functions $f: \mathbb{R}^{+} \rightarrow \mathbb{R}^{+}$ for which the following holds ($\forall x, y \in \mathbb{R}^{+}$)

$$
f\left(x^{y}\right)=f(x)^{f(y)}
$$
Solution. We observe that $f(x)=1$ satisfies the conditions of the problem. Let's look for other solutions. Let $f(a) \neq 1$ for some $a>0$. Then

$$
f(a)^{f(x y)}=f\left(a^{y}\right)=f\left(a^{x}\right)^{f(y)}=f(a)^{f(x) f(y)}
$$

Thus,

$$
f(x y)=f(x) f(y),(\forall x, y \in \mathbb{R})
$$

and since

$$
f(a)^{f(x+y)}=f\left(a^{x+y}\right)=f\left(a^{x} a^{y}\right)=f\left(a^{x}\right) f\left(a^{y}\right)=f(a)^{f(x)} f(a)^{f(y)}=f(a)^{f(x)+f(y)}
$$

we get

$$
f(x+y)=f(x)+f(y),(\forall x, y \in \mathbb{R})
$$

From (1) it follows that $f(1)=f(1 \cdot 1)=f(1) f(1)$, i.e., $f(1)=1$. Now, first from (2) and then by applying (1), we get

$$
\begin{aligned}
& f(n)=f(1+1+1+\ldots+1)=f(1)+f(1)+\ldots+f(1)=n, \quad \forall n \in \mathbb{N} \\
& f\left(\frac{m}{n}\right) n=f\left(\frac{m}{n}\right) f(n)=f\left(\frac{m}{n} \cdot n\right)=f(m)=m
\end{aligned}
$$

Thus, for any $m, n \in \mathbb{N}$, we have

$$
f\left(\frac{m}{n}\right)=\frac{m}{n}
$$

Let's assume there exists $x \in \mathbb{R}$ such that $f(x) \neq x$. Let $f(x)x$ be considered analogously). There exists $y=\frac{m}{n}$ such that

$$
f(x)f(y)>y
$$

i.e., $f(x)>x$, which contradicts (4).

Thus, $\left(\forall x \in \mathbb{R}^{+}\right), f(x)=x$. The desired functions are $f(x) \equiv 1$ and $f(x) \equiv x$.