# Help understanding separation of variables technique

Find the general solution of

$$(x_{}^2 + 4)\frac{{dy}}{{dx}} = xy$$

After separating variables $$\frac{dy}{y} = \frac{x}{x^2 + 4}dx$$

What I don't understand is my textbook's result after integrating...

$$\int \frac{dy}{y} = \int \frac{x}{x^2 + 4}$$

$$\ln \left| y \right| = \frac{1}{2} \ln(x^2 + 4) + C_1$$

which they said resulted in...

$$\ln \left| y \right| = \ln \sqrt{x^2 + 4} + C_1$$

What I want to know is how the $$\frac12$$ disappeared after integrating and how they came to simplifying it with a square root. I appreciate any constructive insight. Thank you!

• should there be brackets around $x^2 + 4$ in the first line? Also, the logarithm part is because $\ln(\xi^{\alpha}) = \alpha \cdot \ln(\xi)$ (one of the basic properties of logarithms) – peek-a-boo Jul 20 at 22:09

One of the laws of logarithm is the power rule which is $$\ln x^k =k\ln x$$
In this case $$k =1/2$$ So $$(1/2)\ln (4+x^2) =\ln(4+x^2)^{1/2}$$
Because$$\ln\left(\sqrt{x^2+4}\right)=\ln\left((x^2+4)^{1/2}\right)=\frac12\ln(x^2+4).$$