Rational function
In mathematics, a rational function is any function that can be defined by a rational fraction. A rational fraction is an algebraic fraction whose numerator and denominator are both polynomials.
The coefficients of these polynomials do not have to be rational numbers. They may come from any field K. In that case, people speak of a rational function and a rational fraction over K.
The values of the variables may be taken from any field L that contains K. The domain of the function is the set of variable values for which the denominator is not zero. The codomain is L.
The set of rational functions over a field K is itself a field. It is called the field of fractions of the ring of the polynomial functions over K.
This article is not about the use of the term in automata theory, which is covered in Finite-state transducer, or in monoid theory, which is covered in Rational function (monoid).
Definitions
A rational function is a function f(x) = P(x)/Q(x), where P and Q are polynomial functions and Q is not the zero function. Its domain is all the x-values where Q(x) is not zero. If P and Q share a common factor that is not a constant, that factor can be cancelled to make a simpler rational function, which may have a larger domain. People usually treat the two as the same function. A rational function is called a proper rational function when P has a lower degree than Q and both are real polynomials. This name is borrowed from a proper fraction in ℚ.
In complex analysis, a rational function is the ratio of two polynomials with complex numbers as coefficients, with no common factor. Its domain is the complex numbers where Q is not zero. Every rational function can be extended to cover the whole Riemann sphere, where it is called a rational mapping. Repeating rational functions on the Riemann sphere forms a discrete dynamical system. A complex rational function of degree one is a Möbius transformation, and rational functions are examples of meromorphic functions.
Examples
This section shows several examples of rational functions. One example has a degree of 3. Its fraction is undefined when the bottom part equals zero, such as when x² = 5. For very large values of x, it gets close to x². Another example is defined for all real numbers, but not for all complex numbers. If x were the imaginary unit (a square root of −1), the bottom part would become zero, so the function would not work there.
A constant function, such as f(x) = π, is rational because constants are polynomials. Even though the value of this function is irrational for every x, the function itself is still rational. Every polynomial function is also rational. A function like sin(x) is not rational. Every Laurent polynomial can be written as a rational function, but not every rational function is a Laurent polynomial, so Laurent polynomials are a subring of the rational functions. Finally, the function x/x equals 1 for every x except 0, where it has a removable singularity.
Taylor series
The numbers in a Taylor series for any rational function follow a linear recurrence relation. To find this rule, you set the rational function equal to a Taylor series with unknown numbers, then clear the bottom part of the fraction and group the like terms. For example, for 1/(x² − x + 2), the first two numbers are a₀ = 1/2 and a₁ = 1/4. After that, each number is half of the difference between the two numbers before it, written as ak = ½(ak−1 − ak−2). This works for all x within the radius of convergence of the original Taylor series. The constant term on each side must match, and all of the coefficients on the right must be zero when there are no powers of x on the left.
The rule also works in reverse. Any sequence that follows a linear recurrence can be used as the coefficients of a Taylor series to make a rational function. This helps when solving these rules. By using partial fraction decomposition, any proper rational function can be written as a sum of simpler fractions. Each simple fraction can be expanded as a geometric series, which gives a clear formula for the Taylor coefficients. This method is called generating functions.
Abstract algebra
In abstract algebra, the idea of a polynomial is extended so that its coefficients can come from any field of numbers. A rational expression (also called a rational fraction or, in algebraic geometry, a rational function) is any element of the field of fractions of the polynomial ring F[X]. Any rational expression can be written as one polynomial divided by another, though not in only one way. Just as a fraction of whole numbers can always be written in lowest terms, each rational expression can be written in one unique way, with the bottom polynomial kept monic.
Main article: Function field of an algebraic variety
The field of rational expressions is written F(X). It is said to be generated by X over F, because no smaller field contains both F and X. Like polynomials, rational expressions can also be used with several letters, such as X1 to Xn. In algebraic geometry, a similar idea is used for the function field of an algebraic variety.
Rational functions are used in numerical analysis to interpolate and approximate other functions. One example is the Padé approximants introduced by Henri Padé. These approximations work well with computer algebra systems and other numerical software. Like polynomials, rational functions are easy to evaluate, but they can show a wider range of behavior.
Scientists and engineers also use rational functions to approximate or model more complicated equations. These include fields and forces in physics, spectroscopy in chemistry, electronic circuits, aerodynamics, and wave functions for atoms and molecules. They are also used in optics and photography to improve image detail, and in acoustics and sound. In signal processing, the Laplace transform and the z-transform of the impulse response of some common linear time-invariant systems (filters) with infinite impulse response are rational functions over complex numbers.

Quiz time!
5 questions about Rational function
What is a rational function?
Pictures
Keep exploring
This article is a child-friendly adaptation of the Wikipedia article on Rational function, available under CC BY-SA 4.0.
Images from Wikimedia Commons. Tap any image to view credits and license.