calculating $\int_0^{\infty}\frac{1}{(x^2+y)^n}dx$ I would like to know if I solved this improper integral right:
$$\int_0^{\infty}\frac{1}{(x^2+y)^n}dx$$
for $y\gt 0$
My solution:
$$\int_0^{\infty}\frac{1}{(x^2+y)^n} \, dx=\lim_{M\rightarrow \infty}\int_0^M1\cdot\frac{1}{(x^2+y)^n} \, dx$$
now I used integration by parts:
$$\left[ \frac{x}{(x^2+y)^n} \right]_0^M-\int_0^M\frac{-2nx}{(x^2+y)^{n+1}} \, dx$$
what is inside the square brackets is $0$ so we get that the integral is:
$$\left[-\frac{1}{(x^2+y)^n}\right]_0^M=\frac 1 {y^n}$$
I'm not sure I could use integration by parts so that's is my main concern.
If I made a mistake please let me now.
edit: I know I made a mistake, what it the right way to solve?

By my essay, putting $a=y$ yields the result $$
\boxed{\int_{-\infty}^{\infty} \frac{d x}{\left(x^{2}+y\right)^{n+1}}=\frac{(2n-1)!!\pi}{2^{n} n !}y^{-\frac{2 n+1}{2}}}
$$
