# Is there a reason for the similarity between $\exp(-x^2-x^4-x^6)$ and $\cos(0.5\pi x)$

I was wondering whether the similarity between the functions $\exp(-x^2-x^4-x^6)$ and $\cos(0.5\pi x)$ was due to some more fundamental limiting relation between the two functions (or similar functions with polynomial exponents of $e$) or just a mere "coincidence".

Sorry if this seems like a bizarre question. To give it some context I was thinking about the limiting solutions to a quantum particle in a box (potential=$x^\infty$) and the quantum harmonic oscillator (potential=$x^2$).

-
How, precisely, are they similar? – J. M. Nov 25 '12 at 11:23
Over the limits -1 to 1 – Joe Nov 25 '12 at 11:27
They're not very similar, I think... – J. M. Nov 25 '12 at 11:30
I was imagining that there may be a limiting relation of the form product from n=1 to N as N tends to infinity of exp(-f(n)*abs(x)^n) where f(n) is some function of n. Which tends to cos((pi*x)/2) over the range -1 to 1 – Joe Nov 25 '12 at 11:37
It looks like $-x^2-x^4-x^6$ might be close to the 6th-order Chebyshev approximation of $\log \cos(\pi x/2)$. – Rahul Nov 25 '12 at 12:00

The Taylor expansion (computed with PARI/GP) of $\ln\cos\frac{\pi x}2$ starts $$-1.2337005501361698273543113749845188919 x^2 - 0.50733901580209602727312673275367245443 x^4 - 0.33381569221364737396882619571264579822 x^6 - 0.25003879475632402982574681232393201039 x^8 - 0.20000340827260896509763678045996608484 x^{10} - 0.16666698097476385326265147306337459117 x^{12} - 0.14285717274864560164287233838289474202 x^{14} - 0.12500000290464467239458845915306524769 x^{16}+ O(x^{18})$$ where the weird numbers are caused by including $\pi$ (it is remarkable though that the coefficient of $x^{16}$ is so close to $-\frac18$). It looks like $\exp(-\frac54x²-\frac12 x^4-\frac13 x^6)$ would be a better (but not perfect) approximation, but there is a difference between approximating "near zero" (what Taylor does) and approximating "in $-1,1]$" as you likely want.

The numbers look friendlier without $\pi$, i.e. the expansion of $\ln\cos x$ is $$-\frac{1}{2} x^2 - \frac{1}{12} x^4 - \frac{1}{45} x^6 - \frac{17}{2520} x^8 - \frac{31}{14175} x^{10} - \frac{691}{935550} x^{12} - \frac{10922}{42567525} x^{14} - \frac{929569}{10216206000} x^{16}+ O(x^{18})$$

-
Thanks Hagen. That's really helpful – Joe Nov 25 '12 at 11:53
If you think the above answer is helpful then you should at least upvote it and keep it as a candidate for "the best answer" to your question – DonAntonio Nov 25 '12 at 11:56
I can't this is my first time on the site (it says i dont have enough reputation) – Joe Nov 25 '12 at 12:05
It's interesting to note the unfriendly coefficient on $x^{2n}$ is rather close to $1/n$. – Hurkyl Nov 25 '12 at 16:13
@Hurkyl: Yes, indeed. Note that $\sum -\frac1n x^{2n}$ is Taylor for $\ln(1-x^2)$. – Hagen von Eitzen Nov 25 '12 at 18:40

I believe it's merely a coincidence. Both functions look like bell-shaped curves on the interval $[-1,1]$. In fact, by using the Taylor expansion about both, we have $$\cos(\pi x/2) = 1 - \frac{\pi^2 x^2}{8} + O(x^4), \quad e^{-x^2 - x^4 - x^6} = 1 - x^2 + O(x^4),$$ so their Taylor expansions are not even matching, but the coefficients are somewhat close. In fact, if you calculate out their Taylor expansions further, you can see that the coefficients end up differing greatly. However, for high powers of $x$, these contributions are basically negligible when $|x| < 1$. Furthermore, near the endpoints $x = \pm 1$, the exponential will be close to $0$ simply by virtue of the fact that $e^{-3}$ is small.

In summary, by most standards, these curves aren't close at all. If you modify the coefficients in the exponential, you can get better approximations of $\cos(\pi x/2)$ using exponentials of polynomials.

-