MathGroup Archive 2002

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

Search the Archive

RE: PolynomialQ ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34903] RE: [mg34866] PolynomialQ ?
  • From: "David Park" <djmp at earthlink.net>
  • Date: Wed, 12 Jun 2002 02:15:36 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Juan,

I guess it is the way that mathematicians think.

If p = c is a constant, then p is a polynomial in z because it can be
written as
 	c + 0*z + 0*z^2 +...

p = x^3 - 2*x^2 + x - 1;

so

PolynomialQ[p, z]
True

by the above reasoning because the x terms are all treated as constants.

So you want to do an extra test to see if p contains z.

MemberQ[p, z, Infinity] && PolynomialQ[p, z]
False

MemberQ[p, x, Infinity] && PolynomialQ[p, x]
True

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

> From: Juan [mailto:erfa11 at hotmail.com]
To: mathgroup at smc.vnet.net
>
>
> Hi,I tried to check is a polynomial have a variable, ussing the function
> PolynomialQ.
>
> In[1]:=p = x^3 - 2*x^2 + x - 1;
> In[2]:=PolynomialQ[p, x]
> Out[2]=True
> In[3]:=PolynomialQ[p, y]
> Out[3]=True
> In[4]:=PolynomialQ[p, z^2]
> Out[4]=True
> In[5]:=PolynomialQ[p, {u, v}]
> Out[5]=True
>
> What is the thing I am doing wrong?
>
> Regards.Juan
>
> _________________________________________________________________
> Descargue GRATUITAMENTE MSN Explorer en
> http://explorer.yupimsn.com/intl.asp.
>
>



  • Prev by Date: Re: How can I turn the display into an output ?
  • Next by Date: mathlink connections through firewalls
  • Previous by thread: Re: PolynomialQ ?
  • Next by thread: Re: PolynomialQ ?