[GiNaC-list] Problem about series

Richard B. Kreckel kreckel at in.terlu.de
Thu Apr 11 23:29:23 CEST 2019


Feng Feng,

Sorry, I don't see what's wrong with this.

On 08.04.19 01:00, Feng Feng wrote:
> Hi, I got a problem  about the series function,
> I used the following test code(see below or the attached file),
> the s1 output only gives Order(ep^(-1)), while s2 output indicates that
> there is a 1/ep^2 term, so the s1 is not correct or I used the series in
> a wrong way?
> 
> Thanks a lot!
> 
> #include <ginac/ginac.h>
> 
> using namespace GiNaC;
> using namespace std;
> 
> int main(int argn, char** args) {
>     symbol x1("x1"),x2("x2"),x3("x3"),x4("x4");
>     symbol ep("ep");
>     ex expr = -2*pow(x1,-1 + ep)*(exp(3*ep*Euler)*pow(ep,-1)*pow(x2,-3*ep)*
>       pow(1 + x3 + x4 + x3*x4,-3*ep)*
>       pow(1 + x2 + x3 + x2*x3 + x4 + x2*x4 + x3*x4 + x2*x3*x4,-2 + 4*ep)*tgamma(3*ep) -
>      exp(3*ep*Euler)*pow(ep,-1)*pow(x2,-3*ep)*pow(1 + x3 + x4 + x3*x4,-3*ep)*
>       pow(1 + x2 + x3 + x1*x3 + x2*x3 + x4 + x2*x4 + x3*x4 + x1*x3*x4 + x2*x3*x4,
>        -2 + 4*ep)*tgamma(3*ep));
>     
>     auto s1 = expr.series(ep,-1);
>     cout << s1.normal() << endl;
>     
>     auto s2 = expr.series(ep,0);
>     cout << s2.normal() << endl;
>     
>     return 0;
> }

You did notice that this Laurent series is expanded in ep, not in ep^-1,
right?

It might help if you reduce your example program to the bare minimum.
Then, if you still think it's wrong, please explain what exactly you
expected instead of the output you got and why.

All my best,
  -richy.
-- 
Richard B. Kreckel
<https://in.terlu.de/~kreckel/>


More information about the GiNaC-list mailing list