Integrals of rational functions
These are examples of rational functions integrated by Symtegration. Here, rational functions mean the ratio of two polyomials, not functions of rational numbers.
\(\int \frac{x}{1 + x} \, dx = -\log \left(1 + x\right) + x\)
\(\int \frac{x^{2}}{1 + x^{2}} \, dx = \tan^{-1} \left(-x\right) + x\)
\(\int \frac{x^{2} + x}{x - 1} \, dx = 2 \log \left(-1 + x\right) + 2 x + \frac{1}{2} x^{2}\)
\(\int \frac{1}{x^{3} - x^{5}} \, dx = -\frac{1}{2} \log \left(\frac{3}{2} - \frac{3}{2} x^{2}\right) - \frac{1}{2 x^{2}} + \log \left(9 x\right)\)
\(\int \frac{x^{6} + x + 1}{x^{2} - 1} \, dx = -\frac{1}{2} \log \left(2 + 2 x\right) + x + \frac{1}{3} x^{3} + \frac{1}{5} x^{5} + \frac{3}{2} \log \left(2 - 2 x\right)\)
\(\int \frac{x^{4} - 3 x^{2} + 6}{x^{6} - 5 x^{4} + 5 x^{2} + 4} \, dx = \tan^{-1} x + \tan^{-1} x^{3} + \tan^{-1} \frac{x - 3 x^{3} + x^{5}}{2}\)
With complex logarithms
Symtegration makes an effort to return integrals in terms of purely real functions if it can, but if it cannot, it will try to return integrals which use complex logarithms. Care should be taken when using indefinite integrals with complex logarithms to compute definite integrals, since they may have non-obvious discontinuities within the integration interval.
\(\int \frac{1}{1 + x^{3}} \, dx = \frac{1}{3} \frac{-1 - \sqrt{-1} \sqrt{3}}{2} \log \left(9 \left(\frac{1}{3} \frac{-1 - \sqrt{-1} \sqrt{3}}{2}\right)^{2} + \frac{-1 - \sqrt{-1} \sqrt{3}}{2} x\right) + \frac{1}{3} \frac{-1 + \sqrt{-1} \sqrt{3}}{2} \log \left(9 \left(\frac{1}{3} \frac{-1 + \sqrt{-1} \sqrt{3}}{2}\right)^{2} + \frac{-1 + \sqrt{-1} \sqrt{3}}{2} x\right) + \frac{1}{3} \log \left(1 + x\right)\)
\(\int \frac{x}{1 + x^{3}} \, dx = -\frac{1}{3} \frac{-1 - \sqrt{-1} \sqrt{3}}{2} \log \left(9 \left(-\frac{1}{3} \frac{-1 - \sqrt{-1} \sqrt{3}}{2}\right)^{2} + x\right) + -\frac{1}{3} \frac{-1 + \sqrt{-1} \sqrt{3}}{2} \log \left(9 \left(-\frac{1}{3} \frac{-1 + \sqrt{-1} \sqrt{3}}{2}\right)^{2} + x\right) - \frac{1}{3} \log \left(1 + x\right)\)
\(\int \frac{x^{2} - x + 5}{x^{4} - 2 x^{3} + 5 x^{2} - 4 x + 4} \, dx = -\frac{\sqrt{-\frac{676}{7}}}{14} \log \left(-\frac{\sqrt{-\frac{676}{7}}}{14} + \frac{13}{7} + 2 \frac{\sqrt{-\frac{676}{7}}}{14} x\right) + \frac{\sqrt{-\frac{676}{7}}}{14} \log \left(\frac{13}{7} + \frac{\sqrt{-\frac{676}{7}}}{14} - 2 \frac{\sqrt{-\frac{676}{7}}}{14} x\right) + \frac{-\frac{3}{7} + \frac{6}{7} x}{2 - x + x^{2}}\)
Unsupported integrals
Some rational functions cannot be symbolically integrated. This is the case if their integration requires solutions to polynomials of degree 5 or more.
\(\int \frac{1}{1 + x^{5}} \, dx = \bot\)
\(\int \frac{x}{1 + x^{10}} \, dx = \bot\)