Let $T:[0,1]^d \rightarrow [0,1]^d$
be a piecewise expanding linear map such that each domain of linearity is a coordinate-parallel hyperrectangle that T sends to $[0,1]^d$
. Let $\{\mathbf {r}_n\}$
be a sequence of vectors with $\mathbf {r}_n=(r_{n, 1}, \ldots , r_{n, d}) \in (\mathbb {R}_{\geq 0})^d$
. Let $m_d$
denote d-dimensional Lebesgue measure. Let $\{f_n\}$
be a sequence of piecewise Lipschitz coordinate-wise vector functions on $[0,1]^d$
with a uniform Lipschitz constant. For any given $\epsilon> 0$
, we obtain a unified counting function for the shrinking target and recurrence problems: $$ \begin{align*}\sum_{n=1}^N \mathbb{1}_{R(f_n(\mathbf{x}), \mathbf{r}_n)}(T^n \mathbf{x})=\Psi(N)+O(\Psi^{1 / 2}(N)(\log \Psi(N))^{3 / 2+\varepsilon})\end{align*} $$
for $m_d$
-almost every $\mathbf {x} \in [0,1]^d$
and for all $N\in \mathbb N$
, where $\Psi (N):=2^d \sum _{n=1}^N r_{n, 1} \cdots r_{n, d}$
and $R(f_n(\mathbf {x}), \mathbf {r}_n)$
is a coordinate-parallel hyperrectangle centred at $f_n(\mathbf {x})$
. Our result gives a unified statement to show that the quantitative dynamical Borel–Cantelli lemma can govern both the shrinking target and recurrence problems, thereby eliminating the need for separate treatments and different proofs. This result can also apply to the situation where both problems are present simultaneously along different directions in $[0,1]^d$
.