<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div style="font:14px/1.5 'Lucida Grande', '微软雅黑';color:#333;">
<p style="font:14px/1.5 'Lucida Grande';margin:0;">Of course, <span style="white-space: pre-wrap; font-family: "Lucida Grande", 微软雅黑;">the issue here is mathematics, not GiNaC.
</span><span style="white-space: pre-wrap; font-family: "Lucida Grande", 微软雅黑;">I totally agree with that.
</span><span style="font-family: "Lucida Grande", 微软雅黑;">:)</span></p>
<p style="font:14px/1.5 'Lucida Grande';margin:0;"><span style="font-family: "Lucida Grande", 微软雅黑;"><br>
</span></p>
<p style="font:14px/1.5 'Lucida Grande';margin:0;"><span style="font-family: "Lucida Grande", 微软雅黑;">And thanks a lot for pointing out the method to find the leading power.</span></p>
<p style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 14px; line-height: 1.5; margin: 0px;">
Since there is also log(x)-terms in my expression, and leading power seems not be able to capture these log terms.</p>
<p style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 14px; line-height: 1.5; margin: 0px;">
<br>
</p>
<p style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 14px; line-height: 1.5; margin: 0px;">
Currently, I am trying to walk around by finding the all pattern: x^n, since n is rational number, </p>
<p style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 14px; line-height: 1.5; margin: 0px;">
and multiply n by lcm of all those denominators, and transform all rational powers to integer powers …</p>
<p style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 14px; line-height: 1.5; margin: 0px;">
<br>
</p>
<p style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 14px; line-height: 1.5; margin: 0px;">
BTW, when the input contains x^n (n as an integer) and log(x), it seems that series works fine around x=0.</p>
<p style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 14px; line-height: 1.5; margin: 0px;">
<br>
</p>
<p style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 14px; line-height: 1.5; margin: 0px;">
Thanks again!</p>
<p style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 14px; line-height: 1.5; margin: 0px;">
<br>
</p>
<p style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 14px; line-height: 1.5; margin: 0px;">
Best regards!</p>
<p style="font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 14px; line-height: 1.5; margin: 0px;">
Feng</p>
<span style="font: 14px/1.5 'Lucida Grande';color:#333;"><br>
</span>
<div class="foxmail_blockquote_fromhere_element" style="font: 12px/1.5 'Lucida Grande';padding:2px 0 2px 0;">
<span style="color:#333;text-decoration:line-through;white-space:pre-wrap;"></span> 原始邮件 <span style="color:#333;text-decoration:line-through;white-space:pre-wrap;">
</span></div>
<div style="font: 12px/1.5 'Lucida Grande';background:#efefef;color:#666666;padding:8px;">
<div><b style="color:#999;">发件人:</b> Vladimir V. Kisil<kisilv@maths.leeds.ac.uk></div>
<div><b style="color:#999;">收件人:</b> Feng Feng<F.Feng@outlook.com></div>
<div><b style="color:#999;">抄送:</b> GiNaC discussion list<ginac-list@ginac.de>; Vladimir V. Kisil<V.Kisil@leeds.ac.uk></div>
<div><b style="color:#999;">发送时间:</b> 2019年12月22日(周日) 06:17</div>
<div><b style="color:#999;">主题:</b> Re: [GiNaC-list] series of x^n around x=0</div>
</div>
<br>
<div class="mail_quote_1E1542CEB1AB4DED89B9A44F1DC30012" style="font: 14px/1.5 'Lucida Grande';color:#333;">
<pre style="white-space:pre-wrap;">>>>>> On Sat, 21 Dec 2019 11:14:58 +0000, Feng Feng <<a href="mailto:F.Feng@outlook.com" title="mailto:F.Feng@outlook.com">F.Feng@outlook.com</a>> said:
FF> Thanks very much for the reply.! And yes, it is not
FF> well-defined in mathematical sense to taylor expand x^(3/2)
FF> around x=0. What I exactly want is to get the asyptotic
FF> behaviour of a function f(x) around x=0. For example, f(x) =
FF> x^(3/2) (1 + x + x^2 + …), the asyptotic behaviour at leading
FF> order (LO) and next-to-leading order (NLO) are x^(3/2) and
FF> x^(5/3), respectively.
FF> So I wonder there is a way to get the asyptotic behaviour of a
FF> function f(x), for example, Input: x^(3/2) * (1+x+x^2+x^3), and
FF> request the terms at LO and NLO Output: x^(3/2) + x^(5/3)
I am not sure that is NLO, but the leading term can be obtained as
follows:
ex e=pow(x, numeric(3,2))*(1+x+x^2+x^3);
cout << (log(e).diff(x)*x).expand().subs(x==0);
// -> 3/2
So now e can be multiplied by x^(2/3) to remove the singularity.
See for explanations:
<a href="https://en.wikipedia.org/wiki/Logarithmic_derivative" title="https://en.wikipedia.org/wiki/Logarithmic_derivative">https://en.wikipedia.org/wiki/Logarithmic_derivative</a>
So, the issue here is mathematics, not GiNaC. Once you know the right
method, it shall be easier to implement in the code.
--
Vladimir V. Kisil <a href="http://www.maths.leeds.ac.uk/~kisilv/" title="http://www.maths.leeds.ac.uk/~kisilv/">http://www.maths.leeds.ac.uk/~kisilv/</a>
Book: Geometry of Mobius Transformations <a href="http://goo.gl/EaG2Vu" title="http://goo.gl/EaG2Vu">http://goo.gl/EaG2Vu</a>
Software: Geometry of cycles <a href="http://moebinv.sourceforge.net/" title="http://moebinv.sourceforge.net/">http://moebinv.sourceforge.net/</a>
Jupyter (Colab): <a href="https://github.com/vvkisil/MoebInv-notebooks" title="https://github.com/vvkisil/MoebInv-notebooks">https://github.com/vvkisil/MoebInv-notebooks</a>
Jupyter (CodeOcean): <a href="https://codeocean.com/capsule/7952650/tree" title="https://codeocean.com/capsule/7952650/tree">https://codeocean.com/capsule/7952650/tree</a>
</pre>
</div>
</div>
</body>
</html>