Algorithm Search⌘K

Proofs: Partial fraction decomposition

These are the human proofs of Partial fraction decomposition, at full length.

Partial fractions by Chinese remaindering exist, are unique and are computed correctly full

This proof shows: correctness, termination.

Fix a field KK and work in K[x]K[x], one variable, with deg⁡0=−∞\deg 0 = -\infty. Let b1,…,bkb_1, \ldots, b_k have degree at least 11 and be pairwise coprime, let ei≥1e_i \ge 1, let b=∏ibieib = \prod_i b_i^{e_i}, d=deg⁡bd = \deg b, and let a∈K[x]a \in K[x]. Write Bi=bieiB_i = b_i^{e_i} and ci=b/Bic_i = b / B_i.

Fact 1 (coprimality). gcd⁡(ci,Bi)=1\gcd(c_i, B_i) = 1. If an irreducible pp divides BiB_i then p∣bip \mid b_i. If pp also divided ci=∏j≠ibjejc_i = \prod_{j \ne i} b_j^{e_j}, then p∣bjp \mid b_j for some j≠ij \ne i, so pp divides gcd⁡(bi,bj)=1\gcd(b_i, b_j) = 1, which is impossible.

Termination. Line L2 is one division with remainder. The loop of line L3 runs kk times. In each pass, line L4 is one exact division (it is exact because Bi∣bB_i \mid b), line L5 is one run of the extended Euclidean algorithm, which stops because the degrees of the remainders strictly decrease, line L6 is one division, and the inner loop of line L7 runs exactly eie_i times, each a single division. So the algorithm stops.

Line L5 succeeds. By Fact 1 the extended Euclidean algorithm on cic_i and BiB_i returns si,tis_i, t_i with sici+tiBi=1s_i c_i + t_i B_i = 1, so sici≡1(modBi)s_i c_i \equiv 1 \pmod{B_i}.

Claim 1. After line L2, aold=qb+aa_{\text{old}} = q b + a with deg⁡a<d\deg a < d, by the division identity. So aold/b=q+a/ba_{\text{old}} / b = q + a / b, and it remains to decompose the proper fraction a/ba / b.

Claim 2. With ri=(asi) mod Bir_i = (a s_i) \bmod B_i from line L6, a=∑i=1kricia = \sum_{i=1}^k r_i c_i. Let S=∑iriciS = \sum_i r_i c_i. Fix ii. For j≠ij \ne i, Bi∣cjB_i \mid c_j, so rjcj≡0(modBi)r_j c_j \equiv 0 \pmod{B_i}. Also rici≡asici≡a(modBi)r_i c_i \equiv a s_i c_i \equiv a \pmod{B_i} by line L5. Hence S≡a(modBi)S \equiv a \pmod{B_i} for each ii. The BiB_i are pairwise coprime (Fact 1 applied to any pair), so their product bb divides S−aS - a. Now deg⁡(rici)<deg⁡Bi+deg⁡ci=d\deg (r_i c_i) < \deg B_i + \deg c_i = d, so deg⁡(S−a)<d\deg (S - a) < d, and a multiple of bb of degree less than dd is 00. So S=aS = a. Dividing by bb gives a/b=∑iri/Bia / b = \sum_i r_i / B_i.

Claim 3. The inner loop of lines L7 and L8 produces aiei,…,ai1a_{i e_i}, \ldots, a_{i 1} with deg⁡aij<deg⁡bi\deg a_{ij} < \deg b_i and ri=∑j=1eiaijbiei−jr_i = \sum_{j=1}^{e_i} a_{ij} b_i^{e_i - j}. Let ρ0=ri\rho_0 = r_i and let the pass with index jj compute ρei−j+1=ρei−jquo⁡bi\rho_{e_i - j + 1} = \rho_{e_i - j} \operatorname{quo} b_i and aij=ρei−jrem⁡bia_{ij} = \rho_{e_i - j} \operatorname{rem} b_i. By the division identity ρt=ai,ei−t+ρt+1bi\rho_t = a_{i, e_i - t} + \rho_{t+1} b_i for t=0,…,ei−1t = 0, \ldots, e_i - 1, with each deg⁡aij<deg⁡bi\deg a_{ij} < \deg b_i. Substituting repeatedly gives ri=∑t=0ei−1ai,ei−tbit+ρeibieir_i = \sum_{t=0}^{e_i - 1} a_{i, e_i - t} b_i^t + \rho_{e_i} b_i^{e_i}. Since deg⁡ri<deg⁡Bi=eideg⁡bi\deg r_i < \deg B_i = e_i \deg b_i and each division by bib_i lowers the degree by deg⁡bi\deg b_i, we get deg⁡ρei<0\deg \rho_{e_i} < 0, so ρei=0\rho_{e_i} = 0. With j=ei−tj = e_i - t this is the claim. Dividing by Bi=bieiB_i = b_i^{e_i} gives ri/Bi=∑j=1eiaij/bijr_i / B_i = \sum_{j=1}^{e_i} a_{ij} / b_i^{j}.

Claims 1 to 3 together give aold/b=q+∑i∑jaij/bija_{\text{old}} / b = q + \sum_i \sum_{j} a_{ij} / b_i^j with deg⁡aij<deg⁡bi\deg a_{ij} < \deg b_i, which is the required output.

Uniqueness. Suppose q+∑i,jaij/bij=q′+∑i,jaij′/bijq + \sum_{i,j} a_{ij} / b_i^j = q' + \sum_{i,j} a'_{ij} / b_i^j, both with numerator degrees below deg⁡bi\deg b_i. Multiply by bb and set δij=aij−aij′\delta_{ij} = a_{ij} - a'_{ij}. Then (q−q′)b=−∑i,jδijbiei−jci(q - q') b = -\sum_{i,j} \delta_{ij} b_i^{e_i - j} c_i. The right side has degree less than dd, because deg⁡(δijbiei−j)<eideg⁡bi\deg (\delta_{ij} b_i^{e_i - j}) < e_i \deg b_i, so q=q′q = q' and ∑iRici=0\sum_i R_i c_i = 0 with Ri=∑jδijbiei−jR_i = \sum_j \delta_{ij} b_i^{e_i - j}. Reducing modulo BiB_i gives Rici≡0(modBi)R_i c_i \equiv 0 \pmod{B_i}, and since cic_i is invertible modulo BiB_i, Bi∣RiB_i \mid R_i. But deg⁡Ri<deg⁡Bi\deg R_i < \deg B_i, so Ri=0R_i = 0. Finally Ri=0R_i = 0 is a base bib_i expansion of 00 with digits of degree below deg⁡bi\deg b_i: the lowest digit δiei=Rirem⁡bi=0\delta_{i e_i} = R_i \operatorname{rem} b_i = 0, and dividing by bib_i and repeating shows every δij=0\delta_{ij} = 0. So the decomposition is unique, and the algorithm returns it. ■\blacksquare

Back to Partial fraction decomposition