       Re: polynomial operations through CoefficientList

• To: mathgroup at smc.vnet.net
• Subject: [mg44761] Re: polynomial operations through CoefficientList
• From: "Carl K. Woll" <carlw at u.washington.edu>
• Date: Tue, 25 Nov 2003 00:45:29 -0500 (EST)
• Organization: University of Washington
• References: <bps3jo\$9pu\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Paolo,

For multiplying polynomials, the simplest solution is to use ListConvolve.
For example,

In:=
ListConvolve[cf1, cf2, {1, -1}, 0]
Out=
{-2, -2 k1 - k3, 4 k2 - k1 k3, 2 k2 k3}

example,

In:=
Out=
{-1, k1 - k3, -2 k2}

Carl Woll

"Paolo Bientinesi" <pauldj at cs.utexas.edu> wrote in message
news:bps3jo\$9pu\$1 at smc.vnet.net...
> Hello,
> 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: polynomial operations through CoefficientList
• Next by Date: Table format gets lost while write to outputfile?
• Previous by thread: Re: polynomial operations through CoefficientList
• Next by thread: Re: polynomial operations through CoefficientList