Yes,

sage: R.<x> = PolynomialRing(QQ,"x")
sage: a = 3*x^3+x^2+x+5
sage: b = 5*x^2-3*x +1
sage: c = a/b
sage: c.partial_fraction_decomposition()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

...

TypeError: cannot coerce nonconstant polynomial
sage:

raises a type error as does

sage: R.<x> = QQ[]
sage: a = 3*x^3+x^2+x+5
sage: b = 5*x^2-3*x +1
sage: c = a/b
sage: c.partial_fraction_decomposition()

(same TypeError) but

sage: S.<t> = QQ[]
sage: q = 1/(t+1) + 2/(t+2) + 3/(t-3);
sage: q.partial_fraction_decomposition()
(0, [3/(t - 3), 1/(t + 1), 2/(t + 2)])

doesn't. I don't understand why this is. Do you?



On Tue, Dec 2, 2008 at 5:37 PM, Tim Lahey <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm working my way through Bronstein's Symbolic
> Integration book and one thing I've noticed is
> that it appears that in Sage you can work with
> symbolics, or polynomials, but not both.
>
> So, if I define:
> x = polygen(QQ,'x')
> a = 3*x^3+x^2+x+5
> b = 5*x^2-3*x +1
>
> I can do, a.quo_rem(b) and all is fine. But, I
> can't do a.partial_fraction(c) (where c is an
> appropriate polynomial since partial_fraction()
> isn't defined for polynomials.
>
> Correspondingly, if I instead do
> var('x') or var('x',ns=1)
>
> I can't use the polynomial operations. Is there
> some way to convert between them?
>
> Thanks,
>
> Tim.
>
> ---
> Tim Lahey
> PhD Candidate, Systems Design Engineering
> University of Waterloo
> http://www.linkedin.com/in/timlahey
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
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