Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question
You can use the product rule for fractional differentiation. – Mhenni Benghorbal Aug 1 '12 at 14:04
How would I implement that for large k? – MarcF Aug 1 '12 at 14:08
@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. – Mhenni Benghorbal Aug 1 '12 at 15:22
@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'. – MarcF Aug 1 '12 at 15:40
@MarcF Are you sure that the derivative is not divided by a factorial? This series will grow $n$ quite quickly. – Sasha Aug 1 '12 at 17:02
up vote 3 down vote accepted

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

share|cite|improve this answer
Wow. It's amazing how such a complex expression becomes such an elegant sum. – nbubis Aug 1 '12 at 17:44
@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? – MarcF Aug 2 '12 at 17:48
@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. – Sasha Aug 2 '12 at 18:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.