Basic Examples (3)
Compute the integral of a rational function:
Compute the integral of a rational function (using Mack's Hermite reduction) where the solution does not contain any logarithmic terms:
Computes a continuous solution to rational integral given in Symbolic Integration I by Manuel Bronstein:
Scope (6)
IntegrateRational can compute many integrals for which Integrate fails to return an elementary form:
In comparison, here's the result from Integrate:
Similarly, the following integral has a concise form from IntegrateRational:
While Integrate expresses the result as a RootSum:
Some integrals will be expressed in finite terms by IntegrateRational, whereas Integrate returns unevaluated:
Integrating some rational functions will introduce algebraic numbers. The solution from IntegrateRational is in the minimal algebraic extension field:
Other integrals will be expressed with hyperbolic arc-tangents:
IntegrateRational works with integrands that contain parameters:
Options (4)
PartialFractions (1)
The option "PartialFractions" specifies if a partial fraction decomposition (with Apart) and term-by-term integration should be used:
Extension (1)
Computing integrals of rational functions using partial fraction decompositions with factorizations over different algebraic extension fields can give alternative forms:
LogToArcTan (2)
By default, sums of complex logarithms are converted into arc-tangents, and sums of real logarithms are converted into hyperbolic arc-tangents:
This feature can be turned off:
Applications (3)
The output from IntegrateRational will be real and continuous on the real line where possible:
Now evaluate at the endpoints 0 and 1, thus effectively computing a closed form for the definite integral using the Newton-Leibniz theorem:
By comparison, Integrate gives a substantially more complicated (though equivalent) result:
Verify numerically that this is π:
Use the Newton-Leibniz method to compute alternative forms to Integrate for definite integrals:
Compare to Integrate:
Verify equivalence:
As the result from IntegrateRational is in the minimal algebraic extension field, we know the following integral cannot be expressed without introducing the algebraic number :
Properties and Relations (3)
For many simple rational integrals, the result from IntegrateRational and Integrate will often be the same:
Even though a partial fraction decomposition is not immediately possible (via Apart), a concise form for this integral is still possible with IntegrateRational:
Whereas Integrate requires a complete factorization of the denominator of the integrand:
Some integrals will be expressed using Root and RootSum:
Possible Issues (5)
IntegrateRational expands polynomials prior to integration:
The algorithms used by IntegrateRational requires either exact expressions or expressions which rationalize to exact expressions:
The integral of many rational functions will be significantly larger than the integrand:
Sometimes additional simplification is required to express the integral in the minimal algebraic extension field:
Compare the result above to the following result obtained with Rubi:
For some integrals, especially integrals that contain algebraic number coefficients, IntegrateRational may take significantly longer than Integrate:
Further simplification of the result from IntegrateRational may be possible:
Neat Examples (3)
Integrating some rational functions will introduce many logarithms and arc-tangents:
While other rational functions are integrable in terms of algebraic functions without the introduction of new logarithms or arc-tangents:
The following integral cannot be solved without introducing the algebraic number :
Many rational integrals (and algebraic integrals) will have symmetric instances of ArcTan and ArcTanh: