problem in $p$-adic integration I am working on the $p$-adic integration and I am trying to find how to integrate
$$\int_{\mathbb{Z}_p^2}||x,y||_p^sd\mu (x,y),$$
where $d\mu$ is the haar measure and $||x,y||_p^s=\sup\{|x|_p^s,|y|_p^s\}$. I believe it should be done by performing a change of variables according to whether $|x|_p^s\leq |y|_p^s$ or $|x|_p^s>|y|_p^s$.
 A: $$\int_{\Bbb{Z}_p}\int_{\Bbb{Z}_p} \max(|x|_p^s,|y|_p^s) d\mu(x)d\mu(y)$$
$$=\int_{\Bbb{Z}_p} (\int_{p^{v_p(x)} \Bbb{Z}_p} |x|_p^s  d\mu(y) +\int_{\Bbb{Z}_p} |y|_p^s  d\mu(y)-\int_{p^{v_p(x)}\Bbb{Z}_p} |y|_p^s  d\mu(y)) d\mu(x)$$
$$ = \int_{\Bbb{Z}_p} (|x|_p^s p^{-v_p(x)} + \sum_{k=0}^{v_p(x)-1} (p^{-k}-p^{-k-1}) p^{-s v_p(x)})d\mu(x)$$
$$ = \sum_{m=0}^\infty ( p^{-s m} p^{-m} + \sum_{k=0}^{m-1} (p^{-k}-p^{-k-1}) p^{-s m})(p^{-m}-p^{-m-1})$$
A: the other answer has one tiny mistake, on line 3 there's a $p^{-sv_p(x)}$ when it should be a $p^{-sk}$ as it came from $|y|_p^s$.
Here I'd like to share an alternative method altogether which comes to the same answer, and I'll use just slightly relaxed but suggestive notation.
$$\int_{\mathbb{Z}_p^2} \max(|x|, |y|)^s dxdy$$
Since $\mathbb{Z}_p$ is made up of this disjoint union of sets of all equal measure, $$\mathbb{Z}_p = \bigcup_{a=0}^{p-1} a + p\mathbb{Z}_p$$
$$\sum_{a=0}^{p-1}\sum_{b=0}^{p-1}\int_{(a+p\mathbb{Z}_p)\times(b+p\mathbb{Z}_p)} \max(|x|, |y|)^s dxdy$$
You can then substitute in for each integral, $x=a+px'$ and $y=b+py'$ (and as a heuristic imagine $dx=|p|dx'$ and $dy=|p|dy'$)
$$\frac{1}{p^2}\sum_{a=0}^{p-1}\sum_{b=0}^{p-1}\int_{\mathbb{Z}_p^2} \max(|a+px|, |b+py|)^s dxdy$$
The only case where the max is not 1 is when both $a$ and $b$ are 0.
$$\frac{1}{p^2}(p^2 -1) + \frac{1}{p^2}\int_{\mathbb{Z}_p^2} \max(|px|, |py|)^s dxdy$$
$$1-p^{-2} + p^{-s-2}\int_{\mathbb{Z}_p^2} \max(|x|, |y|)^s dxdy$$
This is the original integral, so by "the snake cutting off its own tail" idea we can solve for it by algebra, call it J:
$$J = 1-p^{-2} + p^{-s-2}J$$
$$J - p^{-s-2}J = 1-p^{-2}$$
$$J = \frac{1-p^{-2}}{1-p^{-s-2}}$$
A: The method I used was changing variables. 
$$\int_{\mathbb{Z}_p^2} ||x,y||_p^sd\mu(x,y)=\int_A |x|_p^sd\mu(x,y)+\int_B|y|_p^sd\mu(x,y),$$
where $A=\{(x,y)\in\mathbb{Z}_p^2:|x|_p^s>|y|_p^s\}$ and $B=\{(x,y)\in\mathbb{Z}_p^2:|x|_p^s\leq|y|_p^s\}$. Now consider two bianalytic functions $g_1:(x,y)\to(x,xy)$ and $g_2:(x,y)\to(xy,y)$. Then
$$\int_{g_1(A)}|f(g_1)|_p^s\cdot|\det(\partial g_1)|_pd\mu(x,y)+\int_{g_2(B)}|f(g_2)|_p^s\cdot|\det(\partial g_2)|_pd\mu(x,y)\\ =\int_{p\mathbb{Z}_p}\int_{\mathbb{Z}_p}|x|_p^{s+1}dxdy+\int_{\mathbb{Z}_p}\int_{\mathbb{Z}_p}|y|_p^{s+1}dydx \\  = p^{-1}\int_{\mathbb{Z}_p}|x|_p^{s+1}dx+\int_{\mathbb{Z}_p}|y|_p^{s+1}dy\\ =\frac{1-p^{-1}}{1-p^{-s-2}}+\frac{p^{-1}-p^{-2}}{1-p^{-s-2}}=\frac{1-p^{-2}}{1-p^{-s-2}}.$$
For the other problem
$$\int_{\mathbb{Z}_p^2}|y|^{a_0}||x,y||^{a_1}d\mu(x,y)$$
 I used same method and same bianalytic functions and I obtained
$$\int_{\mathbb{Z}_p}|x|^{a_0+a_1+1}dx\int_{p\mathbb{Z}_p}|y|^{a_0}dy+\int_{\mathbb{Z}_p}\int_{\mathbb{Z}_p}|y|^{a_0+a_1+1}dydx\\ = \frac{1-p^{-1}}{1-p^{-a_0-a_1-2}}(\frac{p^{-a_0-1}-p^{-a_0-2}}{1-p^{-a_0-1}}+1) = \frac{1-p^{-1}}{1-p^{-a_0-a_1-2}}\frac{1-p^{-a_0-2}}{1-p^{-a_0-1}}.$$
