MathGroup Archive 2000

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

Search the Archive

Rational functions

  • To: mathgroup at
  • Subject: [mg26080] Rational functions
  • From: Jack Goldberg <jackgold at>
  • Date: Tue, 28 Nov 2000 01:55:27 -0500 (EST)
  • Sender: owner-wri-mathgroup at

Hi group,

In my work I need to know whether the expression f[x] is a rational
function of x (the quotient of two polynomials).  I devised the following
obvious test:

	RationalQ[f_,x_] := Module[ { f1 = Together[f] },
		PolynomialQ[ Numerator[f1]*Denominator[f1], x ]

I would like to hear from those who can find a flaw in this code, or who
can offer a better solution.  I probably should mention that I want
RationalQ to return True when f is a polynomial in x and that I don't
expect RationalQ to free of the subtle peculiarities that are inherent in  



  • Prev by Date: Re: BinCounts Function
  • Next by Date: Re: Simplifying with positive constants
  • Previous by thread: Re: Re: polynomial congruence
  • Next by thread: Re: Rational functions