Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

polynomial operations through CoefficientList

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44729] polynomial operations through CoefficientList
  • From: Paolo Bientinesi <pauldj at cs.utexas.edu>
  • Date: Mon, 24 Nov 2003 00:05:18 -0500 (EST)
  • Organization: University of Texas at Austin
  • Sender: owner-wri-mathgroup at wolfram.com

Hello,
does anybody have 2 functions ready to multiply and add
2 polynomials directly from their CoefficientList's? 

example: the polynomials I'm considering are
p1[x_] := 1 + k1 x - 2 k2 x^2
p2[x_] := -2 -k3 x

Given
cf1 = {1,k1,-2 k2} 
and
cf2 = {-2,-k3}

I would like to get the list
{-2,-2 k1-k3,4 k2-k1 k3,2 k2 k3}
for p1[x]*p2[x]

and the list
{-1,k1-k3,-2 k2}
for p1[x]+p2[x]

without performing operations like

CoefficientList[
 cf1.Table[x^i,{i,0,Length[cf1]-1}]*
 cf2.Table[x^i,{i,0,Length[cf2]-1}], x]

Thanks!
--
Paolo

pauldj at cs.utexas.edu		        paolo.bientinesi at iit.cnr.it


  • Prev by Date: Re: solution of linear equations, please help!!
  • Next by Date: Re: Conversion Function -> List
  • Previous by thread: RE: How to get single letters bold instead italic
  • Next by thread: Re: polynomial operations through CoefficientList