Integration of rational functions
Q: What is a rational function?
A: The quotient of two polynomials
A rational function (in variable , with real coefficients) is a quotient %20%3D%20p(x)%2Fq(x)#card=math&code=R%28x%29%20%3D%20p%28x%29%2Fq%28x%29&id=KAqfq) of two polynomials %2C%20q(x)#card=math&code=p%28x%29%2C%20q%28x%29&id=TZTbI) . So the domain of #card=math&code=R%28x%29&id=ffo1I) is all (real) such that %20%5Cneq%200#card=math&code=q%28x%29%20%5Cneq%200&id=zmK50).
To compute %7D%7Bq(x)%7D%20dx#card=math&code=%5Cint%20%5Cfrac%7Bp%28x%29%7D%7Bq%28x%29%7D%20dx&id=csG8u) , one uses the technique of “partial fraction decomposition”. It is based on the following observations.
- We can factorize a real-coefficient polynomial #card=math&code=q%28x%29&id=o3D1F) into irreducible factors.
- Irrducible polynomials with real coeffcients are either of degree one, or of degree two and with negative discriminant. (Recall that the discriminant of a quadratic polynomial is equal to .)
- The above means
%20%3D%20%5Calpha%20l_1(x)%20l_2(x)%20%5Cldots%20l_m(x)%20s_1(x)%5Ccdots%20s_n(x)#card=math&code=q%28x%29%20%3D%20%5Calpha%20l_1%28x%29%20l_2%28x%29%20%5Cldots%20l_m%28x%29%20s_1%28x%29%5Ccdots%20s_n%28x%29&id=tDciH), where are integers, and %2C%20%5Cdeg%20s_j%20%3D2%20(1%20%5Cleq%20j%20%5Cleq%20n)#card=math&code=%5Cdeg%20l_i%20%3D%201%20%281%20%5Cleq%20i%20%5Cleq%20m%29%2C%20%5Cdeg%20s_j%20%3D2%20%281%20%5Cleq%20j%20%5Cleq%20n%29&id=UUCDR), and all discriminants of #card=math&code=s_j%28x%29&id=LbrvF) are .
So that the degree of #card=math&code=q%28x%29&id=TPySS) is . Here is the leading coefficient of #card=math&code=q%28x%29&id=DVduL). (It implies that %20%3D%20%5Calpha%20x%5E%7Bm%2B2n%7D%2B#card=math&code=q%28x%29%20%3D%20%5Calpha%20x%5E%7Bm%2B2n%7D%2B&id=v3J8r) lower degree terms)
The partial fraction decomposition is the process to write a rational function %3Dp(x)%2Fq(x)#card=math&code=R%28x%29%3Dp%28x%29%2Fq%28x%29&id=FL3BP) into simple summands. Suppose #card=math&code=q%28x%29&id=N17xk) has the been factorized as above. For simplicity we assume that . Then,
%20%3D%20%5Cfrac%7Bp(x)%7D%7Bq(x)%7D%3D%20%5Csum%7Bi%3D1%7D%5Em%20%5Cfrac%7BC_i%7D%7Bl_i(x)%7D%20%2B%20%5Csum%7Bj%20%3D1%7D%5En%20%5Cfrac%7BAj%20x%20%2B%20B_j%7D%7Bs_j(x)%7D%0A#card=math&code=R%28x%29%20%3D%20%5Cfrac%7Bp%28x%29%7D%7Bq%28x%29%7D%3D%20%5Csum%7Bi%3D1%7D%5Em%20%5Cfrac%7BCi%7D%7Bl_i%28x%29%7D%20%2B%20%5Csum%7Bj%20%3D1%7D%5En%20%5Cfrac%7BA_j%20x%20%2B%20B_j%7D%7Bs_j%28x%29%7D%0A&id=JZljD)
We clear the denominator by multiplying #card=math&code=q%28x%29&id=UMCIo) on both sides of (1): then
%20%3D%20%5Csum%7Bi%3D1%7D%5Em%20%20C_i%20%5Cfrac%7Bq(x)%7D%7Bl_i(x)%7D%20%2B%20%5Csum%7Bj%3D1%7D%5En%20(Aj%20x%2B%20B_j)%5Cfrac%7Bq(x)%7D%7Bs_j(x)%7D#card=math&code=p%28x%29%20%3D%20%5Csum%7Bi%3D1%7D%5Em%20%20Ci%20%5Cfrac%7Bq%28x%29%7D%7Bl_i%28x%29%7D%20%2B%20%5Csum%7Bj%3D1%7D%5En%20%28A_j%20x%2B%20B_j%29%5Cfrac%7Bq%28x%29%7D%7Bs_j%28x%29%7D&id=h3bjr).
Now we re-organise the terms on both sides by decreasing order of . Then we compare the coefficients on both sides, that we can determine the constants .
Example: %3D%5Cfrac%7Bx%7D%7Bx%5E3-1%7D#card=math&code=R%28x%29%3D%5Cfrac%7Bx%7D%7Bx%5E3-1%7D&id=ZmjRD) %3Dx%5E3-1%20%3D%20(x-1)(x%5E2%2Bx%2B1)#card=math&code=q%28x%29%3Dx%5E3-1%20%3D%20%28x-1%29%28x%5E2%2Bx%2B1%29&id=E53lV) .
, clearing the denominator, we get
%2B(Ax%2BB)(x-1)%20%3D%20(C%2BA)x%5E2%2B(C-A%2BB)x%20%2B(C-B)#card=math&code=x%20%3D%20C%28x%5E2%2Bx%2B1%29%2B%28Ax%2BB%29%28x-1%29%20%3D%20%28C%2BA%29x%5E2%2B%28C-A%2BB%29x%20%2B%28C-B%29&id=CpWMB) .
Comparing the coefficients, we see that
.
Thus . So we have
#card=math&code=%5Cfrac%7Bx%7D%7Bx%5E3-1%7D%20%3D%20%5Cfrac%7B1%2F3%7D%7Bx-1%7D%2B%5Cfrac%7B-x%2F3%2B1%2F3%7D%7Bx%5E2%2Bx%2B1%7D%20%3D%20%5Cfrac%7B1%7D%7B3%7D%20%5Cbig%28%20%5Cfrac%7B1%7D%7Bx-1%7D%2B%20%5Cfrac%7B-x%2B1%7D%7Bx%5E2%2Bx%2B1%7D%5Cbig%29&id=oeh9b)
Now we can simplify the integral: #card=math&code=%5Cint%20%5Cfrac%7Bx%7D%7Bx%5E3-1%7D%20dx%20%3D%20%5Cfrac%7B1%7D%7B3%7D%5Cbig%28%20%5Cint%20%5Cfrac%7Bdx%7D%7Bx-1%7D%20%2B%20%5Cint%20%5Cfrac%7B1-x%7D%7Bx%5E2%2Bx%2B1%7D%20dx%20%5Cbig%29&id=iCZMF).
In general, we have
Recall that %3D1#card=math&code=%5Cdeg%20l_i%28x%29%3D1&id=wOUmC), so that we can write %20%3D%20%5Cbeta_i%20x%20%2B%20%5Cgamma_i#card=math&code=l_i%28x%29%20%3D%20%5Cbeta_i%20x%20%2B%20%5Cgamma_i&id=zcyrc) . So that it is enough to know how to compute . And we know that
%7D%7B%5Cbeta%20x%20%2B%20%5Cgamma%7D%20%3D%20%5Cfrac%7B1%7D%7B%5Cbeta%7D%20%5Cln%20%7C%5Cbeta%20x%20%2B%20%5Cgamma%7C%20%2BC#card=math&code=%5Cint%20%5Cfrac%7Bd%20x%7D%7B%5Cbeta%20x%20%2B%20%5Cgamma%7D%20%3D%20%5Cfrac%7B1%7D%7B%5Cbeta%7D%20%5Cint%20%5Cfrac%7Bd%28%5Cbeta%20%20x%2B%5Cgamma%29%7D%7B%5Cbeta%20x%20%2B%20%5Cgamma%7D%20%3D%20%5Cfrac%7B1%7D%7B%5Cbeta%7D%20%5Cln%20%7C%5Cbeta%20x%20%2B%20%5Cgamma%7C%20%2BC&id=gNivD)
Now we look at the quadratic terms.
Suppose . We need to compute .
We observe that ‘%20%3D%202ax%2Bb#card=math&code=%28ax%5E2%20%2B%20bx%2Bc%29%27%20%3D%202ax%2Bb&id=Sk0wA) .
(2ax%2Bb%2B2aB%2FA-b)%7D%7Bax%5E2%2Bbx%2Bc%7D%20%3D%20%5Cfrac%7BA%7D%7B2a%7D%20%5Cfrac%7B2ax%2Bb%7D%7Bax%5E2%2Bbx%2Bc%7D%20%2B%20%5Cfrac%7BB-bA%2F2a%7D%7Bax%5E2%2Bbx%2Bc%7D#card=math&code=%5Cfrac%7BAx%2BB%7D%7Bax%5E2%20%2B%20bx%20%2B%20c%7D%20%3D%20%5Cfrac%7B%28A%2F2a%29%282ax%2Bb%2B2aB%2FA-b%29%7D%7Bax%5E2%2Bbx%2Bc%7D%20%3D%20%5Cfrac%7BA%7D%7B2a%7D%20%5Cfrac%7B2ax%2Bb%7D%7Bax%5E2%2Bbx%2Bc%7D%20%2B%20%5Cfrac%7BB-bA%2F2a%7D%7Bax%5E2%2Bbx%2Bc%7D&id=Xl7s5) (we change into . )
So that we turn to compute
the first summand is easy: %7D%7Bax%5E2%2Bbx%2Bc%7D%20%3D%20%5Cln%20%7Cax%5E2%2Bbx%2Bc%7C%2BC’#card=math&code=%5Cint%20%5Cfrac%7B2ax%2Bb%7D%7Bax%5E2%2Bbx%2Bc%7D%20dx%20%3D%20%5Cint%20%5Cfrac%7Bd%20%28ax%5E2%2Bbx%2Bc%29%7D%7Bax%5E2%2Bbx%2Bc%7D%20%3D%20%5Cln%20%7Cax%5E2%2Bbx%2Bc%7C%2BC%27&id=vgHiS) .
Now the second summand: .
the disc of is . So it means that no real root for .
Firstly we complete the quadratic polynomial into a complete square:
[Aside: Where comes out the discriminant? %5E2%20%3D%20%5Cfrac%7Bb%5E2-4ac%7D%7B4a%5E2%7D#card=math&code=ax%5E2%2Bbx%2Bc%3D0%20%20%5CLeftrightarrow%20%28x%2B%5Cfrac%7Bb%7D%7Ba%7D%29%5E2%20%3D%20%5Cfrac%7Bb%5E2-4ac%7D%7B4a%5E2%7D&id=uT25l) The LHS is So that if there is an equation, then the RHS must be also . This is equivalent to say that the discriminant must be . ]
%5E2%20%2B%20%5Cfrac%7B4ac-b%5E2%7D%7B4a%5E2%7D#card=math&code=%28x%2B%5Cfrac%7Bb%7D%7B2a%7D%29%5E2%20%2B%20%5Cfrac%7B4ac-b%5E2%7D%7B4a%5E2%7D&id=PiwJy) in the denominator, and the numerator is . We first look at the formula
Now we use the formula (2) to find out
%5E2%20%2B%20%5Cfrac%7B4ac-b%5E2%7D%7B4a%5E2%7D%7D%3D%5Cfrac%7B4a%7D%7B4ac-b%5E2%7D%5Cint%20%5Cfrac%7Bdx%7D%7B1%2B%5Cbig(%5Cfrac%7B2ax%2Bb%7D%7B%5Csqrt%7B4ac-b%5E2%7D%7D%5Cbig)%5E2%7D%0A#card=math&code=%5Cfrac%7B1%7D%7Ba%7D%5Cint%20%5Cfrac%7Bdx%7D%7B%28x%2B%5Cfrac%7Bb%7D%7B2a%7D%29%5E2%20%2B%20%5Cfrac%7B4ac-b%5E2%7D%7B4a%5E2%7D%7D%3D%5Cfrac%7B4a%7D%7B4ac-b%5E2%7D%5Cint%20%5Cfrac%7Bdx%7D%7B1%2B%5Cbig%28%5Cfrac%7B2ax%2Bb%7D%7B%5Csqrt%7B4ac-b%5E2%7D%7D%5Cbig%29%5E2%7D%0A&id=SXpRX)
we let #card=math&code=u%20%3D%20%5Cbig%28%5Cfrac%7B2ax%2Bb%7D%7B%5Csqrt%7B4ac-b%5E2%7D%7D%5Cbig%29&id=PXEH6) then
Then
the final formula is
%2BC%2C%20%5Cquad%20b%5E2%20%3C%204ac%0A#card=math&code=%5Cint%20%5Cfrac%7Bdx%7D%7Bax%5E2%2Bbx%2Bc%7D%20%3D%20%5Cfrac%7B2%7D%7B%5Csqrt%7B4ac-b%5E2%7D%7D%5Carctan%20%5Cbig%28%5Cfrac%7B2ax%2Bb%7D%7B%5Csqrt%7B4ac-b%5E2%7D%7D%5Cbig%29%2BC%2C%20%5Cquad%20b%5E2%20%3C%204ac%0A&id=fX8Qg)
Moreover, if in the indefinite integral %20dx#card=math&code=%5Cint%20R%28x%29%20dx&id=QC47O), some is replaced by or or both, we then need to compute %20%20d%20%5Ctheta#card=math&code=%5Cint%20R%28%5Csin%20%5Ctheta%2C%20%5Ccos%20%5Ctheta%29%20%20d%20%5Ctheta&id=OKT4q) . The trick is using the universal substitution: we let #card=math&code=t%20%3D%20%5Ctan%20%28%5Ctheta%2F2%29&id=kADZP). Then . We still have a rational function (in ) !
Updated 18-Nov-2021 18:26: the above discussion over partial fraction decomposition, does not include one important case: namely, there might be some irreducible factors of occur of multiplicity higher than one! We shall discuss this case next week.