On Sat, Jul 19, 2008 at 8:04 AM, David Joyner <[EMAIL PROTECTED]> wrote:
>
> One way:
>
> sage: SR = SymbolicExpressionRing()
> sage: a = var("a")
> sage: R = LaurentPolynomialRing(SR,"t")
> sage: t = R.gen()
> sage: f = sqrt(a)*t+t^(-2)
> sage: f.exponents()
> [(1,), (-2,)]

Your f is not a symbolic expression, so I don't think that really
solves Andrey's problem.  Andrey, you should use the
coeffs method of symbolic expressions:

sage: var('a,t')
(a, t)
sage: f = sqrt(a)*t + 1/t^2
sage: f.coe
f.coeff         f.coefficient   f.coefficients  f.coeffs
sage: f.coeffs(t)
[[1, -2], [sqrt(a), 1]]

Notice the -2, which gives the degree.

>
>
> On Sat, Jul 19, 2008 at 1:07 AM, Andrey Novoseltsev <[EMAIL PROTECTED]> wrote:
>>
>> Hello,
>>
>> I have a symbolic expression which is a polynomial in t and t^(-1). I
>> want to multiply it by some power of t so that it is a polynomial of
>> t. How can I determine this power? Coefficients are some symbolic
>> expressions in other variables, e.g. sqrt(a)*t+1/t^2.
>>
>> Thank you,
>> Andrey
>> >
>>
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to