Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: four dimensioal polynomial composition

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57323] Re: four dimensioal polynomial composition
  • From: dh <dh at metrohm.ch>
  • Date: Wed, 25 May 2005 06:02:28 -0400 (EDT)
  • References: <d6hfhg$dao$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Christoph,
If I understand your question, then your problem is not the composition, 
but to extract all monomials with a given degree from a poly.
Here is an example for this. We define some poly:
p = Plus @@ Flatten@Table[(i + 0.3j)x^i y^j, {i, 0, 3}, {j, 0, 3}]
and we want the coefficients of all monomials with degree:
deg=2
First we extract all coefficients:
cof = CoefficientList[p, {x, y}]
The degree of a monomial is related to the position in the obove array. 
Note that position counts from 1 on:
pos = Position[t, _?NumberQ]
Now we select from pos those entries belonging to the given  total degree:
pos = Select[pos, ((Plus @@ # - 2) == deg) &]
We must subtract 2 because degree counts from 0 and position from 1.
Now we extract the coefficients:
Extract[cof, pos]
This gives the list of the searched coefficients. Note that the first 
entry belongs to x^0 y^deg, the second to x^1 y^deg-1 e.t.c.

Sincerely, Daniel

Christoph Lhotka wrote:
> Hello !
> 
> I want to compose a four dimensional polynomial p(x,y,u,v) of some certain
> degree N with four other polynomials x->px(x,y,u,v), y->py(x,y,u,v),
> u->pu(x,y,u,v), v->pv(x,y,u,v) up to order N (p(px,py,pu,pv)) and extract all
> monomials of some certain order, say M (with respect to lambda). For this
> reason I introduce some artificial parameter lambda which holds terms together
> of equal order. I implement the polynomials using the SeriesData (which now
> has five expansion parameters) object and have the following question:
> 
> Is there anywhere on the net some more detailed information of dealing with
> multivariates Series in Mathematica, I have not found yet.
> 
> Is there a better way, when dealing with polynomials?
> 
> Christoph
> 
> University of Vienna
> Institute for Astronomy
> mail. lhotka at astro.univie.ac.at
> 


  • Prev by Date: Re: FindFit with conditionals
  • Next by Date: Re: Please explain this error message. I typed the code right out of the text.
  • Previous by thread: four dimensioal polynomial composition
  • Next by thread: NonLinearRegress and constraint parameters