Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ that satisfy

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

for all $x, y \in \mathbb{R}$.
Substituting $x=1$ gives $f(y)+2 f\left(y^{2}\right)=(1+f(y)) f(y)$, so

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

We can cancel the term $2 f\left(y^{2}\right)$ on the left with $f(y)^{2}$ on the right in the original functional equation:

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

Substituting $y=1$ here gives $f\left(x^{2}\right)=x^{2} f(1)$ and substituting $y=-1$ gives $f\left(-x^{2}\right)=$ $x^{2} f(-1)$. Since $x^{2}$ takes on all non-negative values as $x \in \mathbb{R}$, we now have

$$
f(x)= \begin{cases}c x & \text { if } x \geq 0 \\ d x & \text { if } x<0\end{cases}
$$

with $c=f(1)$ and $d=-f(-1)$. Now substitute $y=1$ in (1), which gives $2 f(1)=f(1)^{2}$, so $2 c=c^{2}$. This yields $c=0$ or $c=2$. Substituting $y=-1$ in (1) gives $2 f(1)=f(-1)^{2}$, so $2 c=(-d)^{2}$. For $c=0$ this gives $d=0$ and for $c=2$ this gives $d=2$ or $d=-2$. We thus have three cases:

- $c=0, d=0$ : then $f(x)=0$ for all $x$;
- $c=2, d=2$ : then $f(x)=2 x$ for all $x$;
- $c=2, d=-2$ : then $f(x)=2 x$ for $x \geq 0$ and $f(x)=-2 x$ for $x<0$, or $f(x)=2|x|$ for all $x$.

With the first function, we get 0 on both sides of the functional equation, so this function satisfies it. With the second function, we get $2 x^{2} y+4 y^{2}$ on the left and $\left(x^{2}+2 y\right) \cdot 2 y=2 x^{2} y+4 y^{2}$ on the right, so this function satisfies it. With the third function, we get $2\left|x^{2} y\right|+4\left|y^{2}\right|=$ $2 x^{2}|y|+4 y^{2}$ on the left and $\left(x^{2}+2|y|\right) \cdot 2|y|=2 x^{2}|y|+4|y|^{2}=2 x^{2}|y|+4 y^{2}$ on the right, so this function also satisfies it.

In total, we have found three solutions: $f(x)=0, f(x)=2 x$ and $f(x)=2|x|$.