Solving $\frac{dx}{dt}=\frac{xt}{x^2+t^2},\ x(0)=1$ I have started self-studying differential equations and I have come across the following initial value problem
$$\frac{dx}{dt}=\frac{xt}{x^2+t^2}, \quad x(0)=1$$
Now, since $f(t,x)=\frac{xt}{x^2+t^2}$ is such that $f(rt,rx)=f(t,x)$ for every $r\in\mathbb{R}\setminus\{0\}$, we can use the change of variables $y=\frac{x}{t}$ to rewrite it in the form
\begin{align}
y+t\frac{dy}{dt} &=\frac{t^2 y}{t^2(1+y^2)} \\
&=\frac{y}{1+y^2} \\
\implies t\frac{dy}{dt} &=\frac{y}{1+y^2}-y \\
&=-\frac{y^3}{1+y^2} \\
\implies \frac{dy}{dt} &= \left(-\frac{y^3}{1+y^2}\right)\cdot\frac{1}{t}
\end{align}
which is separable, and becomes:
\begin{align}
\left(\frac{1+y^2}{y^3}\right)dy &= -\frac{dt}{t} \\
\implies \int_{y_1}^{y_2} \left(\frac{1+y^2}{y^3}\right) dy &= -\int_{t_1}^{t_2} \frac{dt}{t} \\
\implies -\frac{1}{2y_2^2}+\ln \left\lvert \frac{y_2}{y_1} \right\rvert + \frac{1}{2y_1^2} &= -\ln \left\lvert \frac{t_2}{t_1} \right\rvert
\end{align}
but now I don't see how to go forward and find $y(t)$. Also, I integrated from a generic time $t_1$ to a generic time $t_2$ because the right hand side wouldn't have converged otherwise.
So, I would appreciate any hint about how to go forward in solving this IVP.
Thanks

With homogeneous equations, you have two choices for the substitution.
Here we have
$$(x^2+t^2)\,dx=xt\,dt  $$
You made the substitution $x=yt$, but you also had the choice of letting $t=ux$. As a general rule, the substitution which makes the algebraic simplification easier also makes the integration easier. So lets investigate the substitution $t=ux$
\begin{eqnarray}
(x^2+u^2x^2)\,dx&=&ux^2(udx+xdu)\\
x^2\,dx&=&ux^3\,du\\
\frac{1}{x}\,dx&=&u\,du\\
\ln|x|+c_1&=&\frac{u^2}{2}\\
\ln x^2+c_2&=&\frac{t^2}{x^2}\\
t^2&=&x^2(\ln x^2+c_2)
\end{eqnarray}
The initial condition then gives $c_2=0$. So
$$ t^2=x^2\ln x^2 $$
