Rational Functions: Proper, Improper, and the Plan

A rational function is a ratio P(x)Q(x)\frac{P(x)}{Q(x)} of polynomials with Q(x)≠0Q(x) \neq 0. It is proper if deg⁡P<deg⁡Q\deg P < \deg Q, otherwise improper.

The plan for integrating any rational function:

  1. Improper? Divide first. Long division gives P(x)Q(x)=T(x)+P1(x)Q(x)\frac{P(x)}{Q(x)} = T(x) + \frac{P_1(x)}{Q(x)} with TT a polynomial (easy) and P1Q\frac{P_1}{Q} proper.
  2. Factorise the denominator into linear and quadratic factors.
  3. Decompose the proper part into simpler fractions using Table 7.2.
  4. Integrate each piece — they are all logs, powers, or tan⁡−1\tan^{-1} forms from Section 3.

Table of five partial fraction decomposition forms by denominator type

Table 7.2 — the five decomposition forms:

Rational function Partial fraction form
px+q(x−a)(x−b)\dfrac{px + q}{(x-a)(x-b)}, a≠ba \neq b Ax−a+Bx−b\dfrac{A}{x-a} + \dfrac{B}{x-b}
px+q(x−a)2\dfrac{px + q}{(x-a)^2} Ax−a+B(x−a)2\dfrac{A}{x-a} + \dfrac{B}{(x-a)^2}
px2+qx+r(x−a)(x−b)(x−c)\dfrac{px^2 + qx + r}{(x-a)(x-b)(x-c)} Ax−a+Bx−b+Cx−c\dfrac{A}{x-a} + \dfrac{B}{x-b} + \dfrac{C}{x-c}
px2+qx+r(x−a)2(x−b)\dfrac{px^2 + qx + r}{(x-a)^2(x-b)} Ax−a+B(x−a)2+Cx−b\dfrac{A}{x-a} + \dfrac{B}{(x-a)^2} + \dfrac{C}{x-b}
px2+qx+r(x−a)(x2+bx+c)\dfrac{px^2 + qx + r}{(x-a)(x^2+bx+c)}, quadratic irreducible Ax−a+Bx+Cx2+bx+c\dfrac{A}{x-a} + \dfrac{Bx + C}{x^2+bx+c}

Key Point: A repeated linear factor (x−a)2(x-a)^2 needs BOTH Ax−a\frac{A}{x-a} and B(x−a)2\frac{B}{(x-a)^2}; an irreducible quadratic needs a full linear numerator Bx+CBx + C, not just a constant. These two rules are where wrong decompositions come from.

[Board Important] The decomposition is an identity (true for all xx) — that is why both coefficient-comparison and value-plugging are valid ways to find the constants.

Finding the Constants — and Two Power Moves

Method 1 — compare coefficients. Clear denominators, expand, and match the coefficients of each power of xx. Always works; more algebra.

Method 2 — plug convenient values. Since the identity holds for ALL xx, substituting the roots kills terms instantly: in 1=A(x+2)+B(x+1)1 = A(x+2) + B(x+1), putting x=−1x = -1 gives A=1A = 1; putting x=−2x = -2 gives B=−1B = -1. Fast for distinct linear factors.

Power move 1 — substitution before decomposition. For trig rationals like ∫(3sin⁡ϕ−2)cos⁡ϕ5−cos⁡2ϕ−4sin⁡ϕ dϕ\int\frac{(3\sin\phi - 2)\cos\phi}{5 - \cos^2\phi - 4\sin\phi}\,d\phi: substitute y=sin⁡ϕy = \sin\phi first; the integral becomes an ordinary rational function ∫3y−2(y−2)2dy\int\frac{3y - 2}{(y - 2)^2}dy — then decompose.

Power move 2 — the x2=yx^2 = y trick (decomposition only). For x2(x2+1)(x2+4)\frac{x^2}{(x^2+1)(x^2+4)}, treat x2x^2 as a single letter yy to decompose y(y+1)(y+4)=−1/3y+1+4/3y+4\frac{y}{(y+1)(y+4)} = \frac{-1/3}{y+1} + \frac{4/3}{y+4} — then restore x2x^2 and integrate with tan⁡−1\tan^{-1} forms. The substitution is a bookkeeping device for the algebra; the integration still happens in xx.

Key Point: Partial fractions is pure algebra followed by Section 1-3 integration. If your integration step feels hard, the decomposition step was wrong — go back.

[JEE Tip] After finding constants, spot-check with one easy value of xx (like x=0x = 0) before integrating. Ten seconds of checking beats re-doing the whole problem.

Solved Examples

Example 1: Two distinct linear factors

Find ∫dx(x+1)(x+2)\displaystyle\int \frac{dx}{(x + 1)(x + 2)}.

Solution:

  1. Decompose: 1(x+1)(x+2)=Ax+1+Bx+2\frac{1}{(x+1)(x+2)} = \frac{A}{x+1} + \frac{B}{x+2}, so 1=A(x+2)+B(x+1)1 = A(x+2) + B(x+1).
  2. Find constants: x=−1⇒A=1x = -1 \Rightarrow A = 1; x=−2⇒B=−1x = -2 \Rightarrow B = -1.
  3. Integrate: ∫dxx+1−∫dxx+2=log⁡∣x+1∣−log⁡∣x+2∣\int\frac{dx}{x+1} - \int\frac{dx}{x+2} = \log|x+1| - \log|x+2|.

Final Answer: log⁡∣x+1x+2∣+C\log\left|\frac{x + 1}{x + 2}\right| + C.

Takeaway: Root-plugging found both constants in one line each — use it whenever the factors are distinct and linear.

Example 2: Improper — divide first

Find ∫x2+1x2−5x+6 dx\displaystyle\int \frac{x^2 + 1}{x^2 - 5x + 6}\,dx.

Solution:

  1. Degrees are equal (2 = 2) — improper. Divide: x2+1x2−5x+6=1+5x−5(x−2)(x−3)\frac{x^2 + 1}{x^2 - 5x + 6} = 1 + \frac{5x - 5}{(x - 2)(x - 3)}.
  2. Decompose the proper part: 5x−5(x−2)(x−3)=Ax−2+Bx−3\frac{5x - 5}{(x-2)(x-3)} = \frac{A}{x-2} + \frac{B}{x-3}; 5x−5=A(x−3)+B(x−2)5x - 5 = A(x - 3) + B(x - 2): x=2⇒A=−5x = 2 \Rightarrow A = -5; x=3⇒B=10x = 3 \Rightarrow B = 10.
  3. Integrate all three pieces: ∫dx−5∫dxx−2+10∫dxx−3\int dx - 5\int\frac{dx}{x-2} + 10\int\frac{dx}{x-3}.

Final Answer: x−5log⁡∣x−2∣+10log⁡∣x−3∣+Cx - 5\log|x - 2| + 10\log|x - 3| + C.

Takeaway: Decomposing an improper fraction directly gives garbage — the division step is not optional.

Example 3: A repeated linear factor

Find ∫3x−2(x+1)2(x+3) dx\displaystyle\int \frac{3x - 2}{(x + 1)^2(x + 3)}\,dx.

Solution:

  1. Decompose (Table form 4): 3x−2(x+1)2(x+3)=Ax+1+B(x+1)2+Cx+3\frac{3x-2}{(x+1)^2(x+3)} = \frac{A}{x+1} + \frac{B}{(x+1)^2} + \frac{C}{x+3}.
  2. Clear and compare: 3x−2=A(x+1)(x+3)+B(x+3)+C(x+1)23x - 2 = A(x+1)(x+3) + B(x+3) + C(x+1)^2. Comparing coefficients (or plugging x=−1,−3x = -1, -3 plus one comparison): A=114A = \frac{11}{4}, B=−52B = -\frac{5}{2}, C=−114C = -\frac{11}{4}.
  3. Integrate: 114log⁡∣x+1∣−52⋅(−1x+1)−114log⁡∣x+3∣\frac{11}{4}\log|x+1| - \frac{5}{2}\cdot\left(-\frac{1}{x+1}\right) - \frac{11}{4}\log|x+3|.

Final Answer: 114log⁡∣x+1x+3∣+52(x+1)+C\frac{11}{4}\log\left|\frac{x+1}{x+3}\right| + \frac{5}{2(x+1)} + C.

Takeaway: The (x+1)2(x+1)^2 piece integrates by the power rule to −Bx+1-\frac{B}{x+1} — no logs from repeated-factor terms of power two.

Example 4: The x2=yx^2 = y bookkeeping trick

Find ∫x2(x2+1)(x2+4) dx\displaystyle\int \frac{x^2}{(x^2 + 1)(x^2 + 4)}\,dx.

Solution:

  1. Decompose treating x2=yx^2 = y: y(y+1)(y+4)=Ay+1+By+4\frac{y}{(y+1)(y+4)} = \frac{A}{y+1} + \frac{B}{y+4}; y=A(y+4)+B(y+1)y = A(y+4) + B(y+1): y=−1⇒A=−13y = -1 \Rightarrow A = -\frac{1}{3}; y=−4⇒B=43y = -4 \Rightarrow B = \frac{4}{3}.
  2. Restore x2x^2: integrand =−13(x2+1)+43(x2+4)= -\frac{1}{3(x^2+1)} + \frac{4}{3(x^2+4)}.
  3. Integrate with tan⁡−1\tan^{-1} forms: −13tan⁡−1x+43⋅12tan⁡−1x2-\frac{1}{3}\tan^{-1}x + \frac{4}{3}\cdot\frac{1}{2}\tan^{-1}\frac{x}{2}.

Final Answer: −13tan⁡−1x+23tan⁡−1x2+C-\frac{1}{3}\tan^{-1}x + \frac{2}{3}\tan^{-1}\frac{x}{2} + C.

Takeaway: The yy-substitution served only the algebra; the final integration used xx and the Section 3 forms. Never actually substitute y=x2y = x^2 in the integral itself (there is no 2x dx2x\,dx available!).

Example 5: Substitution first, then partial fractions

Find ∫(3sin⁡ϕ−2)cos⁡ϕ5−cos⁡2ϕ−4sin⁡ϕ dϕ\displaystyle\int \frac{(3\sin\phi - 2)\cos\phi}{5 - \cos^2\phi - 4\sin\phi}\,d\phi.

Solution:

  1. Substitute: y=sin⁡ϕy = \sin\phi, dy=cos⁡ϕ dϕdy = \cos\phi\,d\phi; using cos⁡2ϕ=1−y2\cos^2\phi = 1 - y^2, the denominator is 5−(1−y2)−4y=y2−4y+4=(y−2)25 - (1 - y^2) - 4y = y^2 - 4y + 4 = (y - 2)^2.
  2. Decompose: 3y−2(y−2)2=Ay−2+B(y−2)2\frac{3y - 2}{(y-2)^2} = \frac{A}{y-2} + \frac{B}{(y-2)^2}; 3y−2=A(y−2)+B3y - 2 = A(y - 2) + B: comparing, A=3A = 3, B=4B = 4.
  3. Integrate: 3log⁡∣y−2∣−4y−23\log|y - 2| - \frac{4}{y - 2}.
  4. Return with y=sin⁡ϕy = \sin\phi (and 2−sin⁡ϕ>02 - \sin\phi > 0 always): 3log⁡(2−sin⁡ϕ)+42−sin⁡ϕ+C3\log(2 - \sin\phi) + \frac{4}{2 - \sin\phi} + C.

Final Answer: 3log⁡(2−sin⁡ϕ)+42−sin⁡ϕ+C3\log(2 - \sin\phi) + \frac{4}{2 - \sin\phi} + C.

Takeaway: Layered problems: substitution converts trig → rational, partial fractions finishes. Also note ∣sin⁡ϕ−2∣=2−sin⁡ϕ|{\sin\phi - 2}| = 2 - \sin\phi since sin⁡ϕ≤1\sin\phi \leq 1.

Example 6: An irreducible quadratic factor

Find ∫x2+x+1(x+2)(x2+1) dx\displaystyle\int \frac{x^2 + x + 1}{(x + 2)(x^2 + 1)}\,dx.

Solution:

  1. Decompose (Table form 5): x2+x+1(x+2)(x2+1)=Ax+2+Bx+Cx2+1\frac{x^2+x+1}{(x+2)(x^2+1)} = \frac{A}{x+2} + \frac{Bx + C}{x^2+1}.
  2. Compare: x2+x+1=A(x2+1)+(Bx+C)(x+2)x^2 + x + 1 = A(x^2 + 1) + (Bx + C)(x + 2) gives A+B=1A + B = 1, 2B+C=12B + C = 1, A+2C=1A + 2C = 1: A=35A = \frac{3}{5}, B=25B = \frac{2}{5}, C=15C = \frac{1}{5}.
  3. Split the quadratic piece for integration: 15⋅2x+1x2+1=15⋅2xx2+1+15⋅1x2+1\frac{1}{5}\cdot\frac{2x + 1}{x^2+1} = \frac{1}{5}\cdot\frac{2x}{x^2+1} + \frac{1}{5}\cdot\frac{1}{x^2+1}.
  4. Integrate: 35log⁡∣x+2∣+15log⁡(x2+1)+15tan⁡−1x\frac{3}{5}\log|x+2| + \frac{1}{5}\log(x^2+1) + \frac{1}{5}\tan^{-1}x.

Final Answer: 35log⁡∣x+2∣+15log⁡(x2+1)+15tan⁡−1x+C\frac{3}{5}\log|x + 2| + \frac{1}{5}\log(x^2 + 1) + \frac{1}{5}\tan^{-1}x + C.

Takeaway: The Bx+CBx + C numerator splits into a log part (2x2x over the quadratic) and a tan⁡−1\tan^{-1} part (constant over the quadratic) — always in that order.

Example 7: The difference-of-squares special case

Find ∫dxx2−9\displaystyle\int \frac{dx}{x^2 - 9}.

Solution:

  1. Recognise the standard form (or decompose): x2−9=(x−3)(x+3)x^2 - 9 = (x-3)(x+3) with a=3a = 3.
  2. Apply: 12×3log⁡∣x−3x+3∣+C\frac{1}{2 \times 3}\log\left|\frac{x - 3}{x + 3}\right| + C.

Final Answer: 16log⁡∣x−3x+3∣+C\frac{1}{6}\log\left|\frac{x - 3}{x + 3}\right| + C.

Takeaway: Section 3's formula (1) IS a pre-packaged partial fraction decomposition — recognising it saves the whole computation.

Example 8: Trig rational via t=sin⁡xt = \sin x

Find ∫cos⁡x(1−sin⁡x)(2−sin⁡x) dx\displaystyle\int \frac{\cos x}{(1 - \sin x)(2 - \sin x)}\,dx.

Solution:

  1. Substitute: t=sin⁡xt = \sin x, dt=cos⁡x dxdt = \cos x\,dx: ∫dt(1−t)(2−t)\int\frac{dt}{(1 - t)(2 - t)}.
  2. Decompose: 1(1−t)(2−t)=A1−t+B2−t\frac{1}{(1-t)(2-t)} = \frac{A}{1-t} + \frac{B}{2-t}; 1=A(2−t)+B(1−t)1 = A(2 - t) + B(1 - t): t=1⇒A=1t = 1 \Rightarrow A = 1; t=2⇒B=−1t = 2 \Rightarrow B = -1.
  3. Integrate (watch signs): ∫dt1−t=−log⁡∣1−t∣\int\frac{dt}{1-t} = -\log|1-t| and −∫dt2−t=+log⁡∣2−t∣-\int\frac{dt}{2-t} = +\log|2-t|.
  4. Return: log⁡∣2−sin⁡x1−sin⁡x∣+C\log\left|\frac{2 - \sin x}{1 - \sin x}\right| + C.

Final Answer: log⁡∣2−sin⁡x1−sin⁡x∣+C\log\left|\frac{2 - \sin x}{1 - \sin x}\right| + C.

Takeaway: Factors of the form (a−t)(a - t) flip signs on integration: ∫dta−t=−log⁡∣a−t∣\int\frac{dt}{a - t} = -\log|a - t|. Track each minus separately.

Example 9: Improper with a cubic numerator

Find ∫x3+x+1x2−1 dx\displaystyle\int \frac{x^3 + x + 1}{x^2 - 1}\,dx.

Solution:

  1. Divide: x3+x+1x2−1=x+2x+1x2−1\frac{x^3 + x + 1}{x^2 - 1} = x + \frac{2x + 1}{x^2 - 1}.
  2. Decompose: 2x+1(x−1)(x+1)=Ax−1+Bx+1\frac{2x+1}{(x-1)(x+1)} = \frac{A}{x-1} + \frac{B}{x+1}; 2x+1=A(x+1)+B(x−1)2x + 1 = A(x+1) + B(x-1): x=1⇒A=32x = 1 \Rightarrow A = \frac{3}{2}; x=−1⇒B=12x = -1 \Rightarrow B = \frac{1}{2}.
  3. Integrate: x22+32log⁡∣x−1∣+12log⁡∣x+1∣\frac{x^2}{2} + \frac{3}{2}\log|x-1| + \frac{1}{2}\log|x+1|.

Final Answer: x22+32log⁡∣x−1∣+12log⁡∣x+1∣+C\frac{x^2}{2} + \frac{3}{2}\log|x - 1| + \frac{1}{2}\log|x + 1| + C.

Example 10: An exponential rational

Find ∫dxex−1\displaystyle\int \frac{dx}{e^x - 1}.

Solution:

  1. Substitute: t=ext = e^x, dt=exdx=t dxdt = e^x dx = t\,dx, so dx=dttdx = \frac{dt}{t}: the integral is ∫dtt(t−1)\int\frac{dt}{t(t - 1)}.
  2. Decompose: 1t(t−1)=−1t+1t−1\frac{1}{t(t-1)} = \frac{-1}{t} + \frac{1}{t-1} (plug t=0t = 0 and t=1t = 1).
  3. Integrate: −log⁡∣t∣+log⁡∣t−1∣=log⁡∣t−1t∣-\log|t| + \log|t - 1| = \log\left|\frac{t-1}{t}\right|.
  4. Return: log⁡∣ex−1ex∣=log⁡∣1−e−x∣+C\log\left|\frac{e^x - 1}{e^x}\right| = \log\left|1 - e^{-x}\right| + C.

Final Answer: log⁡∣1−e−x∣+C\log\left|1 - e^{-x}\right| + C.

Takeaway: t=ext = e^x turns exponential rationals into polynomial rationals — the extra 1t\frac{1}{t} from dx=dttdx = \frac{dt}{t} joins the denominator.