7 | | GiNaC can only compute Taylor and Laurent series. Your's is a Puiseux |

8 | | series: a series not in integer powers of x but in rational powers of x. |

9 | | |

10 | | The Puiseux expansion of sqrt(x) is, well, x^(1/2). |

11 | | |

12 | | You may try to set x=y^q and compute the Laurent expansion in y. Setting |

13 | | q=2 in your case would give the desired result: |

14 | | |

15 | | series(sqrt(x),x,0,3) |

16 | | = series(sqrt(y^2),y,0,3*2) |

17 | | = y |

18 | | = x^(1/2). |

19 | | |

20 | | Note that the member functions degree() and ldegree() currently return |

21 | | int, so this would have to be generalized somehow, when implementing |

22 | | Puiseux series directly in GiNaC. |

23 | | |

24 | | Bye |

25 | | -richy. |

| 7 | > GiNaC can only compute Taylor and Laurent series. Yours is a Puiseux |

| 8 | > series: a series not in integer powers of x but in rational powers of x. |

| 9 | > |

| 10 | > The Puiseux expansion of sqrt(x) is, well, x^(1/2)^. |

| 11 | > |

| 12 | > You may try to set x=y^q^ and compute the Laurent expansion in y. Setting |

| 13 | > q=2 in your case would give the desired result: |

| 14 | > |

| 15 | > {{{ |

| 16 | > series(sqrt(x), x, 0, 3) |

| 17 | > = series(sqrt(y^2), y, 0, 3*2) |

| 18 | > = y |

| 19 | > = x^(1/2). |

| 20 | > }}} |

| 21 | > |

| 22 | > Note that the member functions degree() and ldegree() currently return |

| 23 | > int, so this would have to be generalized somehow, when implementing |

| 24 | > Puiseux series directly in GiNaC. |

| 25 | > |

| 26 | > Bye |

| 27 | > -richy. |