PDF does not integrate to 1 - where is my mistake? I am trying to solve a question which gives me a random variable with the distribution function below
$$
F(x) = 1 - \left(\frac{\mu}{x}\right)^{2n}
$$
where $0 < \mu \le x < \infty$
I differentiate this to obtain the PDF
$$
f(x) = 2n \mu^{2n} x^{-2n-1}
$$
At this point, I notice that the integral over the PDF does not sum to 1
$$
\int_{-\infty}^\infty f(x) dx = \int_{-\infty}^\infty 2n \mu^{2n} x^{-2n-1} dx = 2n\mu^{2n} \left[ \frac{x^{-2n}}{-2n} \right]_{-\infty}^\infty = \mu^{2n} \left[ x^{-2n} \right]_{-\infty}^\infty = 0
$$
Have I gone wrong somewhere above? This is part of a bigger question but the CDF is stated in the question as above.

As pointed out in comments, the range of integration in your integral does not match the listed support of the random variable (which is $\mu \leqslant x < \infty$).  Start by correcting the expression for your density, with explicit statement of the support:
$$f(x) = \begin{cases}
\frac{2n}{\mu} \Big( \frac{\mu}{x} \Big)^{2n+1} & & & \text{for } x \geqslant \mu, \\[6pt]
0 & & & \text{otherwise}. \\[6pt]
\end{cases}$$
Now correct your integral:
$$\begin{align}
\int \limits_{-\infty}^\infty f(x) \ dx
&= \int \limits_{-\infty}^\mu 0 \ dx + \int \limits_{\mu}^\infty \frac{2n}{\mu} \Big( \frac{\mu}{x} \Big)^{2n+1} \ dx \\[6pt]
&= 2n \mu^{2n} \int \limits_{\mu}^\infty x^{-2n-1} \ dx \\[6pt]
&= 2n \mu^{2n} \bigg[ -\frac{x^{-2n}}{2n} \bigg]_{x = \mu}^{x \rightarrow \infty} \\[6pt]
&= 2n \mu^{2n} \bigg[ 0 - \Big( -\frac{\mu^{-2n}}{2n} \Big) \bigg] \\[6pt]
&= 2n \mu^{2n} \cdot \frac{\mu^{-2n}}{2n} \\[12pt]
&= 1. \\[6pt]
\end{align}$$
