I have a function that I want to study it's asymptotic behavior.

The function is

$$ f(k) = - \frac{k^2}{4} - \frac{\log\pi}{2} + \log\left( \frac12 \left| \mathrm{Erfi}(\frac{k}{2} - \pi i) - \mathrm{Erfi}(\frac{k}{2} + \pi i)\right|\right) $$

and k takes only positive integer.

The plot of this function looks like:

ListPlot[Table[f[k], {k, 0, 100}], PlotRange -> All]

enter image description here

It looks like that the function has a asymptotic behavior (looks like ~ Log[k]), could we find a way to extract the main term (the coefficient of the Log[k] if behave like log)?

From here and here, I find the mainTerm function, but it seems to have ignored the big Log term and not work in this case:

mainTerm[f[k], k]
(* -(k^2/4) *)

migrated from mathematica.stackexchange.com May 7 '14 at 23:00

This question came from our site for users of Wolfram Mathematica.

  • 1
    $\begingroup$ Normal@Series[f[k], {k, \[Infinity], 3}] $\endgroup$ – Sektor May 7 '14 at 5:27
  • $\begingroup$ possible duplicate of Growth of functions $\endgroup$ – Sektor May 7 '14 at 5:28
  • $\begingroup$ @Sektor I guess I don't understand what's the point to expand it to the third order, are you saying that it's divergent? Also after reading the post you linked, I still can't figure out the answer to my question. I'm looking for an expression that can match the function f at large k. $\endgroup$ – xslittlegrass May 7 '14 at 6:40
  • $\begingroup$ While not a complete Mathematica answer, it looks like -2 Log[k]. Sektor has given you the right start, but you will also need to help Mathematica a bit as well. $\endgroup$ – chuy May 7 '14 at 14:44
  • $\begingroup$ @chuy I still don't quiet understand. Could you say more of what I need to help Mathematica to do? $\endgroup$ – xslittlegrass May 7 '14 at 15:07

This is more of a Mathematica answer than a Mathematics answer. As george indicated we can write

$$ f(k) = \frac{1}{4}\log\left\{ \frac{\exp(-k^2)}{(2\pi)^2} \operatorname{Re}\left[\operatorname{erf}\left(\frac{ik}{2}-\pi\right)\right]^4\right\} + \frac{\log 2}{2}. $$

(Note the constant term $\log 2/2$ which was missing from george's answer.) The question really comes down to estimating $\operatorname{Re}\left[\operatorname{erf}\left(\frac{ik}{2}-\pi\right)\right]$ as $k \to \infty$.

In Mathematica we enter

Series[Erf[I k/2 - Pi], {k, \[Infinity], 2}]

which yields

$$ i^{2 \text{Floor}\left[\frac{\text{Arg}\left[-i k \pi +\pi ^2\right]}{2 \pi }\right]}+e^{\frac{k^2}{4}+i k \pi } \left(\frac{2 i e^{-\pi ^2}}{\sqrt{\pi } k}+\frac{4 e^{-\pi ^2} \sqrt{\pi }}{k^2}+O\left[\frac{1}{k}\right]^3\right). $$

The reason we expand to second order is that we know $k$ will be an integer and hence $e^{ik\pi} = \pm 1$. So, when we take the real part, the first term in the parentheses, being purely imaginary, will disappear.

We continue with

Re[% // Normal] // ComplexExpand

which yields

$$ \frac{4 e^{\frac{k^2}{4}-\pi ^2} \sqrt{\pi } \text{Cos}[k \pi ]}{k^2}+\text{Cos}\left[\pi \text{Floor}\left[\frac{\text{Arg}\left[-i k \pi +\pi ^2\right]}{2 \pi }\right]\right]-\frac{2 e^{\frac{k^2}{4}-\pi ^2} \text{Sin}[k \pi ]}{k \sqrt{\pi }}. $$

Now the second term is $O(1)$ which is much smaller than the first term and the third term is zero since $\sin(k\pi) = 0$, so to find the leading order we'll just take the first term.

The argument in the $\log$ term in $f$ is then, to first order,

E^(-k^2)/(2 Pi)^2 ((4 E^(k^2/4 - \[Pi]^2) Sqrt[\[Pi]] Cos[k \[Pi]])/k^2)^4

$$ \frac{64 e^{-4 \pi ^2} \text{Cos}[k \pi ]^4}{k^8}. $$

Of course $\cos(k\pi)^4 = 1$ so we conclude that

$$ f(k) \approx \frac{1}{4} \log\left(\frac{64 e^{-4 \pi ^2}}{k^8}\right) + \frac{\log 2}{2}. $$

To simplify this a little we could use

Simplify[Log[(64 E^(-4 \[Pi]^2))/k^8]/4 + Log[2]/2, Assumptions -> k > 0]

to get

$$ f(k) \approx -2\log k - \pi^2 + \log 4. $$

Here's a plot of this approximation in red versus the numerical points in blue.

enter image description here

  • $\begingroup$ Thanks a lot, but how do you determine that "the second term is $O(1)$"? $\endgroup$ – xslittlegrass May 14 '14 at 19:11
  • $\begingroup$ You're welcome. It's $\cos$ of something real, and $-1 \leq \cos(x) \leq 1$. $\endgroup$ – Antonio Vargas May 14 '14 at 19:23
  • $\begingroup$ Thanks :) Sorry for stupid question. $\endgroup$ – xslittlegrass May 14 '14 at 19:50

If it helps your expression simplifies to this:

 f[k_] = Log[Exp[-k^2]/(2 Pi)^2 (Erf[I k/2 - Pi] - Erf[I k/2 + Pi])^4]/4


 f[k_] = Log[Exp[-k^2]/(2 Pi)^2 (Re[Erf[I k/2 - Pi]])^4]/4

(making the assumption k is real )


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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