The distribution of the time elapsed before a random variable reaches a threshold value for the first time, called the first passage time (FPT) distribution, is a fundamental characteristic of stochastic processes. Here, by solving the standard macroscopic diffusion equation, we derive analytical expressions for the FPT distribution of a diffusing particle hitting a spherical object in two dimensions (2D) and three dimensions (3D) in the course of unrestricted diffusion in open space. In addition, we calculate, analytically, the angular dependence of the FPT, known as the hit distribution. The analytical results are also compared to simulations of the motions of a random walker on a discrete lattice. This topic could be of wide pedagogical interest because the FPT is important not only in physics but also in chemistry, biology, medicine, agriculture, engineering, and finance. Additionally, the central equations often appear in physics and engineering with only trivial variations, making the solution techniques widely applicable.
I. INTRODUCTION
First passage processes, which are concerned with a threshold being reached for the first time by a stochastic variable, are ubiquitous.^{1} The most well known example is a diffusing particle reaching a threshold position, but other examples include the formation of astronomical objects,^{2} chemical reactions,^{3} biological processes like neuron firing or moth mating,^{4–7} rupture,^{8} timing precision in intracellular events,^{9} random search,^{10–12} disease spreading,^{13} radiotherapy planning,^{14} economics and finance,^{15,16} psychology^{17} as well as reliability theory.^{18} A fundamental characteristic of such processes is the distribution of the time t elapsed before the threshold is reached for the first time, the socalled first passage (FPT) distribution $ \psi ( t )$. Analytical expressions are readily available in textbooks for $ \psi ( t )$ in onedimensional (1D) diffusion processes^{1,2} and widely used.^{19,20} However, the counterparts in higher dimensions, i.e., twodimensional (2D) and threedimensional (3D), seem not readily available in the physics literature. Arguably, these higherdimensional counterparts could be more useful, as the real world is rarely 1D, even under simplifications. Recent years have seen a growing interest in these topics and analytical expressions for $ \psi ( t )$, and its angular decomposition in higher dimensions is, therefore, in high demand. The calculation of $ \psi ( t )$ in higher dimensions is not extremely difficult and can be performed using techniques well known in heat conduction theory.^{21,22} However, despite an extensive literature search, we have not found a publication containing systematic and detailed accounts of the results and derivation. We present them here in order to make them more accessible to all who need them.
Our main results include the analytical expressions for the FPT and its angular dependence (i.e., the hitting location distribution) in 2D and 3D diffusion processes in open space. The geometry is shown in Fig. 1. The target considered here is a circle in the 2D case or a sphere in the 3D case. Such processes are typical in, for example, intracellular matter transport,^{6,23,24} e.g., the transport of proteins between the cell cytoplasm and the interior of nucleus, and the collection of photons arriving from outer space or the absorption of photons by the Chlorophyll antenna of the photosynthetic apparatus.^{25}
The remainder of this paper is organized as follows. In Sec. II, the standard diffusion equation is solved to establish $ \psi ( t )$ for diffusion processes in 2D and 3D. We also revisit the result for 1D. Our derivations follow a similar method to a closely related problem on heat conduction in a circular cylinder.^{22} In Sec. III, we derive the angular dependence of the FPT distribution and, therefore, obtain the hit distribution. The paper is concluded in Sec. IV. Two appendices are provided. In Appendix A, the inverse Laplace transform used for numerical calculations is discussed in detail to add to the pedagogical value of the paper. In Appendix B, simulations are conducted of random walkers moving on simple lattices in 2D and 3D. The analytical results are shown to be well reproduced by the simulations in the limit where the discrete nature of the lattices becomes irrelevant, thereby verifying the analytical results.
II. FIRST PASSAGE TIME DISTRIBUTION
A. Results for 2D
 Continuity at R = r gives$ A I n ( c r ) + B K n ( c r ) = C I n ( c r ) + D K n ( c r ) .$

In the limit $ R \u2192 \u221e , \u2009 I n ( c R )$ diverges, whereas $ K n ( c R )$ vanishes. By requiring $ P ( R , \theta , s )$ to vanish in this limit, one finds A = 0.
 Integrating Eq. (19) over a tiny section including R = r results in a discontinuity in the radial flux density, which reflects on the fact that the particle can diffuse either toward the target or away from it. Explicitly,$ P \u2032 n ( r + 0 + , s ) \u2212 P \u2032 n ( r \u2212 0 + , s ) = \u2212 1 / r .$Here, $ P \u2032 n ( R , s ) = \u2202 R P n ( R , s )$ and 0_{+} denotes the positive infinitesimal. Explicitly, this gives$ C I \u2032 n ( c r ) + D K \u2032 n ( c r ) \u2212 B K \u2032 n ( c r ) = 1 / r ,$
where the prime indicates the derivative to R.
 At the absorbing boundary at R = a, $ P n ( a , s ) = 0$, which yields$ C I n ( c a ) + D K n ( c a ) = 0.$
B. Results for 3D
III. HIT DISTRIBUTION
While we have so far been focused on the FPT $ \psi ( t )$, which only gives an angularly averaged picture of the FPT in 2D and 3D, the results obtained in Sec. II also allow us to get the distribution of the hitting location, which reveals the angular dependence (i.e., the hit distribution) of the FPT and, hence, may be more desirable in some applications. These aspects are discussed in this section, where it is shown that the target is hit by the particle mostly at the heading part of the surface at short times but gradually spread out over the whole surface.
In Figs. 2 and 3, we display the hit distribution $ \psi ( r , \theta , t )$ and the cumulative hit distribution $ \u222b 0 \theta d \theta \u2032 \u2009 \psi ( r , \theta \u2032 , t )$ (both normalized by the total FPT) for 2D and 3D, respectively. When calculating the cumulative hit distribution for 3D, we have used the formula that $ p l ( x ) = ( 1 / 2 l + 1 ) d / d x ( p l + 1 ( x ) \u2212 p l \u2212 1 ( x ) )$. For 2D, as seen on the left panel in Fig. 2, at short times, most particles hit the target near the shortest point, and the distribution is symmetric about θ = 0. As time goes by, particles start to hit the target from elsewhere, and the distribution gets spread out. Such trend is also exhibited in the cumulative distribution as shown on the right panel. For 3D, as shown in Fig. 3, at short times, most particles also hit the target near the closest point, but the distribution is not peaked at θ = 0. Rather, $ \psi ( r , \theta , t )$ vanishes at the pole θ = 0; this is so because the area of the ribbon is proportional to $ sin \u2009 ( \theta )$ [see the text above Eq. (48)] and so is the flux through it [see also Eq. (52)]. For the same reason, the hit distribution also vanishes at the other pole $ \theta = \pi $. This feature persists at all times. So, unlike the 2D case, $ \psi ( r , \theta , t )$ for 3D does not peak at θ = 0. Instead, as the time elapses, the position of the peak shifts from small θ toward the equator at $ \theta = \pi / 2$. Eventually, the peak dwells at the equator. This is so because at long times, the flux density becomes evenly distributed over the entire target, and the hit distribution is solely determined by the ribbon area, which maximizes at the equator.
IV. CONCLUSIONS
To summarize, we have derived analytical expressions for the FPT distribution of a symmetric target (circle or sphere) being hit by a diffusing particle in 2D and 3D and the corresponding hitting location distribution as well. Our results were derived with the particle released outside the target region. However, it is easy to derive the results with the particle released inside the region by the same method. We shall present these results elsewhere in connection with first passage phenomena subjected to resetting, a topic that has attracted lots of attention in recent years.^{11,27}
ACKNOWLEDGMENTS
The authors thank A. E. Lindsay and A. J. Bernoff for some help with the calculations. The support of the Supercomputing Wales project, which is partfunded by the European Regional Development Fund via Welsh Government, is gratefully acknowledged. The work was developed out of an undergraduate project by A. Clarkson with H.Y. Deng.
AUTHOR DECLARATIONS
Conflict of Interest
The authors have no conflicts of interest to declare.
DATA AVAILABILITY
The data and codes that support the findings of this study are available from the corresponding author upon reasonable request.
APPENDIX A: INVERSE LAPLACE TRANSFORM (ILT) OF EQUATIONS (11) AND (27)

C_{1}: the line $ s \u2208 [ c \u2212 i R , c + i R ]$ for some large value of R.

C_{2}: the circular arc of radius R from the top of C_{1} to just above the negative real axis, plus the top straight segment joining the arc to C_{1}.

C_{3}: the line just above the negative real axis between $ [ \u2212 R , \u2212 \u03f5 ]$ for some small ϵ.

C_{4}: the circular arc of radius ϵ about the origin.

C_{5}: the line just below the negative real axis between $ [ \u2212 \u03f5 , \u2212 R ]$.

C_{6}: the circular arc of radius R from just below the negative real axis to the bottom of C_{1}, plus the bottom straight segment joining the arc to C_{1}.
APPENDIX B: NUMERICAL SIMULATIONS
Here, we perform numerical simulations to verify the analytical results obtained in the main text. We simulate the motion of a random walker on a simple lattice (square for 2D and cubic for 3D) with lattice constant b. Let p be the probability that the walker moves to a neighboring site in a step, and, thus, $ 1 \u2212 p$ is the probability it stays on the site where it currently resides. Let τ be the time interval for a step. One may define $ \nu = ( p / 2 d ) ( 1 / \tau )$ as the attempt rate for the walker to hop to an adjacent site. Note that 2d is the coordinate number for the lattice. For $ \nu \tau \u226a 1$ and b smaller than any other lengths in the system (i.e., the continuum limit), the behaviors of the random walker are expected to be the same as a diffusing particle with diffusion constant $ D = \nu b 2$.
In Figs. 6–8, we display the results for 1D, 2D, and 3D, respectively. Here, time t corresponds to the number of steps. The agreement between the analytical result, Eq. (12), and the simulation is very good even for parameters for which the analytical results were not intended (see the curve with $ r \u2212 a = 5 b$ in Fig. 6). In 2D and 3D, the agreement is still very good for all parameters at long t, but there is an obvious discrepancy at short t for r and a comparable to b. Increasing r and a improves the agreement, as is clear from Figs. 7 and 8. We have performed discretetime random walks with $ p \u226a 1$ to average out disparity between odd and even sites. Alternatively, one can study values averaged over odd and even time steps or perform continuoustime random walks, and similar results are expected.
We are aware that the scripts for the simulations are likely to be of interest to college education.