Rational functions
- To: mathgroup at smc.vnet.net
- Subject: [mg26080] Rational functions
- From: Jack Goldberg <jackgold at math.lsa.umich.edu>
- Date: Tue, 28 Nov 2000 01:55:27 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
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 PolynomialQ. Thanks, Jack
- Follow-Ups:
- Re: Rational functions
- From: Daniel Lichtblau <danl@wolfram.com>
- Re: Rational functions