I want to solve $\dot x=\frac{x+\sqrt{t^2+x^2}}{t}$ with initial value $x(1)=0$.
My plan was to substitute and then use separation of variables but I think I am misunderstanding something about substitution:
Let's set $u:=x/t$. Then $$\frac{du}{dt}=\frac{du}{dx}\frac{dx}{dt}=\frac{1}{t}\frac{dx}{dt}.$$ So the equation $\dot x=\frac{x+\sqrt{t^2+x^2}}{t}$ should transform to $$t\frac{du}{dt}=u+\sqrt{1+u^2}.$$ By separation of variables I would now need to solve the integral $$\int\frac{du}{u+\sqrt{1+u^2}}$$ which doesn't seem right to me. Did something go wrong along the way?
This line is not correct $$\frac{du}{dt}=\frac{du}{dx}\frac{dx}{dt}=\frac{1}{t}\frac{dx}{dt}.$$ $x,t$ are functions of t so when you differentiate you get : $$u'=\frac {du}{dt}=\frac d{dt}\left(\frac {x(t)} t\right)= \frac{x't-x}{t^2} \implies x'=u't+u$$ Since you have u as a function of two functions of t $$u(t)=f(t)g(t) \implies u'(t)=f'g+fg'$$ where $f=x(t)$ and $g(t)=1/t$ $$\dot x=\frac{x+\sqrt{t^2+x^2}}{t}$$ $$ \implies u't+u=\frac{ut+\sqrt{t^2+t^2u^2}}{t}$$ $$ u't=\frac {|t|}t{\sqrt{1+u^2}}$$ It's separable $$ \int \frac {du}{\sqrt{1+u^2}}=\int \frac {dt}{|t|}$$ As @Dylan pointed out due to the initial condition $t$ being positive we can write $$ \int \frac {du}{\sqrt{1+u^2}}=\int \frac {dt}{t}$$