# Elementary Separable Differential Equation with tricky integral

The problem is to solve the separable differential equation $$\sqrt{xy}~~\frac{dy}{dx}=\sqrt{4-x}$$.

My work thus far: $$\sqrt{xy}~~ {dy}=\sqrt{4-x}~~dx \\ \sqrt{y}~~ {dy}=\sqrt{\frac{4-x}{x}}~~dx \\ \int \sqrt{y}~~ {dy}= \int \sqrt{\frac{4-x}{x}}~~d x \\ \frac{2}{3} y^{3/2} =\int \sqrt{\frac{4-x}{x}}~~dx \\ \frac{2}{3} y^{3/2} =\int \sqrt{\frac 4 x - 1 }~~dx$$

The right side is a difficult integral to evaluate.

Is there an easier approach I have missed, or should I persist in trying to solve the integral.

Hint: Apply the substitution $$u=\frac{4}{x}$$, then integrate by parts and then again look for a clever substitution to get to the form $$\int\frac{1}{t^2+1}dt=arctan(t)$$.

Hint Sometimes an integral $$\int \sqrt{f(x)} \, dx$$ can be resolved by rearranging $$u = \sqrt{f(x)}$$ to give a reverse substitution (where we may need to restrict the domain of $$f$$).

In our case, setting $$u = \sqrt\frac{4 - x}{x}$$ and rearranging and differentiating yields the substitution $$x = \frac{4}{u^2 + 1}, \qquad dx = -\frac{8 u\, du}{(u^2 + 1)^2},$$ which gives $$\int \sqrt\frac{4 - x}{x} dx = -8 \int \frac{u^2 \,du}{(u^2 + 1)^2} .$$ The latter integrand is rational and so can be solved with standard techniques.

The occurrence of the form $$u^2 + 1$$ in the denominator suggests the substitution $$u = \tan \theta$$, $$du = \sec^2 \theta\, d\theta$$.

Make the substitution $$t = \sqrt{x}$$, then

$$\int 2\sqrt{4-x}\ \frac{dx}{2\sqrt{x}} = \int 2\sqrt{4-t^2}\ dt$$

This is a standard trig substitution. Let $$t = 2\sin \theta$$

\begin{align} \int 2\sqrt{4-t^2}dt &= \int 2\cdot 2\cos\theta\cdot 2\cos\theta\ d\theta \\ &= \int 8 \cos^2\theta\ d\theta \\ &= \int 4(1+\cos2\theta)\ d\theta \\ &= 4\theta + 2\sin2\theta + C \end{align}

Going backwards

\begin{align} 4\theta + 2\sin2\theta + C &= 4\theta + 4\sin\theta\cos \theta + C \\ &= 4\arctan\frac{t}{2} + t\sqrt{4-t^2} + C \\ &= 4\arcsin\frac{\sqrt{x}}{2} + \sqrt{x}\sqrt{4-x} + C \end{align}

Thankyou to the tips given. I will attempt to answer my question. $$\sqrt{xy}~~\frac{dy}{dx}=\sqrt{4-x} \\ \sqrt{xy}~~ {dy}=\sqrt{4-x}~~dx \\ \sqrt{y}~~ {dy}=\sqrt{\frac{4-x}{x}}~~dx \\ \int \sqrt{y}~~ {dy}= \int \frac{ \sqrt {4-x}}{\sqrt x}~~dx \\ \frac{2}{3} y^{3/2} =\int \frac{ \sqrt {4-x}}{\sqrt x}~~dx \\ \text{ Make the substitution u = √x } \\ \frac{2}{3} y^{3/2} = 2\int \sqrt { 4- u^2} du \\ \\ \text{ Substitute w = u/2 } \\ \frac{2}{3} y^{3/2} = 8 \int \sqrt{ 1 - w ^2} ~dw \\ \text{ using trig substitution} \\ \frac{2}{3} y^{3/2} = 4 w \sqrt {1 -w^2}+4 \arcsin \left( w \right) + C \\ \text{back substituting } \\ \frac{2}{3} y^{3/2} = 4 \frac u 2 \sqrt {1 -\left( \frac u 2 \right) ^2}+4 \arcsin \left( \frac u 2 \right) + C \\ \frac{2}{3} y^{3/2} = 2 \sqrt x \sqrt {1 -\left( \frac {\sqrt x }{ 2} \right) ^2}+4 \arcsin \left( \frac {\sqrt x }{ 2} \right) + C \\ \frac{2}{3} y^{3/2} = 2 \sqrt x \sqrt {1 -\left( \frac {x}{4} \right)}+4 \arcsin \left( \frac {\sqrt x }{ 2} \right) + C \\ \frac{2}{3} y^{3/2} = 2 \sqrt x \frac{ \sqrt {4 -x }}{ \sqrt{4} } +4 \arcsin \left( \frac {\sqrt x }{ 2} \right) + C \\ \frac{2}{3} y^{3/2} = \sqrt x \sqrt {4 -x } +4 \arcsin \left( \frac {\sqrt x }{ 2} \right) + C \\ y^{3/2} =\frac{3}{2} \left( \sqrt x \sqrt {4 -x } +4 \arcsin \left( \frac {\sqrt x }{ 2} \right) + C \right) \\ y^{3/2} = \left( \frac{3}{2} \sqrt x \sqrt {4 -x } + 6 \arcsin \left( \frac {\sqrt x }{ 2} \right) + \frac 3 2 C \right) \\ y = \left( \frac{3}{2} \sqrt x \sqrt {4 -x } + 6 \arcsin \left( \frac {\sqrt x }{ 2} \right) + C \right) ^{2/3}$$