On Monday, January 13, 2014 4:32:10 PM UTC-8, Gregory Bard wrote:
>
> Hi everyone. I might be confused but I think I've found something not 
> quite right.
>
> The following code:
>
> ###############################
> a(x) = x^2 - 5*x + 6
> b(x) = x^2 - 8*x + 15
>
> f(x) = lcm( a(x), b(x) )
>
> print f
>
> print f.rational_simplify()
> ###############################
>
> produces the output
>
> x |--> (x^2 - 5*x + 6)*(x^2 - 8*x + 15)/(x - 3)
>
> x |--> x^3 - 10*x^2 + 31*x - 30
>
> The latter is more my view of what f(x) should be. Am I wrong?
> Should the lcm of two polynomials be a polynomial? 
>
> In any case, I imagine the lcm is computed by multiplying a(x)
> and b(x) together, and then dividing by their gcd. However,
> shouldn't rational_simplify() be called on that quotient before
> returning the solution?
>
> Thoughts?
> ---Greg
>
> p.s. While I have everyone's attention, is there a 
> polynomial-long-division command in Sage? By polynomial long 
> division, I mean the rote algorithm taught in College Algebra, 
> not Groebner Bases. I searched for a while but didn't find one.
>
> That's fine, it is a rare task, but I thought I'd double check...
>
>
Division with remainder is available in Maxima as the command divide.  
e.g.  divide(a, x-4,x)  returns the pair, x-1 and 2  for
quotient and remainder.
LCM is available in Maxima as lcm.  It probably has the semantics you 
expect.

If you want a tableau displaying the steps in polynomial long division, or  
synthetic division (?) then
Divide() won't satisfy your request.
 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to