ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 08 Mar 2013 14:15:10 +0100Laurent series, Rational Functions in sqrt(q)?https://ask.sagemath.org/question/9869/laurent-series-rational-functions-in-sqrtq/I need to construct the ring of formal Laurent series in `q**(1/2)` over the rational numbers. How would I do that in sage?
I realize that there's a perfectly good workaround, but I'd be nonetheless very happy if I didn't have to use it. I could just use Laurent series in another variable, like t,
R.<t> = LaurentSeriesRing(QQ)
I could then define q to be `t**2`, and use t as a formal square root of q. But then I still can't raise q to a non-integer power - sage complains that there's a non-integer in the exponent. I'd make about 500 mistakes just typing in formulas and it would be hard to read the output.
Another workaround which I'm not keen on is to just say
var('q')
and just use symbolic expressions instead. I don't really want to do that either: I like having all the Laurent series methods available and I gather that working in an explicit ring is a lot faster? If I'm misinformed there, then please let me know.
Lastly, I'd also like to construct the rational functions in sqrt(q) - same basic problem, as far as I can see. Any help appreciated.
Sat, 02 Mar 2013 13:26:10 +0100https://ask.sagemath.org/question/9869/laurent-series-rational-functions-in-sqrtq/Answer by Benjamin Young for <p>I need to construct the ring of formal Laurent series in <code>q**(1/2)</code> over the rational numbers. How would I do that in sage?</p>
<p>I realize that there's a perfectly good workaround, but I'd be nonetheless very happy if I didn't have to use it. I could just use Laurent series in another variable, like t, </p>
<pre><code>R.<t> = LaurentSeriesRing(QQ)
</code></pre>
<p>I could then define q to be <code>t**2</code>, and use t as a formal square root of q. But then I still can't raise q to a non-integer power - sage complains that there's a non-integer in the exponent. I'd make about 500 mistakes just typing in formulas and it would be hard to read the output.</p>
<p>Another workaround which I'm not keen on is to just say</p>
<pre><code>var('q')
</code></pre>
<p>and just use symbolic expressions instead. I don't really want to do that either: I like having all the Laurent series methods available and I gather that working in an explicit ring is a lot faster? If I'm misinformed there, then please let me know.</p>
<p>Lastly, I'd also like to construct the rational functions in sqrt(q) - same basic problem, as far as I can see. Any help appreciated.</p>
https://ask.sagemath.org/question/9869/laurent-series-rational-functions-in-sqrtq/?answer=14639#post-id-14639Hearing nothing, I just used the first workaround, made 500 mistakes typing in formulas as predicted, fixed them, and I was done. However, the surprise was that it was less painful than I expected, and it did have the advantage that I solved the problem with the tools I already knew, which I regard as virtuous in some sense.
So I'm going to sheepishly call this an answer to my own question. Probably there's a badge for that or something. But I'd still be curious to hear if there's a better way.Fri, 08 Mar 2013 14:15:10 +0100https://ask.sagemath.org/question/9869/laurent-series-rational-functions-in-sqrtq/?answer=14639#post-id-14639