1
$\begingroup$

As part of a larger physical model I am currently searching for a solution to the following expression, a numerical solution is fine as I am ultimately really after the numerical result. $\alpha$ is a physical value and I need solutions for upto $n = 200000$

$$ \sum\limits_{k=0}^{n}\frac{1}{2k+1} \lim_{\sigma \to 0} \frac{d^{2k}}{d\sigma^{2k}} \left(\exp(0.5[\alpha-\sigma]^2) . \mathrm{erfc}([\alpha-\sigma]/\sqrt2) \right), \alpha \in R $$

$\mathrm{erfc}$ is the complementary error function.

Obviously an iterative solution would be best as it allows to find solutions for all $n$ in one run.

  • 0
    You can use the product rule for fractional differentiation.2012-08-01
  • 0
    How would I implement that for large k?2012-08-01
  • 0
    @MarcF - what's the value of alpha? if alpha is very large / small, then perhaps we can use some approximation. Also, aren't you missing a minus in the exponent?2012-08-01
  • 0
    @nbubis - I believe the sign on the exponent is correct. Alpha goes from approx 0.01 to 20.2012-08-01
  • 1
    @MarcF:In this problem you are asking for integer order derivative of the product of two functions. I can give a formula for your 2k-th derivative, but it is going to be in terms of the Meijer G function.2012-08-01
  • 1
    @MhenniBenghorbal - I'm happy with any solution that can realistically be implemented in C# to get at the numerical result 'in a sensible period of time'.2012-08-01
  • 1
    @MarcF Are you sure that the derivative is not divided by a factorial? This series will grow $n$ quite quickly.2012-08-01

1 Answers 1

3

The function $f(\alpha-\sigma) = \exp\left(\frac{1}{2}\left(\alpha-\sigma\right)^2\right) \operatorname{erfc}\left(\frac{\alpha-\sigma}{\sqrt{2}}\right)$ is a particular case of Hermite function $H_\nu\left(x\right)$, namely $f(x) = H_{-1}\left(\frac{x}{\sqrt{2}}\right)$. It's symbolic order derivative is known in closed form: $$ \frac{d^n}{dx^n} H_\nu\left(x\right) = (-2)^n (-\nu)_n H_{\nu-n}\left(x\right) $$ where $(a)_n$ is the Pochhammer symbol. Thus $$ \lim_{\sigma\to 0}\frac{d^{2k}}{d \sigma^{2k}} f(\alpha-\sigma) = \frac{d^{2k}}{d \alpha^{2k}} f(\alpha) = 2^k (2k)! H_{-2k-1}\left(\frac{\alpha}{\sqrt{2}}\right) $$ The expression you are after, i.e. $$ S_n = \sum_{k=0}^n \frac{2^k (2k)!}{2 k+1} H_{-2k-1}\left(\frac{\alpha}{\sqrt{2}}\right) $$ satisfies a recurrence equation (found with Mathematica): $$ \left(5 \alpha ^2+2 n \left(\alpha ^2+4 n (n+6)+52\right)+81\right) S_{n+1}+\left(-5 \alpha ^2-2 n \left(\alpha ^2+4 n+20\right)-52\right) S_{n+2}-2 (n+2) (2 n+3)^2 S_n+(2 n+7) S_{n+3}=0 $$ with self-evident initial conditions. The recurrence equation can be a basis for an efficient implementation: enter image description here

  • 0
    Wow. It's amazing how such a complex expression becomes such an elegant sum.2012-08-01
  • 0
    @Sasha - Many thanks for your solution. I've been working through it but am getting slightly different results using your version. On the second line, starting "function Hv(x), namely" you give f(x)=H-1(x/Sqrt(2)). I seem to find that f(x)= (2/Sqrt(Pi)) * H-1(x/Sqrt(2)). What are the consequences of this on the solution?2012-08-02
  • 0
    @MarcF Apologies for the typo. It does not affect the recurrence equation, only the initial conditions, which need to be multiplied with the factor `2/Sqrt[Pi]` each.2012-08-02