Bill Allombert on Thu, 08 Aug 2019 20:55:37 +0200

 Re: MacLaurin expansion of even functions

```On Wed, Aug 07, 2019 at 12:21:53AM +0000, Jacques Gélinas wrote:
> \$ \p
>    realprecision = 57 significant digits (5 digits displayed)
> \$ \ps 4
>    seriesprecision = 4 significant terms
>
> Consider the differences between the first two and last two expansions
>
> \$ Vec(besselj(-1/2,t))           \\ cos
> [1, 0, -1/2, 0, 1/24]
> \$ Vec(besselj(1/2,t))             \\ sinc
> [1, 0, -1/6, 0, 1/120]
>
> \$ xis(s) = gamma(1+s/2)/Pi^(s/2)*(s-1)*zeta(s);
> \$ Vec(xis(1/2+t))
> [0.49712, 0.E-57, 0.011486, -1.2745 E-57]
> \$ Xi(t) = lfunlambda(1,1/2+t) * binomial(1/2+t,2);
> \$ Vec(Xi(t))
> [0.49712, 0.E-77, 0.011486, 0.E-76]
>
> Of course, I would want exact zeros for xis, Xi as for the Bessel functions,
> and, if possible, the same number of coefficients for a given series precision.
>
> How can this be done simply for any even function ?
> Sereven(f,var) = ???

I do not know. What about

Sereven(f)=
{
my(V=Vec(f),v=variable(f));
forstep(i=2,#V,2,V[i]=0);
Ser(V,v)*t^valuation(f,v);
}

Cheers,
Bill.

```