# Infinite series works only to order k=20

**URL:** <https://community.wolfram.com/t/infinite-series-works-only-to-order-k-20/20638>\
**Category:** Questions\
**Tags:** calculus, graphics-and-visualization\
**Created:** [August 31, 2022, 10:24am UTC](https://community.wolfram.com/t/infinite-series-works-only-to-order-k-20/20638 "2022-08-31T10:24:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mekhfi](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@mekhfi](https://community.wolfram.com/u/mekhfi)\
**Post date:** [August 31, 2022, 10:24am UTC](https://community.wolfram.com/t/infinite-series-works-only-to-order-k-20/20638/1 "2022-08-31T10:24:04Z")

</div>

Hi  
Here is a function g defined by an infinite series which works only for k\<= 20. The series is convergent as we check it by another mean

```
Needs["PlotLegends`"];
g[j_] := (1/2)^0.5*Sin[Pi*0.5]/Pi*     
   NSum[Gamma[-k + 0.5, 0, 10]/k!*(j/2)^(2 k), {k, 0, 30}];
Omega = Table[g[j], {j, 0.1, 20, 0.1}];
ListLinePlot[{Omega}, PlotStyle -> Thick, PlotRange -> {-2, 2}]

```

---

<div class="post-metadata">

**Author:** ![shenghuiy](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/shenghuiy/32/36073_2.png) [@shenghuiy](https://community.wolfram.com/u/shenghuiy)\
**Post date:** [August 31, 2022, 4:33pm UTC](https://community.wolfram.com/t/infinite-series-works-only-to-order-k-20/20638/2 "2022-08-31T16:33:34Z")

</div>

Hi,

Could you please share the proof of the convergence? I did quick asymptotic analysis on the last term of your sum and it appears the absolute value grows exponential. Both the asymptotic value and direct computation show the same trend.

 ![2022-08-31_11-30-01.png](https://global.discourse-cdn.com/wolfram/original/3X/e/4/e46c48fc4b83b364729faaff7032e77377f21f01.png)

---

<div class="post-metadata">

**Author:** ![mekhfi](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@mekhfi](https://community.wolfram.com/u/mekhfi)\
**Post date:** [August 31, 2022, 5:04pm UTC](https://community.wolfram.com/t/infinite-series-works-only-to-order-k-20/20638/3 "2022-08-31T17:04:52Z")

</div>

Hi  
Please execute first

```
Needs["PlotLegends`"];
g[j_] := (1/2)^0.5*Sin[Pi*0.5]/Pi*     
   NSum[Gamma[-k + 0.5, 0, 10]/k!*(j/2)^(2 k), {k, 0, 30}];
Omega = Table[g[j], {j, 0.1, 20, 0.1}];
ListLinePlot[{Omega}, PlotStyle -> Thick, PlotRange -> {-2, 2}]

```

to see what’s going on. Note that you made a print mistake it’s (j/2)^(2 k and not (k/2)^(2 k. Now I said convergence because I plotted the same function but written in terms of reduced Bessel function and found no errors.  
The aim is to make the plot with k=0 to infinity.  
Thanks.

---

<div class="post-metadata">

**Author:** ![mariuszi28cg](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mariuszi28cg/32/308_2.png) [@mariuszi28cg](https://community.wolfram.com/u/mariuszi28cg)\
**Post date:** [September 1, 2022, 9:10am UTC](https://community.wolfram.com/t/infinite-series-works-only-to-order-k-20/20638/4 "2022-09-01T09:10:33Z")

</div>

Looks like:  
$\sum \_{k=0}^{\infty } \frac{\Gamma \left(-k+\frac{1}{2},0,10\right) \left(\frac{j}{2}\right)^{2 k}}{k!}=-\frac{1}{2} e^{-i j} \sqrt{\pi } \left(\text{erfc}\left(\frac{20-i  
j}{2 \sqrt{10}}\right)+e^{2 i j} \text{erfc}\left(\frac{20+i j}{2 \sqrt{10}}\right)\right)+\sqrt{\pi } \cos (j)$

```
g[j_] := (1/2)^(1/2)*Sin[Pi*(1/2)]/Pi*
   Sum[Gamma[-k + 1/2, 0, 10]/k!*(j/2)^(2 k), {k, 0, 50}];
Omega = Table[g[j], {j, 1/10, 20, 2/10}];
L = ListLinePlot[{Omega}, PlotStyle -> Thick, PlotRange -> {-2, 2}]

g1[j_] := (1/2)^(1/2)*
  Sin[Pi*(1/2)]/
   Pi*(-(1/2) E^(-I j)
      Sqrt[\[Pi]] (Erfc[(20 - I j)/(2 Sqrt[10])] + 
       E^(2 I j) Erfc[(20 + I j)/(2 Sqrt[10])]) + 
    Sqrt[\[Pi]]*Cos[j]); Omega1 = Table[g1[j], {j, 1/10, 20, 2/10}];
L2 = ListLinePlot[{Omega1}, PlotStyle -> {Red, Thick}, 
  PlotRange -> {-2, 2}]

L3 = ListLinePlot[{Omega - Omega1}, PlotStyle -> {Red, Thick}]

```

---

<div class="post-metadata">

**Author:** ![mekhfi](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@mekhfi](https://community.wolfram.com/u/mekhfi)\
**Post date:** [September 2, 2022, 10:33am UTC](https://community.wolfram.com/t/infinite-series-works-only-to-order-k-20/20638/5 "2022-09-02T10:33:09Z")

</div>

Thanks for the answer  
I understand that the terms of the series k\>=50 have insignificant contributions to the sum. On the other hand I didn’t succeed in reproducing the series giving at the beginning for fixed j. Will you please give some hints about how you proceeded Thanks again

---

<div class="post-metadata">

**Author:** ![mariuszi28cg](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mariuszi28cg/32/308_2.png) [@mariuszi28cg](https://community.wolfram.com/u/mariuszi28cg)\
**Post date:** [September 2, 2022, 6:24pm UTC](https://community.wolfram.com/t/infinite-series-works-only-to-order-k-20/20638/6 "2022-09-02T18:24:22Z")

</div>

What do you mean by

> Will you please give some hints about how you proceeded

?

---

<div class="post-metadata">

**Author:** ![mekhfi](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@mekhfi](https://community.wolfram.com/u/mekhfi)\
**Post date:** [September 2, 2022, 8:59pm UTC](https://community.wolfram.com/t/infinite-series-works-only-to-order-k-20/20638/7 "2022-09-02T20:59:24Z")

</div>

It’s about the sum you give at the beginning : Looks like …  
If I ask Mathematica to perform the sum naively that is if I write

Sum[Gamma[-k - 1/2, 0, 10]/k!\*(j/2)^(2 k), {k, 0, [Infinity]}]  
I get no answer . My question is how did you get the above result: -1/2 exp[-ij]…by using Mathematica software then how or have you copied it from some textbook

---

<div class="post-metadata">

**Author:** ![mariuszi28cg](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mariuszi28cg/32/308_2.png) [@mariuszi28cg](https://community.wolfram.com/u/mariuszi28cg)\
**Post date:** [September 2, 2022, 10:59pm UTC](https://community.wolfram.com/t/infinite-series-works-only-to-order-k-20/20638/8 "2022-09-02T22:59:07Z")

</div>

$\sum \_{k=0}^{\infty } -\frac{2^{-2 k} j^{2 k} \Gamma \left(\frac{1}{2}-k,10\right)}{\Gamma (1+k)}+\sum \_{k=0}^{\infty } -\frac{2 j^{2 k} \Gamma (-2 k)  
\sin (k \pi )}{\sqrt{\pi }}$

```
Sum[#, {k, 0, Infinity}] & /@ (Gamma[-k + 1/2, 0, 10]/k!*(j/2)^(2 k) //
    FunctionExpand)
 (*Sum[-((j^(2*k)*Gamma[1/2 - k, 10])/(2^(2*k)*Gamma[1 + k])), {k, 0, Infinity}] + 
  Sum[(-2*j^(2*k)*Gamma[-2*k]*Sin[k*Pi])/Sqrt[Pi], {k, 0, Infinity}]*)

```

First series we can compute from identity  
\Gamma (a,z)=\int\_z^{\infty } t^{a-1} \exp (-t) \, dt

```
Integrate[
 Sum[-((2^(-2 k) j^(2 k) (t^(a - 1) Exp[-t] /. a -> 1/2 - k))/
   Gamma[1 + k]), {k, 0, Infinity}], {t, 10, Infinity}, Assumptions -> j >= 0]

(*-(1/2) E^(-I j) Sqrt[\[Pi]] (Erfc[(20 - I j)/(2 Sqrt[10])] + 
   E^(2 I j) Erfc[(20 + I j)/(2 Sqrt[10])])*)

```

Second series we can compute like this:

```
L = Table[
  Limit[-((2 j^(2 k) Gamma[-2 k] Sin[k \[Pi]])/Sqrt[\[Pi]]), k -> m, 
   Assumptions -> j >= 0], {m, 0, 10}]
Sum[FindSequenceFunction[L, k] // FunctionExpand, {k, 0, Infinity}]

(*Sqrt[\[Pi]] Cos[j]*)

```

Regards M.I.

---

<div class="post-metadata">

**Author:** ![anon21378091](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@anon21378091](https://community.wolfram.com/u/anon21378091)\
**Post date:** [September 5, 2022, 10:42am UTC](https://community.wolfram.com/t/infinite-series-works-only-to-order-k-20/20638/9 "2022-09-05T10:42:46Z")

</div>

Thank you M.I for your instantaneous help. I appreciate the the way you compute the second series. I however have some remarks about it.

- First the sequence you get L[k] from the first 10 terms may not be unique so one has to check the equality of the sequence with the original one -2j^(2k) Gamma[-2k]Sin[kPi]/Sqrt[Pi]
- Second the sequence you get start from zero Table[L[k],{k,0,10}]=0,Sqrt[[Pi]], -(1/2) j^2 Sqrt[[Pi]],… I don’t know why but that will not impact the final result you get . To prove the equality one has to make the shift k-\>k+1 first which result in the sequence (-1)^kj^(2k)Sqrt(Pi)/Gamma(1+2k) then apply the identity Gamma[a]Gamma[1-a]=Pi/Sin[Pi\*a] to get the equality ( I do it analytically because I’ not not good in mathematica)
