1

In an attempt help answer the question of a fellow member, I recently tried to evaluate the integral

$$\int_{0}^{2}\frac{1-\cos(y^5)}{y^3}\text{ }dy$$

I figured I was unlikely to find a closed-form expression for the integral using only basic integration techniques, so I instead opted to find a series expression for it (maybe I can manipulate the series into a more familiar one?). Using the Maclaurin series of $\cos$ and some algebraic manipulation, I concluded that

\begin{align*} \frac{1-\cos(y^5)}{y^3} &= \sum_{n=1}^{\infty}(-1)^{n+1}\frac{y^{10n-3}}{(2n)!}\\ &= \frac{y^7}{2!}-\frac{y^{17}}{4!}+\frac{y^{27}}{6!}-\frac{y^{37}}{8!}+\cdots \end{align*}

and thus that

\begin{align*} \int_{0}^{2}\frac{1-\cos(y^5)}{y^3}\text{ }dy &= \sum_{n=1}^{\infty}(-1)^{n+1}\frac{2^{10n-2}}{(2n)!(10n-2)}\\ &= \frac{1}{8}\sum_{n=1}^{\infty}(-1)^{n+1}\frac{1024^n}{(2n)!(5n-1)} \end{align*}

Not the prettiest series I've seen, but definitely not the ugliest!

Not seeing any tricks I could do to manipulate the series into one I'm familiar with, I figured the closed-form I was hoping for was out of the equation, so I settled with estimating the integral using the series I derived.

This is where things get interesting. Using Desmos for computation, I noticed that the partial sums $\{s_k\}$ quickly reached the billions in absolute value (according to the site, this first occurs at $k=11$), so I assumed I ran into a convergence issue. However, after raising the upper limit for $k$ to $50$ and varying $k$, I noticed that for $k\geq 19$, the partial sums quickly decreased in absolute value until $k=39$, where $s_k$ finally started approximating the integral rather well (the integral is approximately $0.47659$).

As you can probably guess, I'd like to know why this is happening. Most of the series I've worked with only need a few terms to approximate their sum with an error of at most $1$, even $0.1$ at times. This series isn't that much different than them, so I find it odd for it to behave so erratically and take so long to settle. Any assistance is appreciated.

Alann Rosas
  • 5,421
  • 1
  • 9
  • 28
  • 3
    I am not sure I got the question. The numerator of $\frac{1024^n}{(2n)! (5n-1)}$ is $1024^n$ so each time $n$ is increased by $1$, the numerator is multiplied by about $1000$. You have $(2n)!$ at the denominator. At first, it does not increase much, but increases faster and faster when $n$ becomes large. – Taladris Dec 08 '20 at 09:38
  • 3
    This is classical: let us take the case of an expression of the form $a^n/(n!)$, working in a very "loose" manner, you can consider it as being approximatively $a^n/n^n$ (using Stirling). Therefore, in the "fight between the numerator and the denominator", even after an initial very steep increase, the denominator ultimately wins... – Jean Marie Dec 08 '20 at 10:02

2 Answers2

3

Here is a simpler example:

The exponential series $e^x=\sum_{k=0}^\infty{x^k\over k!}$ converges for all $x\in{\mathbb R}$. When you want to use this series to compute $e^x$ when $|x|\gg1$ you will see that the terms increase in absolute value up to a certain $k_*$ and only then start to decrease as desired. The value $k_*$ depends on the given $|x|$, and is easy to determine. In short words: We have to wait until $k\mapsto k!$ grows faster than $k\mapsto |x|^k$. This is the case when $k\gg |x|$.

In your example this effect is intensified by the ${}^5$ under the cosine.

  • Hi Christian, thank you for taking the time to answer! I see what you mean, but shouldn't it be $x<<-1$ or some other negative number? For $x>0$, all the terms in the exponential series are positive, so I'd imagine that the corresponding sequence of partial sums is strictly increasing. Or am I overlooking something? – Alann Rosas Dec 08 '20 at 09:49
1

Since it is an alternating series, you want to know $n$ such that$$\frac 18\frac{1024^n}{(2n)!\,(5n-1)}\leq 10^{-k}$$ that is to say $$(2n)!\,(5n-1)- \frac 18 1024^n\, 10^{k}\geq 0 \tag 1$$ Taking logarithms, using Stirling approximation and continuing with Taylor series $$2n(\log(n)-a)+\frac32 \log(n)+b+O\left(\frac{1}{n}\right)=0$$

where $a=1+4 \log (2) $ and $b=(1-k) \log (10))+\frac{1}{2}\log (\pi )+3 \log (2)$.

Ignoring the higher order terms and neglecting the $\frac32 \log(n)$, we can approximate the solution and get $$n_0=-\frac{b}{2 W\left(-\frac{b}{2} e^{-a} \right)}$$ where $W(.)$ is Lambert function. This is an overestimate of the solution.

Trying for $k=10$, this would give $n=51.7838$ while the "exact" solution would be $49.2429$.

Taking into account the $\frac32 \log(n)$ term, we cannot get an explicit solution but the result would be $n=49.2414$

Edit

We can have a better approximation using the fact that, for all $n$, $$\left(2 n+\frac{3}{2}\right)! > (2n)!\, (5n-1)$$ and rewrite the equation $(1)$ as $$\left(2 n+\frac{3}{2}\right)! =(32)^{\left(2 n+\frac{3}{2}\right)}\frac {10^k}{1024 \sqrt{2}}$$ which is very similar to the question. Adapting @robjohn's beautiful approximation, we have $$n \sim 16\,e^{1+W(t)}-1 $$ where$$t=\frac {2k \log(10)-(27\log(2)+\log(\pi))}{64 e}$$ For the worked example, this would give $n=48.6269$. Summing then $49$ terms, we have $1.76\times 10^{-11}<10^{-10}$ while one less term would give $1.74\times 10^{-10}>10^{-10}$