Step 1: Rewrite the equation.
The given equation is:
\[
y \, dx = (x + 2y^2) \, dy.
\]
Rearrange terms to separate \( x \) and \( y \):
\[
\frac{dx}{x} = \frac{1}{y} \, dy + 2y \, dy.
\]
Step 2: Integrate both sides.
- For the left-hand side:
\[
\int \frac{dx}{x} = \ln|x| + C_1,
\]
where \( C_1 \) is the constant of integration.
- For the right-hand side, split into two integrals:
\[
\int \frac{1}{y} \, dy + \int 2y \, dy.
\]
- First term:
\[
\int \frac{1}{y} \, dy = \ln|y|.
\]
- Second term:
\[
\int 2y \, dy = y^2.
\]
Thus:
\[
\int \frac{1}{y} \, dy + \int 2y \, dy = \ln|y| + y^2.
\]
Step 3: Combine results.
Equating the results:
\[
\ln|x| = \ln|y| + y^2 + C_1.
\]
Step 4: Simplify the equation.
Let \( C = -C_1 \) (a constant), then:
\[
\ln|x| - \ln|y| = y^2 + C.
\]
Using the logarithmic property \( \ln|x| - \ln|y| = \ln\left|\frac{x}{y}\right| \), we get:
\[
\ln\left|\frac{x}{y}\right| = y^2 + C.
\]
Step 5: Write the general solution.
Exponentiate both sides to simplify:
\[
\frac{x}{y} = e^{y^2 + C} = e^C \cdot e^{y^2}.
\]
Let \( e^C = K \), where \( K \) is a constant, so:
\[
\frac{x}{y} = K e^{y^2}.
\]
Finally:
\[
x = Ky e^{y^2}.
\]
Conclusion:
The general solution is:
\[
\boxed{x = Ky e^{y^2}}.
\]