Difficult Homogeneous Differential Equation Solve the differential equation:
$$\frac{dy}{dx}=\frac{\sqrt{x^2+3xy+4y^2}}{x+2y}$$
I tried to solve it by putting $t=x+2y$ but that lead to a very complicated integral. The hint given is that equation is reducible to homogeneous form.
 A: I suppose a typo and that the problem is $$\frac{dy}{dx}=\frac{\sqrt{x^2+\color{red}{4}xy+4y^2}}{x+2y}$$ Doing the same steps as in NAC's answer, we get $$\frac{dx}x=\frac {du}{1-u}$$ taht is to say
$$\log(x)+C=-\log(1-u)$$
A: Partial answer :
Reformulate it as $$\frac{dy}{dx} = \frac{\sqrt{1+3\frac{y}{x}+4\left(\frac{y}{x}\right)^2}}{1+2\frac{y}{x}}$$
The you have $dy/dx = f(y/x)$.
Let $u(x) = \frac{y(x)}{x}$. Then $xu = y$. Then $dy = xdu + udx$. Then $dy/dx = xdu/dx + u$. Then you have
$$x\frac{du}{dx}+u = f(u)\quad \text{where} \quad f(u) = \frac{\sqrt{1+3u+4u^2}}{1+2u}$$
Then $x\frac{du}{dx} = f(u)-u$. Then
$$\int \frac{du}{f(u)-u} = \int\frac{dx}{x}$$
i.e.
$$\int \frac{1+2u}{\sqrt{4u^2+3u+1}-u-2u^2} = \int\frac{dx}{x}$$
So this must be solved (to get further from here). It'd give you $u(x)$ as a function of $x$ and from there you get $y(x)$ using $y(x)=x u(x)$. Here's a beginning :
$$\frac{1+2u}{\sqrt{4u^2+3u+1}-(u+2u^2)} = \frac{(1+2u)(\sqrt{4u^2+3u+1}+u+2u^2)}{4u^2+3u+1-(u+2u^2)^2}
\\ = -\frac{(1+2u)(\sqrt{4u^2+3u+1}+u+2u^2)}{4u^4 + 4u^3 - 3u^2 - 3u -1}
\\ = -\frac{(\sqrt{4u^2+3u+1}+u+2u^2)}{2u^3 + 2u^2 - 2u - \frac{u+1}{2u+1}}
\\ = \text{ugly...}$$
Then : either goto Claude Leibovici's highly plausible answer or please post yours if you know how to solve this.
A: The integral that Noé AC derived is expressible in terms of elementary functions although it is highly messy. Integration of any rational function $R(u,\sqrt{P_2(u)})$, where $P_2$ is a quadratic, can be reduced to the integration of a rational function.
The first step is the reduction to a rational function of $\sin\theta$ and $\cos\theta$. In order to do this we take the integral
$$
\int \frac{1+2u}{\sqrt{4 u^2 + 3 u + 1} - u - 2u^2} du
$$
and make the trig substitution $ 2 u + \frac34 = \frac{\sqrt{7}}{4}\tan\theta$. This leads to an integrand that is a rational function of $\sin\theta$ and $\cos\theta$. I got something like
$$
\int \frac{2\sqrt{7}\left(\cos\theta + \sqrt{7} \sin\theta\right)}{3 \cos^3\theta + 8 \sqrt{7} \cos^2\theta + 2 \sqrt{7} \sin\theta \cos^2\theta - 7 \sin^2\theta \cos\theta} d\theta
$$
The integral of any rational function of $\sin\theta$ and $\cos\theta$ can be converted to the integral of a rational function of $t$ through the change of variables $ t = \tan(\frac{\theta}{2});d\theta =  \frac{2dt}{1+t^2}; \sin\theta=\frac{2t}{1+t^2}; \cos\theta=\frac{1-t^2}{1+t^2}$. This leads to the integration of a rational function of $t$. I get that the resulting integral is
$$
\int -\frac{16 \left(t^2+1\right)\left(t^2-2 \sqrt{7} t-1\right)}{\left(t^2-1\right)
   \left(\left(8 \sqrt{7}-3\right) t^4+4 \sqrt{7} t^3+34 t^2-4 \sqrt{7} t-8
   \sqrt{7}-3\right)}dt
$$
This integral is in principle doable with partial fractions, although the roots of the quartic don't seem to be anything nice. I stopped here because it did not seem pointful to me to do the partial fractions with numerical approximations for the roots.
Although this is ultimately expressible in terms of elementary functions I strongly suspect that there was a typo in this problem.
