Q:

Separable differential equation, answer correct?

I've tried to solve the following equation the way I've been taught:
$\frac{dy}{dx} = \frac{y}{2x} $
$y'*\frac{1}{y} = \frac{1}{2x} $
From the form $y'g(y) = f(x) $ we assign $g(x) = \frac{1}{y}$ and $f(x) = \frac{1}{2x}$.
Proceeding by rewriting the left hand side (where $G(y)$ is a primitive function of $g(y)$):
$\frac{d}{dx}G(y) = \frac{1}{2x}$
$G(y) = ln(y)$
$\frac{d}{dx}ln(y) = \frac{1}{2x}$
$ln(y) = \int\frac{1}{2x}dx$
$ln(y) = \frac{1}{2}\int\frac{1}{x}dx$
$ln(y) = \frac{ln(x)}{2} + C$
$ln(y) = ln(e^{(ln(x)/2) + C})$
$y = e^{(ln(x)/2) + C}$
Where the last line would be my answer. However the textbook says that the answer is as simple as $y^2 = Cx$. Am I doing it the wrong way?

A:

Hint: $y=e^{0.5\ln(x)+C}=e^{\ln(x^{0.5})+C}=x^{0.5}e^C$.
Rename $e^C=\sqrt{C_1}$ and you get $y=\sqrt{C_1}\sqrt{x}$. Square this expression and you get $y^2=C_1x$.

A:

Your answer is correct. Squaring both sides gives:
$$y^2=e^{\ln(x)+2C}\implies y^2=e^{\ln(x)}\cdot e^{2C}\implies y^2=x\cdot e^{2C}$$
Since $C$ is an arbitrary constant, you can substitute $k=e^{2C}$ to obtain your general solution.

