How can I solve this integral with complex number? $n$ here is a complex number such that $n=n_r+in_i$
How can I solve this integral?
$$\int_{0}^{\infty}\frac{x^4}{|x^2-n^2|^2} d x=? $$

Let's change the notation to a more friendly one: $\;n:= a+bi\;$ , so:
$$x^2-n^2=x^2-(a^2-b^2+(2abi))=(x^2-a^2+b^2)-2abi\implies$$
$$|x^2-n^2|^2=(x^2-a^2+b^2)^2+4a^2b^2$$
Thus your integral is
$$\int_0^\infty\frac{x^4}{(x^2-a^2+b^2)^2+4a^2b^2}dx\stackrel{M=\max\{a,b\}}\ge\frac14\int_M^\infty\frac{x^4}{x^4+M^4}dx=$$
$$=\frac14\int_M^\infty\left(1-\frac{x^4}{x^4+M^4}\right)dx$$
and this last integral diverges.
