numer - Maple Programming Help

numer

return the numerator of an expression

denom

return the denominator of an expression

 Calling Sequence numer(x) denom(x)

Parameters

 x - algebraic expression

Description

 • The numer(x) function returns the following results for the indicated numeric formats of x.

 Format of x Result rational numerator of x integer x floating-point number x complex rational x multiplied by the common denominator of the real and imaginary parts of x undefined x other unevaluated

 • The denom(x) function returns the following results for the indicated numeric formats of x.

 Format of x Result rational denominator of x integer 1 floating-point number 1.0 complex rational common denominator of the real and imaginary parts of x undefined 1 other unevaluated

 • If x is not numeric, the numer and denom functions are typically called after first using the normal function. The normal function is used to put an expression in the form numerator/denominator where both the numerator and denominator are polynomials. Once x has been normalized, the numer(x) function simply chooses the numerator of x.  The case is similar for denom(x). Note: If x is in normal form, the numerator and denominator have integer coefficients.
 If x is not in normal form, Maple converts it into a normal form (not necessarily the same form that would be returned by the normal function) and a common denominator is found so that x can be expressed in the form numerator/denominator.

Examples

 > $\mathrm{numer}\left(\frac{2}{3}\right)$
 ${2}$ (1)
 > $\mathrm{denom}\left(\frac{2}{3}\right)$
 ${3}$ (2)
 > $\mathrm{denom}\left(45\right)$
 ${1}$ (3)
 > $\mathrm{numer}\left(\frac{1}{2.1x}\right)$
 ${0.4761904762}$ (4)
 > $\mathrm{denom}\left(\frac{1}{2.1x+6.5y}\right)$
 ${2.1}{}{x}{+}{6.5}{}{y}$ (5)
 > $\mathrm{numer}\left(\frac{2}{5}+\frac{I}{6}\right)$
 ${12}{+}{5}{}{I}$ (6)
 > $\mathrm{denom}\left(\frac{2}{5}+\frac{I}{6}\right)$
 ${30}$ (7)

If x is not in normal form, Maple converts it into a normal form.

 > $\mathrm{numer}\left({x}^{2}-\left(x-1\right)\left(x+1\right)\right)$
 ${1}$ (8)
 > $\mathrm{numer}\left(\frac{1+x}{{x}^{\frac{1}{2}}y}\right)$
 ${x}{+}{1}$ (9)
 > $\mathrm{denom}\left(\frac{1+x}{{x}^{\frac{1}{2}}y}\right)$
 $\sqrt{{x}}{}{y}$ (10)
 > $\mathrm{numer}\left(\frac{2}{x}+y\right)$
 ${y}{}{x}{+}{2}$ (11)
 > $\mathrm{numer}\left(x+\frac{1}{x+\frac{1}{x}}\right)$
 ${x}{}\left({{x}}^{{2}}{+}{2}\right)$ (12)
 > $\mathrm{denom}\left(x+\frac{1}{x+\frac{1}{x}}\right)$
 ${{x}}^{{2}}{+}{1}$ (13)
 > $a≔\frac{1}{{x}^{3}}-\frac{1-x+{x}^{2}}{{x}^{3}}$
 ${a}{≔}\frac{{1}}{{{x}}^{{3}}}{-}\frac{{{x}}^{{2}}{-}{x}{+}{1}}{{{x}}^{{3}}}$ (14)
 > $\mathrm{denom}\left(a\right)$
 ${{x}}^{{3}}$ (15)
 > $\mathrm{denom}\left(\mathrm{normal}\left(a\right)\right)$
 ${{x}}^{{2}}$ (16)
 > $\mathrm{simplify}\left(\mathrm{denom}\left(a\right)a\right)$
 ${-}{x}{}\left({x}{-}{1}\right)$ (17)