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
 A: 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 $$
A: You got that
$$\dfrac{1+y^2}{y^3}dy=-\frac{1}{t}dt$$
This implies that, putting $y'(t)=\frac{dy(t)}{dt}$,
$$\dfrac{1+y(t)^2}{y(t)^3}y'(t)=-\frac{1}{t}$$
where this equality is as functions of $t$. In particular, since they are the same function, both sides of the equality must have the same primitive, ie
$$\int \dfrac{1+y(t)^2}{y(t)^3}y'(t) dt=\int -\frac{1}{t} dt$$
(but not a definite integral!)
On the left side, you can distribute the denominator and get that $$\int \dfrac{1+y(t)^2}{y(t)^3}y'(t) dt=-\frac{1}{2}y^{-2}(t)+\ln(|y(t)|)+C$$
And the right side remains $$\int -\frac{1}{t} dt=-\ln(t)+C$$
Therefore the solution satisfies the implicit equation $$-\frac{1}{2}y^{-2}(t)+\ln(|y(t)|)=-\ln(t)+C$$
The problem is that the initial data is at $t=0$ where this equality is not defined. Note that the substitution $x=ty$ is not valid for the initial data you have because $1\neq x(0)=0\cdot y =0 $
A: $$\frac{dx}{dt}=\frac{xt}{x^2+t^2},\ x(0)=1$$
Multiply by $2x$:
$$2x{dx}=\frac{2x^2t}{x^2+t^2}dt$$
$${dx^2}=\frac{x^2}{x^2+t^2}dt^2$$
Substitute $u=x^2,v=t^2$:
$${du}=\frac{udv}{u+v}$$
This is a first order linear DE $uv'=u+v$ that you can also solv as this:
$$u{du}={udv}-vdu$$
$$\dfrac {du}u=\dfrac {udv-vdu}{u^2}$$
$$\dfrac {du}u=d \left (\dfrac       {v}{u}\right)$$
Integrate:
$$\ln u=\dfrac {v}{u}+C$$
$$\ln x^2= \dfrac{t^2}{x^2}+C$$
Apply initial condition.
$$x(0)=1  \implies C=0$$
$$\ln x^2= \dfrac{t^2}{x^2}$$
