computing integral over units in p-adic integers I saw an integral in a paper and tried computing something similar, can anyone confirm the answer? 
Let $\nu$ be the valuation on $\mathbb{Q}_p$, $\mu$ the Haar measure on $\mathbb{Z}_p^{\times}$ and $\alpha \in \mathbb{Z}_p$ The integral I tried to compute and my obtained answer is $$-\int_{\mathbb{Z}_p^{\times}}\nu(x-\alpha)d\mu = 
\begin{cases}
0 & |\alpha|_p<1\\
-\frac{p}{(p-1)^2} & |\alpha|_p=1\\
-\nu(\alpha) & |\alpha|_p >1
\end{cases}$$
Here is a link to my work if you want to see it: my attempt
 A: For $a\in \mathbb{Z}_p^{\times}$
$$\int_{\mathbb{Z}_p^{\times}}v(x-a)dx=\int_{\mathbb{Z}_p^{\times}-a+p\mathbb{Z}_p}v(x-a)dx+\sum_{k\ge 1}\int_{a+p^k \mathbb{Z}_p-a+p^{k+1} \mathbb{Z}_p}v(x-a)dx$$
$$ = 0(1-\frac{1}{p-1})+\sum_{k\ge 1}k\frac{p^{1-k}-p^{-k}}{p-1}$$
For $a\in p\mathbb{Z}_p$, 
$$\int_{\mathbb{Z}_p^{\times}}v(x-a)dx=0$$
For $a\in \mathbb{Q}_p-\mathbb{Z}_p$, 
$$\int_{\mathbb{Z}_p^{\times}}v(x-a)dx=v(a)$$
Also usually we look at $$\int_{\mathbb{Z}_p^{\times}}|x-a|dx$$ not $\int_{\mathbb{Z}_p^{\times}}v(x-a)dx$
A: Disclaimer, I'm more comfortable with the normalization $\mu(\mathbb{Z}_p)=1$ So I'll work out the integral that way, so just simply divide by $1-p^{-1}$ in the end to get the same answer.
Since summations can be kind of burdensome and the absolute value is more common, I assume you will have seen this common integral before and use it to avoid the summation.
$$\frac{1-p^{-1}}{1-p^{-s-1}}  = \int_{\mathbb{Z}_p} |x|^s dx$$
Here's the main trick. Since $v(x-\alpha)$ is a power of $p^{-s}$ in the absolute value, we can differentiate it, then evaluate it at $s=0$. The upshot is we could arbitrarily differentiate and multiply by $p^{-s}$ repeatedly for any integral of the form $v(x-\alpha)^m |x-\alpha|^s$ if we wanted, but we don't today.
$$\int_{\mathbb{Z}_p^\times}v(x-\alpha)dx = \frac{\partial}{\partial (p^{-s})} \left.\int_{\mathbb{Z}_p^\times} |x-\alpha|^s dx\right|_{s=0} $$
That being said, for $|\alpha|<1$, $\int_{\mathbb{Z}_p^\times} |x-\alpha|^s dx = 1$ This has derivative $0$.
For $|\alpha|>1$, $\int_{\mathbb{Z}_p^\times} |x-\alpha|^s dx = |\alpha|^s (1-p^{-1})$ Differentiating wrt $p^{-s}$ gets us $v(\alpha)|\alpha/p|^s(1-p^{-1})$ Letting $s=0$ we have $v(\alpha)(1-p^{-1})$
The final case when $|\alpha|=1$ to avoid the summation (this trick is independent of using differentiation under the integral sign and could be used without it) I split the integral up using the fact that $\mathbb{Z}_p^\times = \mathbb{Z}_p - p \mathbb{Z}_p$ since in $\mathbb{Z}_p$, the integral is translation invariant and in $p\mathbb{Z}_p$ the $\alpha$ dominates by ultrametric inequality.
$$\int_{\mathbb{Z}_p^\times} |x-\alpha|^s dx = \int_{\mathbb{Z}_p} |x-\alpha|^s dx - \int_{p\mathbb{Z}_p} |x-\alpha|^s dx = \int_{\mathbb{Z}_p} |x|^s dx - \int_{p\mathbb{Z}_p} |\alpha|^s dx $$
$$ = \frac{1-p^{-1}}{1-p^{-s-1}} - |\alpha|^sp^{-1}$$
At this point we can throw away the last term since $|\alpha|^s=1$ is a constant, but I carry it along for the differentiation wrt $p^{-s}$ step anyway:
$$\frac{1-p^{-1}}{(1-p^{-s-1})^2}p^{-1} - v(\alpha)|\alpha/p|^sp^{-1}$$
Now letting $s=0$ and $|\alpha|=1$ we have exactly what we expect,
$$\frac{1}{p-1}= (1-p^{-1})\frac{p}{(p-1)^2}$$
