RationalExpressionQ

RationalExpressionQ[expr,x]

gives True if expr is structurally a rational expression in x, and False otherwise.

RationalExpressionQ[expr,{x,y,}]

gives True if expr is structurally a rational expression in x,y,, and False otherwise.

RationalExpressionQ[expr,{x,y,},test]

gives True if expr is structurally a rational expression in x,y, with coefficients satisfying test, and False otherwise.

Details

  • A rational expression in x,y, is an expression constructed with x,y, and coefficients not containing x,y,, using Plus, Times and integer Power.
  • RationalExpressionQ[expr,vars,NumericQ] tests whether expr is a rational expression in vars with numeric coefficients.

Examples

open allclose all

Basic Examples  (3)

Test whether an expression is rational in the specified variable:

Test whether an expression is rational in the specified set of variables:

Test whether an expression is rational with numeric coefficients:

Scope  (4)

Multilevel fractions are rational expressions:

Coefficients of rational expressions may involve arbitrary functions:

Variables need not be symbols:

Variables need not be independent of each other:

Properties & Relations  (2)

Together represents rational expressions as ratios of polynomials:

Use NumeratorDenominator to extract the numerator and the denominator:

Use PolynomialExpressionQ to verify that the resulting expressions are polynomials:

Rational expressions represent functions that are singular at zeros of the denominators:

Use FunctionSingularities to find the singularities:

Outside zeros of the denominators, rational expressions represent analytic functions:

Possible Issues  (3)

A rational expression may not represent a rational function due to hidden division by zero:

A nonrational expression may represent a rational function:

RationalExpressionQ is purely syntactic:

Syntactically, Tan[x] is a coefficient, free of Sin[x] and Cos[x]:

Wolfram Research (2020), RationalExpressionQ, Wolfram Language function, https://reference.wolfram.com/language/ref/RationalExpressionQ.html.

Text

Wolfram Research (2020), RationalExpressionQ, Wolfram Language function, https://reference.wolfram.com/language/ref/RationalExpressionQ.html.

CMS

Wolfram Language. 2020. "RationalExpressionQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RationalExpressionQ.html.

APA

Wolfram Language. (2020). RationalExpressionQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RationalExpressionQ.html

BibTeX

@misc{reference.wolfram_2023_rationalexpressionq, author="Wolfram Research", title="{RationalExpressionQ}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/RationalExpressionQ.html}", note=[Accessed: 19-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_rationalexpressionq, organization={Wolfram Research}, title={RationalExpressionQ}, year={2020}, url={https://reference.wolfram.com/language/ref/RationalExpressionQ.html}, note=[Accessed: 19-April-2024 ]}