Electron position in H atom

For the ground state of Hydrogen please find the most probable value of  the electron position $r$.

The probability that the electron is found between $r$ and $r+dr$ is

$P=|R_{nl} (r) |^2*r^2 dr$

Here above $R_{nl} (r)$ is the radial function for hydrogen in the n, l state and $r^2*dr$ comes from the volume element written in spherical coordinates $dV=r^2*dr*sinθdθ*dφ$

For the ground state $n=1$ and $l=0$ so that

$R_{01} (r)=2*(1/a)^(3/2)*exp⁡(-r/a)$   where $a$ is the Bohr radius

The most probable value for r is

$4/a^3 *∫_0^a exp⁡(-2r/a) *r^2*dr=4/a^3 *0.081$

Also find the value of $<r^2>$ and $<x^2>$ for the Hydrogen state 3d ($n=3, l=2, m=2$)

For $n=3$, $l=2$ and $m=2$ the wavefunction of the electron in Hydrogen atom is

$ψ_{322}=R_{32} (r)*Y_2^2 (θ,φ)$  with $R_{32} (r)=(2√2)/(27√5) (Z/3a)^{(3/2)}*(Zr/a)^2*exp⁡(-Zr/3a)$

where $a$ is the Bohr radius. The element of volume in spherical coordinates is

$dV=r^2 dr*sinθdθ*dφ$

The expectation value for $<r^2>$ is $(Z=1)$

$<r^2>=∭ ψ_{322}^* r^2 ψ_{322}*dV=∫_0^a r^2*R_{32}^2*r^2 dr*∬ (Y_2^2)^* (Y_2^2)*dΩ=$

$=∫_0^a r^4*R_{32}^2*dr$

$<r^2>=8/3645*1/(27a^7 )*∫_0^a r^8*exp⁡(-2r/3a)dr=$

$=8/(98415a^7 )*((6200145a^9)/4-12076233*e^(-2/3)*a^9/4)$

$<r^2>=4.9662*10^{(-6)}*a^2$

To find the expectation value of $<x^2>$ one needs also to know the shape of the angular functions

$Y_2^2=√(15/32π)*exp⁡(2iφ)*sin^2⁡θ$

So if $x^2=r^2*sin^2⁡ θ*cos^2⁡φ$ one has :

$<x^2>=∫_0^a r^2*R_32^2*r^2 dr*(15/32π ∫_0^π sin^2⁡ θ*sin^4⁡ θ*sinθdθ*∫_0^2π cos^2⁡ φ*dφ)$

because $exp⁡(2iφ)*exp⁡(-2iφ)=1$

One has $∫_0^a sin^7⁡θ dθ=32/35$    and $∫_0^2π cos^2⁡ φ*dφ=π$

$<x^2>=4.9662*10^{(-6)}*a^2*15/32π*32/35*π=3/7*4.9662*10^{(-6)}*a^2=$

$=2.128*10^{(-6)}*a^2$

All integrals have been computed online using mathematica.