MathGroup Archive 2002

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

Search the Archive

Re: PolynomialQ ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34931] Re: PolynomialQ ?
  • From: rainer gruber <rainer.gruber at gmx.at>
  • Date: Thu, 13 Jun 2002 02:38:21 -0400 (EDT)
  • Organization: Johannes Kepler Universitaet Linz
  • References: <ae4en8$9bc$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Juan wrote:

> 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



You're assuming that a polynomial in a certain variable has to contain 
the variable. Thats not true! The variable can also appear with exponent 
zero. So, as long as all exponents of a variable in a polynomial are
- nonnegativ
- finite

- integers
it is a polynomial in this variable:


negativ,

In[1]:=
PolynomialQ[1/x, x]
Out[1]=
False

infinite,

In[2]:=
PolynomialQ[Sin[x], x]
Out[2]=
False

and non integer exponents

In[3]:=
PolynomialQ[Sqrt[x], x]
Out[3]=
False

are not allowed in the polynomial.


Next Time if you have a problem like this I recommend to take a look in 
the HELP BROWSER!

--
Rainer Gruber




  • Prev by Date: Re: Internal parameters of NDSolve, write-out of preliminary data
  • Next by Date: Re: A friendly challenge: Generalized Partition
  • Previous by thread: RE: PolynomialQ ?
  • Next by thread: Re: PolynomialQ ?