Everywhere I read online people use trig substitution to solve it, but I want to understand why in the world this isn't the right way of doing it?
$$ f(x) = \int(x^2+y^2)^{-3/2} dx $$
let: $$ u = x^2 + y^2; \space \frac{du}{dx} = 2x;\space dx = \frac{du}{2x} $$
$$ f(x) = \frac{1}{2x}\int u^ {-3/2}du $$
$$ f(x) = \frac{1}{2x}\left( -\frac{2}{u^{1/2}} \right) + C $$
$$ f(x) = \frac{1}{2x}\left( -\frac{2}{(x^2+y^2)^{1/2}} \right) + C $$
$$ f(x) = -\frac{1}{x(x^2+y^2)^{1/2}} + C $$
The answer given by integral calculators and various proofs using trig give a result of:
$$ f(x) = =\frac{x}{y^2(x^2+y^2)^{1/2}} + C $$
Why are they coming out to be completely different?
You can't sneak the "${1\over 2x}$" out of the integral: even though the variable of integration is $u$ instead of $x$, since $u$ depends on $x$ the $x$ is still "bound" into the integral.
It might make things clearer to consider an example you already understand well. Take $I=\int x^2dx$, and set $u=x^2$ (yes this is stupid, but do it anyways). Then $I=\int{1\over 2x}udu$. If we pull the "${1\over 2x}$" out, we would get $${1\over 2x}({u^2\over 2}+C)={x^4\over 4x}+{C\over 2x}={x^3\over 4}+{C\over 2x}$$ which is clearly incorrect; if we keep them together, and put everything in terms of $u$, we get $$\int{1\over 2u^{1\over 2}}udu={1\over 2}\int u^{1\over 2}du={1\over 2}({2\over 3}u^{3\over 2}+C)={1\over 3}x^3+C,$$ which is correct. (Note that I'm conflating $C$ with ${1\over 2}C$, there, but that's an okay abuse of notation since $C$ denotes an arbitrary constant.)