I have come up with this expression for the standard deviation for a certain distribution:
$$\psi ^{(1)}(n+1)-\psi ^{(1)}(n+m+2)$$
where $n$ and $m$ are integers and $\psi^{(1)}(x)$ is a trigamma function.
For the software engineering project I am involved with calculation of the trigamma function causes technical problems. How this expression can be approximated by something easier to calculate for large $m$ and $n$?
One expression I arrived at is
$$ \frac{(n+1)^3 (m+1)}{(n+m+2)^4 (n+m+3)} $$
The way I've arrived there is quite convoluted, and the expression most definitely may not be optimal.
Perhaps there is a better approximation?
By Taylor, when $p$ is large $$\psi ^{(1)}(p)=\frac{1}{p}+\frac{1}{2 p^2}+\frac{1}{6 p^3}-\frac{1}{30 p^5}+\frac{1}{42 p^7}+O\left(\frac{1}{p^9}\right)$$ from wich the successive approximations
$$A_2=\frac{m+1}{2 (n+1)^2 (m+n+2)^2}P_2$$ with $$P_2=2 n^2+(2 m+8) n+(3 m+7)$$ and $$A_3=\frac{m+1}{6 (n+1)^3 (m+n+2)^3}P_3$$ with $$P_3=6 n^4+6(2 m+7) n^3+3 \left(2 m^2+19 m+36\right) n^2+$$ $$3 \left(5 m^2+29 m+40\right) n+\left(10 m^2+44 m+49\right)$$
Trying for $m=123$ and $n=456$ $$A_2=\color{red}{0.00046792}62719924$$ $$A_3=\color{red}{0.0004679271684}101$$
Without looking for such kind of expression, let $a=(n+1)$ and $b=(n+m+2)$ and use $$\psi ^{(1)}(a)-\psi ^{(1)}(b)=\left(\frac{1}{a}-\frac{1}{b}\right)+\frac 12\left(\frac{1}{a^2}-\frac{1}{b^2}\right)+\frac 16\left(\frac{1}{a^3}-\frac{1}{b^3}\right)+\cdots$$
Edit
If you want to make it more compact, switching from Taylor series to Padé approximant, you could use $$\psi ^{(1)}(p)\sim \frac{3 p (30 p+1)}{2 \left(45 p^3-21 p^2+3 p+2\right)}$$ whose error is $\sim\frac{1}{45 p^6}$.
For the worked case, the error would be $1.93\times 10^{-18}$.
Even better $$\psi ^{(1)}(p)\sim \frac{5 p \left(1302 p^2-573 p+697\right)}{6 \left(1085 p^4-1020 p^3+910 p^2-285 p+27\right)}$$ whose error is $\sim \frac{1}{74 p^8}$.