Finding Streamlines: How to solve this ODE? Is there a easier way? I was given the velocity vector field $\mathbf{\vec{v}}(x, y, z)$ and was asked to find the streamlines $\mathbf{\vec{r}}(t)$ in my exam:
$$\mathbf{\vec{v}}(x, y, z) = -\dfrac yx \hat i + 4x \hat j + 0 \hat k$$
This is what I did:
$$z(t) = \int 0 dt = C_1$$
$$\dfrac{dx}{dt} = -\dfrac {y(t)}{x(t)};\; \dfrac{dy}{dt} = 4x(t)$$
But these two equations are coupled. So, I tried to decouple them like this:
$$y = -x\dfrac{dx}{dt}$$
$$\implies \dfrac{dy}{dt} = -\left(\frac{dx}{dt}\right)^2 - x\dfrac{d^2x}{dt^2}$$
$$\implies x\dfrac{d^2x}{dt^2} + \left(\frac{dx}{dt}\right)^2 + 4x = 0$$
Now, what do I do? Is there a easier way?

setting $$u(x)=\frac{dx(t)}{dt}$$
so we get $$4x+u(x)^2+x\frac{du(x)}{dx}u(x)=0$$ or
$$x\frac{du(x)}{dx}u(x)+u(x)^2=-4x$$
and we substitute $$u(x)=v(x)^2$$ with $$\frac{du(x)}{dx}=2v(x)\frac{dv(x)}{dx}$$
and we get
$$\frac{dv(x)}{dx}+2\frac{v(x)}{x}=-8$$ with the integrating factorn $$\mu(x)=x^2$$
$$x^2\frac{dv(x)}{dx}+2xv(x)=-8x^2$$
and we have $$\int \frac{d}{dx}(x^2v(x))dx=\int -8x^2dx$$
and we get $$x^2v(x)=-\frac{8}{3}x^3+C_1$$
i think now it is right!
