Attempting to calculate $\displaystyle \int{\dfrac{1}{\sqrt{x^2+y^2}}\mathrm dx}$, $$\int{\dfrac{1}{\sqrt{x^2+y^2}}\mathrm dx}=\int{\frac{1}{\sqrt{(y\tan\theta)^2+y^2}}y\sec^2\theta \mathrm d\theta}=\int{\sec\theta d\theta}=\ln(\sec\theta +\tan\theta)=\ln\left(\sqrt{\left(\frac{x}{y}\right)^2+1}+\frac{x}{y}\right)=\ln\left(\frac{1}{x}\left(\sqrt{x^2+y^2}+x\right)\right),$$ where $x=y\tan\theta$
However Wolfram Integrator somehow returns $$\ln\left(2\left(\sqrt{x^2+y^2}+x\right)\right)$$ as the answer. Where did I go wrong? Many thanks.