Two linear factors
- Input
- ∫ 1/(x^2-1) dx
- Expected output
- ½·ln|x − 1| − ½·ln|x + 1| + C
A = ½, B = −½.
partial fractions integral calculator
To integrate P(x)/Q(x), the tool divides the polynomials if the numerator degree is not smaller, factors the denominator into linear and quadratic factors, builds the sum of simple fractions and solves the exact system for the coefficients A, B, C, showing each one.
A = ½, B = −½.
A = −1 for x + 1 and B = 4 for x + 2.
Three terms.
Completing the square.
Quotient x − 1, remainder 1.
The indefinite integral of f is the family of functions F whose derivative is f. Since the derivative of a constant is zero, if F is an antiderivative then F + C is too, for any number C. That is why ∫ 2x dx = x² + C: x² + 1 and x² − 7 also have derivative 2x. The constant can only be pinned down with an extra condition, such as F(0) = 3.
Multiply both sides by the denominator and match the coefficients of each power of x, which gives a linear system. The tool solves it with exact fractions, without rounding, and shows the values on the "A = ..., B = ..." line.
Yes, the cover-up method: each coefficient is the numerator evaluated at the factor root, divided by the other factors evaluated at that same root. In 1/((x − 1)(x + 1)), A = 1/(1 + 1) = ½ at root 1. With repeated or quadratic factors the system is safer.
When the denominator has a quadratic factor with no real roots. Factors with real roots give logarithms of absolute values; factors without real roots give arctangents, and the derivative of the factor itself gives a logarithm without absolute value.
Differentiating the result
F′(x) = f(x) at 14 test points (maximum error 2.2e-16). Both expressions are also identical after expanding.
| x | f(x) | F′(x) | Difference |
|---|---|---|---|
| -2.26376 | -0.23533751 | -0.23533751 | 2.8e-17 |
| 0.565523 | 0.99552794 | 0.99552794 | 1.1e-16 |
| 4.44149 | 377.08727 | 377.08727 | 5.7e-14 |
| -0.222645 | -0.17820488 | -0.17820488 | 0 |
| -0.357476 | -0.25003303 | -0.25003303 | 0 |
| 0.460526 | 0.72989202 | 0.72989202 | 2.2e-16 |
The calculation runs in your browser. The function you type is not sent to any server.